API Gateway

One key for every model and tool your agents call.

The Anthropic and OpenAI wires, plus search, maps, email, speech, transcription, SEO data and image generation, behind gateway.agentsky.dev. Provider routing with failover, the price in every response, and no separate vendor accounts: an OpenRouter-style gateway built for agents.

Models
41
Run endpoints
32
Providers
18
Wires
2
Providersagentmaildashscopedataforseodeepseekelevenlabsexafish_audioglmgooglegooglemapminimaxmoonshotnano-bananasocheapsocheap_social_boosttinyfishxaizai

Drop-in

Change the base URL. Keep the SDK.

The Anthropic SDK and Claude Code take the gateway host as their base URL; OpenAI clients take the host plus /v1. Model ids are vendor/model or the bare id you already use.

import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  baseURL: "https://gateway.agentsky.dev",
  apiKey: process.env.AGENTSKY_API_KEY, // ast_…
});

const message = await client.messages.create({
  model: "anthropic/claude-sonnet-5",
  max_tokens: 256,
  messages: [{ role: "user", content: "Summarise this ticket." }],
});
console.log(message.usage.cost); // USD, in the response

One key

Replace a drawer of vendor keys with one.

Every vendor behind the gateway is paid from your AgentSky balance. Rotate one key, budget one account, read one usage record.

# before
ANTHROPIC_API_KEY=sk-ant-…
OPENAI_API_KEY=sk-…
DEEPSEEK_API_KEY=…
EXA_API_KEY=…
ELEVENLABS_API_KEY=…

# after
AGENTSKY_API_KEY=ast_…

Routing

Pick the provider, or let the gateway fail over.

A model can come from more than one provider. By default the gateway tries them in its preferred order and moves on when one is unreachable, rate-limited or failing, before a single byte of the reply has been sent. Prefer or restrict providers per request; the response always says who served it.

# any wire: a request header
x-agentsky-provider: socheap

# OpenAI wire: OpenRouter's body field also works
{ "model": "anthropic/claude-sonnet-5",
  "provider": { "order": ["socheap"], "only": ["socheap"] },
  ... }

# every response
x-agentsky-provider: socheap
x-agentsky-provider-attempts: vertex:503,socheap:200

Pricing

The price is in the response.

Model calls carry usage.cost; runs carry price.amount. Per-token and per-call prices below are the default plan, in USD; balances and per-call records come from /v1/credits and /v1/generation. Running agents on the AgentSky platform is priced separately on the pricing page.

ModelProvidersInput / 1M tokensOutput / 1M tokens
anthropic/claude-fable-5socheap$10.00$50.00
anthropic/claude-haiku-4-5socheap$2.00$10.00
anthropic/claude-opus-4-8socheap$10.00$50.00
anthropic/claude-opus-5socheap$5.00$25.00
anthropic/claude-sonnet-4-6socheap$6.00$30.00
anthropic/claude-sonnet-5socheap$4.00$20.00
deepseek/deepseek-chatdeepseek$0.2968$0.5936
deepseek/deepseek-reasonerdeepseek$0.2968$0.5936
deepseek/deepseek-v4-flashdeepseek$0.88$2.64
deepseek/deepseek-v4-prodeepseek$2.64$7.92
google/gemini-3-flash-previewgoogle$1.00$6.00
google/gemini-3.5-flashgoogle$1.00$6.00
moonshotai/kimi-k2.6moonshot$1.90$8.00
moonshotai/kimi-k2.7-codemoonshot$1.90$8.00
moonshotai/kimi-k2.7-code-highspeedmoonshot$3.80$16.00
moonshotai/kimi-k3moonshot$6.00$30.00
openai/gpt-4.1socheap$4.00$16.00
openai/gpt-5.4socheap$5.00$30.00
openai/gpt-5.5socheap$5.00$30.00
openai/gpt-5.6-lunasocheap$0.2$1.20
openai/gpt-5.6-solsocheap$5.00$30.00
openai/gpt-5.6-terrasocheap$2.00$12.00
qwen/qwen-coder-plusdashscope$1.00$2.01
qwen/qwen-flashdashscope$0.264$2.12
qwen/qwen-maxdashscope$6.34$31.60
qwen/qwen-plusdashscope$2.12$6.34
qwen/qwen-vl-maxdashscope$1.60$6.40
qwen/qwen-vl-plusdashscope$0.42$1.26
qwen/qwen3-coder-flashdashscope$0.6$3.00
qwen/qwen3-coder-plusdashscope$2.00$10.00
qwen/qwen3.5-flashdashscope$0.2$0.8
qwen/qwen3.7-maxdashscope$5.00$15.00
xai/grok-4.6xai$2.00$6.00
zai/glm-4.5-airzai$0.4$2.20
zai/glm-4.5vzai$1.20$3.60
zai/glm-4.7zai$1.20$4.40
zai/glm-5zai$2.00$6.40
zai/glm-5-turbozai$2.40$8.00
zai/glm-5.1zai$2.80$8.80
zai/glm-5.2zai$2.80$8.80
zai/glm-5.3zai$1.40$4.40

Agents

Works with the agents you already run.

Any agent that accepts an Anthropic-compatible or OpenAI-compatible base URL runs through the gateway. These two are verified end to end.

Claude Code
export ANTHROPIC_BASE_URL=https://gateway.agentsky.dev
export ANTHROPIC_AUTH_TOKEN=ast_…
claude
Codex CLI
export OPENAI_BASE_URL=https://gateway.agentsky.dev/v1
export OPENAI_API_KEY=ast_…
codex

Quickstart

Three steps.

  1. Step 1
    Create a key

    Sign in and create an API key with write scope. Top up your balance; the same balance pays for agents and gateway calls.

  2. Step 2
    Point a client at the gateway

    Set the base URL and key in your SDK or agent. Nothing else in your code changes.

  3. Step 3
    Read the price

    Each response carries its cost. Use /v1/generation for a per-call record and /v1/credits for your balance.

Common questions

One key. Every model. Every tool.