Drop-in /v1 endpoints

OpenAI-Compatible API

Drop-in /v1 endpoints for chat, completions, and images. Works with any OpenAI SDK in any language — zero code changes beyond base_url and api_key, with every major model behind one key.

GPT · Gemini · Claude · DeepSeek · Seedance — one key, one invoice · no credit card to start

Sample output pricing

GPT-5 / 1M tokens$6.67$10.00
Claude Opus 4 / 1M tokens$10.00$15.00
Gemini 2.5 Pro / 1M tokens$6.67$10.00

* Illustrative pricing — see the flatkey pricing page for live rates.

Zero code changes beyond base_url + key
Python
from openai import OpenAI

client = OpenAI(
    base_url="https://router.flatkey.ai/v1",
    api_key="YOUR_FLATKEY_KEY",
)

response = client.chat.completions.create(
    model="gpt-5",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)
curl
curl https://router.flatkey.ai/v1/chat/completions \
  -H "Authorization: Bearer $FLATKEY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

Standard /v1 surface

chat/completions, embeddings, and images/generations behave exactly like the OpenAI API — same request and response shapes.

Any OpenAI SDK

Python, Node.js, Go, LangChain, LlamaIndex, Vercel AI SDK — anything that speaks the OpenAI protocol works unchanged.

Every model, same protocol

Call GPT, Gemini, Claude, DeepSeek, and Seedance through the identical OpenAI-compatible interface — only the model id changes.

Production-grade routing

Health-checked upstreams, automatic retries, and live pricing behind the same stable endpoint.

OpenAI-Compatible API

Drop-in /v1 endpoints for chat, completions, and images. Works with any OpenAI SDK in any language — zero code changes beyond base_url and api_key, with every major model behind one key.

Get your API key

GPT · Gemini · Claude · DeepSeek · Seedance — one key, one invoice · no credit card to start

Do I have to change my code?

No. flatkey.ai is OpenAI-compatible: keep your existing OpenAI SDK and switch base_url plus api_key. Model ids stay the same.

How is billing handled across models?

One prepaid balance covers every model. Usage analytics and a single invoice keep spend bounded before you scale.