For coding agents

One URL. Full multi-modal capability.

Point your coding agent — Claude Code, Cursor, Cline, Windsurf, OpenClaw — at AIgateway and it can deliver every modality without touching individual provider SDKs. One base URL, one key, every model.

Open /llms.txt →Full catalog (/llms-full.txt)OpenAPI specAgent guide (agents.md)
The three URLs

Give your agent these three
and it configures itself.

No tutorials, no webinars, no 37-tab dashboard. A capable coding agent reads these once and builds.

Prompt-paste

Drop this into your coding agent.

We designed this to be pasted verbatim. It's long enough to be unambiguous and short enough to fit in a single system message.

You can call any AI model through AIgateway, a universal AI API.

- Base URL: https://api.aigateway.sh/v1
- Auth: Authorization: Bearer sk-aig-...
- SDK: drop-in for the OpenAI SDK — only change base_url
- OpenAPI spec: https://api.aigateway.sh/openapi.json
- Capability map: https://aigateway.sh/llms.txt
- Model list (live): https://api.aigateway.sh/v1/models

Core endpoints (OpenAI-shaped):
  POST /v1/chat/completions     — text, vision, tool calling, streaming
  POST /v1/embeddings           — embeddings
  POST /v1/images/generations   — image generation
  POST /v1/audio/transcriptions — STT (multipart)
  POST /v1/audio/speech         — TTS
  POST /v1/moderations          — Llama Guard

Aggregator primitives (no other gateway has these):
  POST /v1/sub-accounts — scoped keys + spend caps for per-customer products
  POST /v1/evals        — grade candidate models on a dataset, use eval:<id> as a model alias
  POST /v1/replays      — re-run a past request on a new model, diff cost + latency + output
  GET  /v1/usage/by-tag — per-feature cost attribution via x-aig-tag header

Model IDs use <provider>/<model> slugs. Examples:
  anthropic/claude-opus-4.7, openai/gpt-5.4, google/gemini-3.1-pro,
  moonshot/kimi-k2.6, meta/llama-4-scout-17b-16e-instruct,
  black-forest-labs/flux-2-klein-9b, deepgram/nova-3, baai/bge-m3

Read https://aigateway.sh/agents.md for deeper integration patterns.
Install for agents

Three install lines.
Three host languages.

The OpenAI SDK with our base_url covers chat / embeddings / images / STT / TTS. When the agent needs the aggregator-native primitives — async jobs, sub-accounts, evals, replays, signed URLs, webhook verification — install the typed SDK. The CLI is what you reach for when you want to do all of it from the shell.

Error messages

Every error tells you
what to do next.

Stripe-grade remediation in the message field. Your agent never has to guess.

StatusTypeWhat to do
401authentication_errorAsk the human for a key at aigateway.sh/signin
402budget_exceededCall PATCH /v1/sub-accounts/:id to raise the cap, or wait for month rollover
404model_not_foundFetch /v1/models and pick the exact <provider>/<model> slug
429rate_limit_errorHonor Retry-After; if persistent, raise the RPM on the key
502provider_errorRetry once; router failover usually catches this
504timeout_errorRetry with a smaller max_tokens