Request
Bearer token with your API key
Body - Direct Messages Mode (OpenAI Compatible)
model
string
default: "60db-tiny"
The model to use for completion
Array of message objects with role and content
Enable streaming response (Server-Sent Events)
Top-k sampling parameter for response generation
Template configuration options
chat_template_kwargs.enable_thinking
Enable thinking mode in the model
Array of tool/function definitions for function calling
Body - Enhanced Text Correction Mode
The text to correct/improve
Array of term-replacement pairs for custom corrections
The term to find and replace
Style configuration for text correction
Tone to apply (e.g., “professional”, “casual”, “friendly”)
Automatically capitalize sentences
Whether to use contractions (false to expand them)
style.expandAbbreviations
Expand abbreviations to full form
Application context (e.g., “email”, “chat”, “document”)
Save conversation to chat history
Existing chat ID to continue conversation
Response
Array of completion choices
The generated message with role and content
Streaming delta with incremental content (stream mode only)
ID of the chat session (for new chats)
Total tokens used in the request
Response time in milliseconds
cURL
cURL
cURL
JavaScript
Python
# Direct Messages Mode (OpenAI Compatible)
curl --location 'https://api.60db.ai/v1/chat/completions' \
--header 'Authorization: Bearer your-api-key' \
--header 'Content-Type: application/json' \
--data '{
"model": "60db-tiny",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "How are you? How can I improve my English communication?"
}
],
"top_k": 20,
"chat_template_kwargs": {
"enable_thinking": false
},
"stream": true
}'
Response (Non-Streaming)
Response (Streaming - SSE)
{
"id" : "chatcmpl-123" ,
"object" : "chat.completion" ,
"created" : 1677652288 ,
"model" : "60db-tiny" ,
"choices" : [
{
"index" : 0 ,
"message" : {
"role" : "assistant" ,
"content" : "I'm doing well, thank you! Here are some tips to improve your English communication skills..."
},
"finish_reason" : "stop"
}
],
"usage" : {
"prompt_tokens" : 25 ,
"completion_tokens" : 150 ,
"total_tokens" : 175
},
"chat_id" : "550e8400-e29b-41d4-a716-446655440000" ,
"response_time_ms" : 1250
}
Streaming Response
Server-Sent Events Format
Function Calling with Tools
Text Correction Features
Define custom term replacements that will always be applied: {
"dictionary" : [
{ "term" : "pls" , "replacement" : "please" },
{ "term" : "thx" , "replacement" : "thanks" },
{ "term" : "ASAP" , "replacement" : "as soon as possible" }
]
}
Up to 100 dictionary entries are supported, each with a maximum length of 200 characters.
Configure how the text should be corrected and styled: Option Type Description tonestring Target tone: “professional”, “casual”, “friendly” autoCapitalizeboolean Automatically capitalize first letter of sentences autoPunctuateboolean Add proper punctuation marks useContractionsboolean Set to false to expand contractions (can’t → cannot) expandAbbreviationsboolean Expand common abbreviations
Provide context to help the model adjust its corrections: {
"appContext" : "email"
}
Supported contexts: “email”, “chat”, “document”, “message”, “social”
Token costs are calculated based on usage. The current rate is approximately
$0.00002 per token. Costs are deducted from your workspace billing balance.
Chat history is automatically saved when save_chat: true. Use chat_id to
continue existing conversations or create new chats by omitting this
parameter.