Make your first request in a few minutes with an OpenAI-compatible API.
Sign in, open the API Keys page in your dashboard, and generate a key. Copy it once and store it securely — it's shown only at creation.
Use the Bayon base URL with your platform key. Any OpenAI-compatible client works out of the box.
https://api.bayon.dev/v1Send a request to /v1/chat/completions and change the model string to route to any family.
curl https://api.bayon.dev/v1/chat/completions \
-H "Authorization: Bearer $BAYON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5",
"messages": [
{ "role": "user", "content": "Hello from Bayon!" }
],
"stream": false
}'import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.BAYON_API_KEY,
baseURL: "https://api.bayon.dev/v1",
});
const completion = await client.chat.completions.create({
model: "gpt-5",
messages: [{ role: "user", content: "Hello from Bayon!" }],
});
console.log(completion.choices[0].message.content);For Claude models you can also use the Anthropic-style messages endpoint.
curl https://api.bayon.dev/v1/messages \
-H "x-api-key: $BAYON_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-5",
"max_tokens": 1024,
"messages": [
{ "role": "user", "content": "Hello, Claude!" }
]
}'