Skip to content

Developer tools

Script the gateway from the tools you already use

A typed TypeScript client and a Python client, a Postman collection, a CLI, a VS Code extension, a Terraform provider, an admin MCP server and the deployment assets to run it all.

Request the free install guide

Starter is free with no license key. A short form emails hello@spanway.ai from your mail app and we reply with the install guide for your setup.

Read the CLI docs (opens in a new tab)

Opens the documentation in a new tab.

01

Clients

Call models through the OpenAI-compatible API with a base URL and a virtual key, and manage keys, teams and models through the management API.

OpenAI-compatible API

Every application calls the gateway with a base URL and a Spanway virtual key. The OpenAI API, the Anthropic Messages API and the Responses API are served on the same address, so existing SDKs and coding tools work by changing their base URL, and provider keys never leave the gateway.

Calling the gateway docs

Python client

The spanway-client Python client, attached to every release, is a typed client for the management API, with frozen Pydantic models generated from the OpenAPI document, sync and async clients, and errors returned as values. It needs Python 3.11 or newer.

Python client docs

TypeScript client

@spanway/client has request and response types generated from the gateway's OpenAPI document, with helpers for keys, teams, users, organizations, models, budgets, guardrails, MCP servers, evals and Cloud. Errors come back as values, not exceptions.

TypeScript client docs

Postman collection

A request for every endpoint, one folder per API area and an environment with the base URL and key. Each release attaches both files to its release page, regenerated for that gateway version and signed.

Postman collection docs

VS Code extension

Lists the chat models your key may use in the VS Code chat model picker, each with its price per million tokens, and sends every chat request through the gateway. The key is kept in VS Code's secret storage.

VS Code extension docs

Docs and API reference

Each feature page says what the feature is for, walks through a real scenario with the Admin UI clicks and a curl command, and ends with its errors, plus the log lines it writes where it writes any. The error and log references take you from a symptom to the fix, and every page shows the current Spanway version, linked to the release notes.

Troubleshooting docs

Create a key with the TypeScript client

import { createSpanwayClient } from "@spanway/client";

const spanway = createSpanwayClient({
  baseUrl: "https://gateway.example.com",
  apiKey: process.env.SPANWAY_API_KEY!,
});

const key = await spanway.keys.generate({
  key_alias: "platform-ci",
  team_id: "team-platform",
  models: ["claude-sonnet-5-5"],
  duration: "30d",
});
console.log(key.data?.key ?? key.error);

Each release publishes the container images, the Helm charts and the clients under one version number, so what you deploy matches the gateway you run.

02

Command line

From an empty folder to a running gateway with the image alone, then keys and coding agents from the same terminal.

spanwayctl CLI

Sign in through the gateway's SSO in the browser, manage keys, models and teams, and point Claude Code at the gateway with one command. The CLI ships inside the gateway image and runs anywhere that can reach the gateway, with a short shell function from the CLI docs.

CLI reference docs

Setup wizard

Start the gateway image with --setup and the wizard asks which providers to serve, checks OpenAI, Anthropic and Gemini keys against the provider, writes a config file with a master key into the folder you mounted and offers to start the gateway from it.

Setup wizard docs

Coding agent setup

spanwayctl configure claude connects Claude Code to the gateway for good with a long-lived virtual key, and spanwayctl unconfigure undoes it. Codex takes one provider entry in its own config file.

Coding agent setup docs

Move from an existing gateway

spanwayctl migrate copies a running gateway that uses the same config format into Spanway, keeping every virtual key working, and translates its config and env files. It reads the old database without writing to it, so the old gateway keeps serving until you switch.

Migration docs

Eval gate for CI

spanwayctl evals gate starts an eval run from your CI pipeline, compares it with a trusted baseline and turns the verdict into an exit code and a pull request comment. Evals need Enterprise.

Eval gating docs

Set up, sign in and route a coding agent

# First run: write a config and start the gateway from the image
docker run --rm -it --user "$(id -u):$(id -g)" -p 4000:4000 -v "$PWD:/app/work" -w /app/work registry.spanway.ai/spanway/spanway-ai:<version> --setup

# Sign in through the gateway's SSO
spanwayctl --base-url https://gateway.example.com login --pkce

# Create a key, point Claude Code at the gateway, then start it as usual
spanwayctl keys generate --models claude-sonnet-5-5 --key-alias jane-laptop
spanwayctl configure claude --gateway-url https://gateway.example.com --api-key sk-... --model claude-sonnet-5-5
claude

Each release publishes the container images, the Helm charts and the clients under one version number, so what you deploy matches the gateway you run.

03

Manage the gateway from an agent

Ask for a key, a budget change or a new model in plain words, with every change made under your own account.

Admin MCP server

Manage the gateway from any MCP client. A reviewed set of tools creates keys, adds models, manages teams and budgets and reads spend, hosted by the gateway at /admin/mcp or run as a separate connector. The hosted server also settles review items, access requests, guardrail policy attachments and routing presets, with the client's name on every audit row. Hosting it inside the gateway needs a license that includes admin_mcp.

Admin MCP server docs

Slack admin agent

Admins ask questions and make changes from Slack. Each request runs with the asking admin's own credential, so there is no shared admin key and every change is tied to a person. The native mode, which reuses the gateway's sign-in, is Enterprise and needs a license that includes admin_mcp.

Slack admin agent docs

04

Deployment assets

Every asset runs the same gateway. Pick the one that owns as much of the surrounding infrastructure as you want.

Dev mode in one container

Try everything on a laptop with three commands: the spanway-ai-dev image runs the gateway with its own built-in database, so virtual keys, the Admin UI and spend logs work with no Postgres or Redis to set up. It keeps its data in one Docker volume and has no backups or high availability, so it is for trying the gateway, never for production.

Dev mode docs

Docker compose files

A quickstart that pulls the published image and starts it with a database, and an overlay that adds the Slack admin agent. Every gateway image runs as an unprivileged user and supports a read-only root filesystem, so the same settings carry into a compose file of your own.

Docker compose docs

Helm charts

An all-in-one chart that runs the full gateway in one Deployment, a componentised chart that scales the data plane, management backend and Admin UI separately with Lens as a dependency, and a Lens chart on its own. All three carry the release version, so they pull the images built by the same release.

Helm charts docs

Terraform stacks

Once the images are mirrored to your registry, a terraform apply creates the gateway on AWS, GCP or Azure, with a managed database, cache, object store and public entrypoint.

Terraform stacks docs

Terraform provider

Manage what lives inside a running gateway as code: models, keys, teams, organizations, budgets, guardrails, MCP servers and more. It calls the management API with a key you supply, so it works with any deployment.

Terraform provider docs

Compiled, signed images and charts

Every release builds the gateway images for amd64 and arm64 with Spanway's code compiled inside, on a root filesystem with no shell or package manager, and stops if any Spanway source file remains. Each image and Helm chart is signed with cosign and carries an SPDX SBOM. The release signing key is held in a cloud key management service and never leaves it, and its public key is attached to every release.

Container images docs

Compare the deployment options and the security and operations points behind them.

Run it yourself. Start today.

Start the gateway, track and cap spend on every request, and add SSO, audit logs and custom SLAs when it goes org-wide.

Request the free install guide

Starter is free with no license key. A short form emails hello@spanway.ai from your mail app and we reply with the install guide for your setup.

Contact sales

Opens a short form that emails sales@spanway.ai from your mail app. No commitment.