Request Examples
Replace the AI provider domain with your gateway domain.
Prerequisites
- Receive the API Key from email in active status.
Domain Replacement Rules
Core Principle:Just replace the original domain with your gateway domain.
By Provider
Select your AI provider to see examples.
DeepSeek — Domain Replacement Rules
Original API URL
https://api.deepseek.com/chat/completionsGateway URL
https://api.tarogo.ai/chat/completionshttps://api.deepseek.com → https://api.tarogo.ai/chat/completions
Code Examples
Replace YOUR_API_KEY with your actual API Key.
curl -X POST https://api.tarogo.ai/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-chat@deepseek",
"messages": [
{
"role": "user",
"content": "你好,请介绍一下自己"
}
],
"stream": false
}'Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model name with optional @supplier_type suffix. |
| messages | array | Yes | Conversation message list. |
| stream | boolean | No | Streaming response. Default is false. |
Response Example
JSON Response
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1234567890,
"model": "deepseek-chat@deepseek",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "你好!我是 AI 助手,很高兴为您服务..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 10,
"completion_tokens": 50,
"total_tokens": 60
}
}Important Notes
- Ensure API Key is correct and active
- Ensure models are enabled for the supplier
- Use "Bearer YOUR_API_KEY" for Authorization
- Set Content-Type to application/json
- Only the domain changes; everything else stays the same
FAQ
Q: Received a 401 error
A: Check if your API Key is correct.
Q: Received a 404 error
A: Check if the domain is correctly concatenated.
Q: Received a 429 error
A: Check your Key's RPM and TPM limits.
Q: How to switch models?
A: Change the model field in the request body.
Q: Which providers are supported?
A: All OpenAI API-compatible providers.