Every model. One endpoint.

Keep the OpenAI, Anthropic or Gemini SDK you already use and change the base URL. ai.ml sends each request to the best host for the model, moves it on when a host fails, and meters it to the token.

309
models
48
model makers
5
API formats
  • OpenAI
  • Qwen
  • Mistral AI
  • Google
  • Anthropic
  • DeepSeek
  • Z.ai
  • Meta
  • MiniMax
  • Moonshot AI
  • xAI
  • Tencent
  • Aion Labs
  • Xiaomi
  • Amazon
  • Cohere
  • NVIDIA
  • Perplexity
  • ByteDance
  • Sakana AI
  • inclusionAI
  • Nous Research
  • Sao10k
  • Thedrummer

Keep your SDK. Change one line.

ai.ml speaks the OpenAI, Anthropic and Gemini APIs, plus the OpenAI Responses API and its own. A request comes back in the format it was sent, whichever provider answered, streaming, tool calls and structured output included.

  • Streaming in the format your SDK expects
  • Tool calls and structured output on every host
  • Embeddings, speech and batch jobs on the same key
Read the quick start
from openai import OpenAI

client = OpenAI(
    base_url="https://api.openai.com/v1",
    base_url="https://api.ai.ml/v1",
    api_key="sk-aiml-…",
)

reply = client.chat.completions.create(
    model="anthropic/claude-sonnet-5.5",
    messages=[{"role": "user", "content": "Hello"}],
)

Let your coding agent add it

Copy one prompt into Claude Code, Cursor, Codex or Copilot. The agent finds the SDK your project uses, points it at ai.ml, reads the key from an environment variable and adds a quick check that it works.

  • Changes only the base URL and the key when you already use an SDK
  • Keeps the key out of the chat and out of your repository
  • Picks the model from the live catalog, not from memory
or open it in
Add the ai.ml API to this project.

ai.ml is one API for every major AI model (OpenAI, Anthropic, Google, DeepSeek, Qwen, Mistral and more). It works with the official OpenAI, Anthropic and Gemini SDKs: only the base URL and the API key change.

If you can read the web, read these first:
- https://docs.ai.ml/llms.txt (index of the docs)
- https://docs.ai.ml/docs/quickstart/openai.md
- https://docs.ai.ml/docs/quickstart/anthropic.md

Facts:
- OpenAI-compatible base URL: https://api.ai.ml/v1 (Chat Completions, Responses, Embeddings)
- Anthropic-compatible base URL: https://api.ai.ml (Messages)
- Gemini-compatible base URL: https://api.ai.ml
- Auth: the key goes in the SDK's api key setting (Authorization: Bearer <key>). Keys start with sk-aiml-
- Models are named vendor/model, for example openai/gpt-5-mini or anthropic/claude-sonnet-4.6. The live list with prices is public: https://api.ai.ml/v1/models

Do this:
1. Look at the project: its language, framework and package manager, and whether it already calls an LLM (OpenAI, Anthropic or Gemini SDK, LangChain, Vercel AI SDK, LiteLLM or plain HTTP).
2. If it already uses one of those, keep it and change only the base URL and the key. Do not rewrite code that works. If it calls no LLM yet, add the OpenAI SDK for its language and one small client module the rest of the code can import.
3. Read the key from the environment variable AIML_API_KEY. Add AIML_API_KEY= to .env.example (create it if there is none), make sure .env is in .gitignore, and never write a real key into a file that is committed.
4. Choose the model from https://api.ai.ml/v1/models rather than guessing a name, and keep it in one place (a constant, or an AIML_MODEL environment variable with a default).
5. Add one quick way to check it works, such as a script or test that sends one short request and prints the reply, and tell me the command to run it.
6. Do not ask me to paste the key into this chat. When you are done, list the files you changed and tell me to create a key at https://console.ai.ml/keys and set AIML_API_KEY in .env or my shell.
In a terminal agent, from your project folder:

Stay up when a provider goes down

Failover is on by default. When a host times out or refuses, the request moves to the next host that serves the same model, before your user sees an error. You pay for the answer you got, never for the attempt that failed.

  • Hosts ranked by price, speed or uptime, your choice
  • Keep traffic in one region, or pin one host
  • Every response says which host served it and how long it took
Compare hosts for a model
anthropic/claude-sonnet-5.5Example
Host ASingaporestanding by
Host BUnited Statesstanding by
Host CEuropestanding by
Charged for1 answer, 0 failed attempts

Spend, keys and usage in one place

Prepaid credits, with no subscription. Give each key, project, team or person a daily and monthly budget, get an alert before it runs out, and stop at the cap. Usage, requests and invoices are in the console for the whole team.

  • Budgets per key, project, team and member
  • Rate limits and alerts before money runs out
  • A tax invoice for every top-up
See pricing
Production keyExample
Monthly budget$312 / $500
Alert at 80%Stops at 100%
Anthropic46%
OpenAI28%
DeepSeek17%
Google9%

Your data, your rules

Choose which providers may see your prompts, whether anything is kept, and where requests are processed. The rules are enforced on every request, whatever model it names.

  • Zero data retention
  • Single sign-on and SCIM
  • Region-locked routing
  • Audit log
  • Approvals for changes
  • Signed webhooks
Data policyExample
Zero data retention
Allow training on prompts
Processing regionAnyIndiaEUUS
Allowed makers

Bring your own provider keys

Already have an account with a provider? Add its key and requests to it go through your account, with ai.ml's routing, logs and budgets on top. About thirty providers, plus any OpenAI-compatible server.

How it works
  • Anthropic
  • OpenAI
  • Google
  • Azure OpenAI
  • Amazon Bedrock
  • Google Vertex AI
  • Groq
  • Together AI
  • Fireworks
  • DeepInfra
  • Mistral AI
  • Cohere
  • Perplexity
  • Cerebras
  • SambaNova
  • Hyperbolic
  • Nebius
  • Novita AI
  • NVIDIA
  • Hugging Face
  • Moonshot AI
  • MiniMax
  • Z.ai
  • Alibaba
  • DeepSeek
  • xAI
  • Cloudflare
  • OpenCode Zen
  • LiteLLM

Your coding tools, on every model

One command points Claude Code, Codex, Gemini CLI and OpenClaw at ai.ml, checks the key first, and can undo itself.

npx @aiml/cli setup
  • Claude Code
  • Codex
  • Gemini CLI
  • OpenClaw
  • Cursor
  • Cline

Start with one key

Create an account with your e-mail address, confirm it from the mail we send, and set up your organization.