API Documentation
OpenAI-compatible API. Change your base_url and you are ready to go.
Quick Start
Python (OpenAI SDK)
import openai
openai.api_key = "sk-your-key"
openai.base_url = "https://your-domain.com/v1"
response = openai.chat.completions.create(
model="deepseek-v4-pro",
messages=[
{"role": "user", "content": "Hello, how are you?"}
]
)
print(response.choices[0].message.content)cURL
curl https://your-domain.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-key" \
-d '{
"model": "deepseek-v4-pro",
"messages": [{"role": "user", "content": "Hello!"}]
}'Available Models
| Model ID | Price | Description |
|---|---|---|
| glm-4-flash | $0.20/M | Fast & cheap, great for chatbots |
| qwen-plus | $0.50/M | Balanced performance, daily use |
| deepseek-pro | $1.00/M | Best reasoning, coding tasks |
Tips
- ✓Always store your API key securely, never expose it in client-side code
- ✓Use environment variables for your API key
- ✓Monitor your usage on the Dashboard
- ✓Set a budget alert to avoid unexpected charges