Documentation
Getting Started
Four steps to get started:
1. Create an account — Sign up at manage.callaiapi.com
2. Add balance — Top up via USDT or Alipay/WeChat in the "Top Up" page
3. Create an API Key — Go to "API Keys" and click "New"
4. Make your first request — Just swap the base_url to our gateway
# Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
api_key="csk-your-api-key",
base_url="https://claude.callaiapi.com/v1",
)
response = client.chat.completions.create(
model="claude-sonnet-4-20250514",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)
// Node.js (OpenAI SDK)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "csk-your-api-key",
baseURL: "https://claude.callaiapi.com/v1",
});
const response = await client.chat.completions.create({
model: "claude-sonnet-4-20250514",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);
# cURL
curl https://openai.callaiapi.com/v1/chat/completions \
-H "Authorization: Bearer csk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Hello!"}]
}'
---
CallStack AI Gateway is fully compatible with the OpenAI API specification. Integration requires only a base URL change — no code modifications needed.
Endpoint Configuration
Each model provider has a dedicated gateway endpoint:
claude.callaiapi.com
openai.callaiapi.com
gemini.callaiapi.com
deepseek.callaiapi.com
Authentication
All requests require an API key in the Authorization header:
Authorization: Bearer csk-your-api-key
API keys can be managed through the admin dashboard or via the management API.
Compatibility
The gateway accepts requests in standard OpenAI API format. Any SDK, framework, or tool that supports OpenAI can be used directly:
| Framework | Configuration |
|---|---|
| OpenAI Python SDK | Set base_url parameter |
| OpenAI Node.js SDK | Set baseURL option |
| LangChain | Set base_url on ChatOpenAI |
| Vercel AI SDK | Set baseURL on createOpenAI |
| LlamaIndex | Set api_base on OpenAI LLM |
| cURL / HTTP | Replace the request URL |
Available Models
| Model | Identifier | Endpoint |
|---|---|---|
| Claude Opus 4 | claude-opus-4-20250514 | claude.callaiapi.com |
| Claude Sonnet 4 | claude-sonnet-4-20250514 | claude.callaiapi.com |
| GPT-4o | gpt-4o | openai.callaiapi.com |
| GPT-4o Mini | gpt-4o-mini | openai.callaiapi.com |
| o3 | o3 | openai.callaiapi.com |
| Gemini 2.5 Pro | gemini-2.5-pro | gemini.callaiapi.com |
| DeepSeek V3 | deepseek-chat | deepseek.callaiapi.com |
| DeepSeek R1 | deepseek-reasoner | deepseek.callaiapi.com |
For the full model catalog, see Supported Models.
API Reference
Chat Completions
POST /v1/chat/completions
Standard OpenAI Chat Completions format. Supports streaming, function calling, and multimodal inputs (model-dependent).
Models
GET /v1/models
Returns the list of models available on the specified gateway endpoint.
Embeddings
POST /v1/embeddings
Generate vector embeddings using supported embedding models.
Rate Limits
| Plan | Requests/min | Tokens/min |
|---|---|---|
| Starter | 60 | 100,000 |
| Professional | 300 | 500,000 |
| Enterprise | Custom | Custom |
Error Codes
| Code | Description | Resolution |
|---|---|---|
| 401 | Authentication failed | Verify API key |
| 403 | Insufficient permissions | Check key scope and model access |
| 429 | Rate limit exceeded | Reduce request frequency or upgrade plan |
| 500 | Internal server error | Retry or contact support |
| 503 | Upstream unavailable | Upstream model temporarily unavailable |
Support
For technical assistance, contact our engineering team:
- Email: [email protected]
- Enterprise: Dedicated Slack channel (Enterprise plan)