Quick start
You will be making calls in about a minute.
1Create an API key
Sign in, open the console and create a key. It is shown once — store it somewhere safe.
2Point your client at the base URL
Any OpenAI-compatible client works. Only the base URL and key change.
- Base URL
- https://api.voyai.net/v1
3Make a call
curl https://api.voyai.net/v1/chat/completions \
-H "Authorization: Bearer $VOYAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-ai/DeepSeek-V3.2",
"messages": [{"role": "user", "content": "Hello"}]
}'import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.voyai.net/v1",
api_key=os.environ["VOYAI_API_KEY"],
)
resp = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V3.2",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.voyai.net/v1",
apiKey: process.env.VOYAI_API_KEY,
});
const resp = await client.chat.completions.create({
model: "deepseek-ai/DeepSeek-V3.2",
messages: [{ role: "user", content: "Hello" }],
});
console.log(resp.choices[0].message.content);Streaming
Set stream: true. Responses arrive as standard SSE chunks, and usage is reported in the final chunk so your bill matches exactly what was generated.
stream = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V3.2",
messages=[{"role": "user", "content": "Write a haiku"}],
stream=True,
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")Errors
Errors follow the OpenAI error shape, so existing error handling keeps working.
| Code | Meaning |
|---|---|
| 401 | API key is missing, invalid or expired. |
| 402 | Balance exhausted, or this key hit its spend limit. |
| 404 | Unknown model ID, or the key is not permitted to use it. |
| 429 | Rate limit or concurrency limit reached. Back off and retry. |
| 503 | All upstream channels for this model are down. Retry shortly. |