API Endpoints
Complete reference for all DeepAILab API endpoints. Each endpoint includes parameters, code examples, and response formats.
https://api.deepailab.ai/v1/chat/completionsCreate Chat Completion#
Create a model response through the DeepAILab OpenAI-compatible gateway.
Request body
| Parameter | Required | Complete reference for all DeepAILab API endpoints. Each endpoint includes parameters, code examples, and response formats. |
|---|---|---|
modelstring | Required | Model identifier from /v1/models/catalog. |
messagesarray | Required | Conversation messages in OpenAI-compatible format. |
streamboolean | Optional | Set true to stream response chunks. |
modelRequiredModel identifier from /v1/models/catalog.
messagesRequiredConversation messages in OpenAI-compatible format.
streamOptionalSet true to stream response chunks.
Example request
curl https://api.deepailab.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DEEPAILAB_API_KEY" \
-d '{
"model": "deepseek-chat",
"messages": [
{"role": "user", "content": "Explain my current API usage."}
]
}'Response
{
"id": "chatcmpl_123",
"object": "chat.completion",
"model": "deepseek-chat",
"choices": [
{
"index": 0,
"message": {"role": "assistant", "content": "Your current usage..."},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 18,
"completion_tokens": 42,
"total_tokens": 60
}
}https://api.deepailab.ai/v1/responsesCreate Response#
Create a response with DeepAILab's OpenAI-compatible Responses surface.
Request body
| Parameter | Required | Complete reference for all DeepAILab API endpoints. Each endpoint includes parameters, code examples, and response formats. |
|---|---|---|
modelstring | Required | Model identifier from the current catalog. |
inputstring | array | Required | User input or structured response input. |
streamboolean | Optional | Set true to stream events. |
modelRequiredModel identifier from the current catalog.
inputRequiredUser input or structured response input.
streamOptionalSet true to stream events.
Example request
curl https://api.deepailab.ai/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DEEPAILAB_API_KEY" \
-d '{
"model": "deepseek-chat",
"input": "Summarize the latest API error for this account."
}'Response
{
"id": "resp_123",
"object": "response",
"model": "deepseek-chat",
"output_text": "The latest API error was caused by...",
"usage": {
"input_tokens": 16,
"output_tokens": 38,
"total_tokens": 54
}
}https://api.deepailab.ai/v1/models/catalogList Model Catalog#
Return the current DeepAILab model catalog with provider, routing, and pricing metadata.
Request body
| Parameter | Required | Complete reference for all DeepAILab API endpoints. Each endpoint includes parameters, code examples, and response formats. |
|---|---|---|
providerstring | Optional | Filter by provider name. |
searchstring | Optional | Search model ids, names, or provider labels. |
providerOptionalFilter by provider name.
searchOptionalSearch model ids, names, or provider labels.
Example request
curl https://api.deepailab.ai/v1/models/catalog \
-H "Authorization: Bearer $DEEPAILAB_API_KEY"Response
{
"object": "list",
"data": [
{
"id": "deepseek-chat",
"provider": "DeepSeek",
"context_window": 64000,
"pricing": {"input_per_1m": 0.27, "output_per_1m": 1.1}
}
]
}https://api.deepailab.ai/v1/usageList Usage Records#
Returns token usage records for API keys, product calls, and Dev Tools access under the current account.
Request body
| Parameter | Required | Complete reference for all DeepAILab API endpoints. Each endpoint includes parameters, code examples, and response formats. |
|---|---|---|
modelstring | Optional | Filter records by model identifier. |
limitinteger | Optional | Number of records to return (default: 20, max: 100). |
afterstring | Optional | Cursor for pagination. Use the id of the last usage record from the previous request. |
modelOptionalFilter records by model identifier.
limitOptionalNumber of records to return (default: 20, max: 100).
afterOptionalCursor for pagination. Use the id of the last usage record from the previous request.
Example request
curl "https://api.deepailab.ai/v1/usage?limit=10" \
-H "Authorization: Bearer $DEEPAILAB_API_KEY"Response
{
"object": "list",
"data": [
{
"id": "usage_123",
"object": "usage_record",
"model": "claude-sonnet-4-6",
"source": "api_key",
"input_tokens": 1200,
"output_tokens": 480,
"total_tokens": 1680,
"created_at": 1698765432,
"cost_usd": 0.0124
}
],
"has_more": true
}