API Documentation
60% cheaper AI API with OpenAI-compatible endpoints. Premium models at a fraction of the cost.
⚡ Connect Any App in 3 Steps
Works with any app that supports OpenAI or OpenAI Compatible connection. Just 3 simple changes:
Change Base URL
Set your base URL to:
https://dash.codestorex.com/v1🚀 Quick Start
Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
base_url="https://dash.codestorex.com/v1",
api_key="your-api-key"
)
response = client.chat.completions.create(
model="openai/gpt-4o",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)cURL
curl https://dash.codestorex.com/v1/chat/completions \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-4o",
"messages": [{"role": "user", "content": "Hello!"}]
}'🔒 Authentication
All API requests require an API key sent in the Authorization header:
Authorization: Bearer your-api-keyGet your API key from your account dashboard.
🌐 Base URL
https://dash.codestorex.com/v1This is a drop-in replacement for the OpenAI API. Simply change your base_url and API key.
🤖 Available Models
We support all major AI models. Visit Models page for the full list with pricing.
| Model ID | Provider | Context | Input/1M | Output/1M |
|---|---|---|---|---|
| openai/gpt-4o | OpenAI | 128k | $0.60 | $1.80 |
| anthropic/claude-sonnet-4.6 | Anthropic | 1000k | $1.60 | $6.00 |
| google/gemini-3 | 1000k | $0.80 | $5.00 | |
| deepseek/deepseek-v3.2 | DeepSeek | 164k | $0.40 | $0.60 |
💬 Chat Completions
/v1/chat/completionsRequest Body
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID (e.g. "openai/gpt-4o") |
messages | array | Yes | Array of message objects |
stream | boolean | No | Enable streaming (default: false) |
temperature | number | No | Sampling temperature (0-2) |
max_tokens | integer | No | Maximum tokens to generate |
⛰ Streaming
Set stream: true to receive Server-Sent Events (SSE):
response = client.chat.completions.create(
model="openai/gpt-4o",
messages=[{"role": "user", "content": "Hello!"}],
stream=True
)
for chunk in response:
print(chunk.choices[0].delta.content, end="")💻 Claude Code Integration
Setup Claude Code
Configure Claude Code to use CodeStoreX as your API provider:
export ANTHROPIC_BASE_URL=https://dash.codestorex.com/v1
export ANTHROPIC_API_KEY=your-api-key
claude💻 Codex CLI
Setup Codex CLI
export OPENAI_BASE_URL=https://dash.codestorex.com/v1
export OPENAI_API_KEY=your-api-key
codex💻 Roo Code (VS Code)
Setup Roo Code
In Roo Code settings, set:
- Provider:
OpenAI Compatible - Base URL:
https://dash.codestorex.com/v1 - API Key:
your-api-key - Model:
openai/gpt-4o(or any model)
📝 Code Examples
Node.js
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://dash.codestorex.com/v1',
apiKey: 'your-api-key'
});
const response = await client.chat.completions.create({
model: 'openai/gpt-4o',
messages: [{ role: 'user', content: 'Hello!' }]
});
console.log(response.choices[0].message.content);💰 Pricing
All models are available at 60% off official API pricing. See Pricing page for plans and Models page for per-token costs.
❓ FAQ
Is this compatible with OpenAI SDK?
Yes! Just change your base_url and api_key. Works with any OpenAI-compatible library.
What models are supported?
We support OpenAI, Anthropic Claude, Google Gemini, DeepSeek, and more. See all models.
Is streaming supported?
Yes, full SSE streaming is supported for all models.