Up and running in 4 steps
ClaudeKeys is a drop-in replacement for the OpenAI API. Point your existing client at https://claudekeys.store/v1, use your ClaudeKeys key, and pick any model ID.
claudekeys.store/v1 in any OpenAI client./chat/completions.model string. That's it.Get an API key
Create an account at claudekeys.store, generate an API key, and keep it secret. Store it in an environment variable rather than in your code:
export ClaudeKeys_API_KEY="YOUR_API_KEY"
Send the key as a Bearer token on every request: Authorization: Bearer $ClaudeKeys_API_KEY.
Make your first request
Use the official OpenAI SDK (or plain HTTP) — only the base URL and key change.
# pip install openai import os from openai import OpenAI client = OpenAI( base_url="https://claudekeys.store/v1", api_key=os.environ["ClaudeKeys_API_KEY"], ) response = client.chat.completions.create( model="claude-sonnet-5", messages=[{"role": "user", "content": "Hello!"}], ) print(response.choices[0].message.content)
// npm install openai import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://claudekeys.store/v1", apiKey: process.env.ClaudeKeys_API_KEY, }); const response = await client.chat.completions.create({ model: "claude-sonnet-5", messages: [{ role: "user", content: "Hello!" }], }); console.log(response.choices[0].message.content);
curl https://claudekeys.store/v1/chat/completions \ -H "Authorization: Bearer $ClaudeKeys_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "claude-sonnet-5", "messages": [{"role": "user", "content": "Hello!"}] }'
Switch models with one string
Every model ID in the model list works with the same code. Change model and nothing else:
for model in ["gpt-5.6-sol", "gemini-3.1-pro", "deepseek-v4-pro-max"]: r = client.chat.completions.create( model=model, messages=[{"role": "user", "content": "Explain recursion in one line."}], ) print(model, "→", r.choices[0].message.content)
for (const model of ["gpt-5.6-sol", "gemini-3.1-pro", "deepseek-v4-pro-max"]) { const r = await client.chat.completions.create({ model, messages: [{ role: "user", content: "Explain recursion in one line." }], }); console.log(model, "→", r.choices[0].message.content); }
# Only the "model" value changes curl https://claudekeys.store/v1/chat/completions \ -H "Authorization: Bearer $ClaudeKeys_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "gemini-3.1-pro", "messages": [{"role": "user", "content": "Hi"}]}'
Streaming
Set stream=True to receive tokens as server-sent events. Available on every model (⚡ Streaming).
stream = client.chat.completions.create( model="gpt-5.6-luna", messages=[{"role": "user", "content": "Write a haiku about APIs."}], stream=True, ) for chunk in stream: print(chunk.choices[0].delta.content or "", end="")
const stream = await client.chat.completions.create({ model: "gpt-5.6-luna", messages: [{ role: "user", content: "Write a haiku about APIs." }], stream: true, }); for await (const chunk of stream) { process.stdout.write(chunk.choices[0]?.delta?.content ?? ""); }
curl https://claudekeys.store/v1/chat/completions \ -H "Authorization: Bearer $ClaudeKeys_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "gpt-5.6-luna", "stream": true, "messages": [{"role": "user", "content": "Write a haiku about APIs."}]}'
Vision
Models tagged 🖼️ Vision accept image input. Pass an image_url part alongside your text.
response = client.chat.completions.create( model="gemini-3.7-flash", messages=[{ "role": "user", "content": [ {"type": "text", "text": "What is in this image?"}, {"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}}, ], }], )
Tools (function calling)
Models tagged 🔧 Tools can call functions you define. Describe them in tools and the model returns tool_calls when it wants one run.
tools = [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather for a city",
"parameters": {
"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"],
},
},
}]
response = client.chat.completions.create(
model="claude-opus-5.5",
messages=[{"role": "user", "content": "Weather in Mumbai?"}],
tools=tools,
)
print(response.choices[0].message.tool_calls)
JSON output
Models tagged 📄 JSON support structured JSON output. Ask for it with response_format:
response = client.chat.completions.create( model="qwen3.8-max", messages=[{"role": "user", "content": "List 3 colors as JSON."}], response_format={"type": "json_object"}, )
Errors
Errors use standard HTTP status codes.
| Status | Meaning | What to do |
|---|---|---|
401 | Missing or invalid API key | Check the Authorization header. |
404 | Unknown model ID | Use an ID from the list or GET /v1/models. |
429 | Too many requests | Back off and retry. |
5xx | Temporary server problem | Retry after a short delay. |
Models API
List every available model, with its capabilities, at runtime:
for m in client.models.list(): print(m.id)
const models = await client.models.list(); for await (const m of models) console.log(m.id);
curl https://claudekeys.store/v1/models \
-H "Authorization: Bearer $ClaudeKeys_API_KEY"
Capabilities are returned by GET /v1/models, so your code can check them at runtime.
33 models, one endpoint
Tap a model ID to copy it. Prices are per 1M tokens.
What the capabilities mean
Capabilities are returned by GET /v1/models, so your code can check them at runtime. See the Models API.