Getting started
Quickstart
First token in under a minute. One key, every model, OpenAI-compatible.
OpenKey is an OpenAI-compatible API. If your code talks to OpenAI, it talks to OpenKey — change the base URL and the key, keep everything else.
1. Get a key
Create a key from your dashboard. Keys are scoped, revocable, and never logged in plaintext.
2. Make a request
curl https://api.openkey.ai/v1/chat/completions \
-H "Authorization: Bearer $OPENKEY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-4.5",
"messages": [{"role": "user", "content": "Say hello."}]
}'
Python (official OpenAI SDK):
from openai import OpenAI
client = OpenAI(
base_url="https://api.openkey.ai/v1",
api_key=os.environ["OPENKEY_API_KEY"],
)
resp = client.chat.completions.create(
model="deepseek/deepseek-v3.2",
messages=[{"role": "user", "content": "Say hello."}],
)
print(resp.choices[0].message.content)
TypeScript:
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.openkey.ai/v1',
apiKey: process.env.OPENKEY_API_KEY,
});
const resp = await client.chat.completions.create({
model: 'openai/gpt-5-mini',
messages: [{ role: 'user', content: 'Say hello.' }],
});
3. Switch models by changing one string
Every model on the catalog is addressed as lab/model-slug. Same request shape for all of them. Streaming, tool calling, structured outputs, and vision work wherever the underlying model supports them — each model page lists exactly what’s supported.
What you pay
Provider list price + 3% flat. The math is on every model page and on /pricing. No credit-purchase fees, no spread between quoted and billed price.