Документация по API шлюза
Быстрый старт, авторизация, примеры кода (cURL, Python, Node.js) и подключение к VS Code.
docs.quickstart
docs.apiDesc
docs.codeExamples
docs.codeDesc
cURL
curl https://your-gateway-host/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer GW_API_KEY" \
-d '{
"model": "deepseek-v4-flash:0731-cloud",
"messages": [
{"role": "system", "content": "You are a helpful coding assistant."},
{"role": "user", "content": "Write a hello world function in TypeScript."}
],
"stream": true
}'Подключение к VS Code и редакторам
Настройте работу ваших любимых AI-ассистентов в редакторе кода с помощью шлюза.
Откройте настройки Continue (~/.continue/config.json) и добавьте модель с параметрами шлюза: (~/.continue/config.json):
~/.continue/config.json
{
"models": [
{
"title": "Gateway - DeepSeek V4",
"provider": "openai",
"model": "deepseek-v4-flash:0731-cloud",
"apiBase": "https://your-gateway-host/v1",
"apiKey": "YOUR_GATEWAY_API_KEY"
},
{
"title": "Gateway - Claude 3.5 Sonnet",
"provider": "openai",
"model": "claude-3-5-sonnet",
"apiBase": "https://your-gateway-host/v1",
"apiKey": "YOUR_GATEWAY_API_KEY"
}
]
}docs.endpoints
docs.endpointsDesc
| docs.tableMethod | docs.tableEndpoint | docs.tableDescription |
|---|---|---|
| POST | /v1/chat/completions | docs.chatDesc |
| GET | /v1/models | docs.modelsDesc |