Quick Start
Get started with the AI API Gateway in minutes. Our API is fully compatible with the OpenAI SDK — just change the base URL.
1. Get Your API Key
API keys are managed through the admin panel. Contact your administrator to get your key.
2. Make Your First Request
cURL
curl {{ apiBase }}/v1/chat/completions \
-H "Authorization: Bearer sk-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-chat",
"messages": [
{"role": "user", "content": "Hello, how are you?"}
]
}'3. OpenAI SDK Compatibility
If you're already using the OpenAI SDK, simply change the baseURL:
Python
from openai import OpenAI
client = OpenAI(
api_key="sk-YOUR_API_KEY",
base_url="{{ apiBase }}/v1"
)
response = client.chat.completions.create(
model="deepseek-chat",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)Node.js
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'sk-YOUR_API_KEY',
baseURL: '{{ apiBase }}/v1',
});
const response = await client.chat.completions.create({
model: 'deepseek-chat',
messages: [{ role: 'user', content: 'Hello!' }],
});
console.log(response.choices[0].message.content);