Create chat completions
Generates a model response for the given conversation.
AuthorizationBearer <token>
API key is required to authorize requests. Obtain a key from your AtlasCloud dashboard.
In: header
Chat completion request payload
modelstring
The ID of the model to use for this request.
messagesarray<ChatMessage>
A list of messages comprising the conversation so far.
max_tokens?integer
The maximum number of tokens to generate in the completion.
temperature?number
Controls randomness: lowering results in less random completions.
Format
float
Range
0 <= value <= 2
top_p?number
Nucleus sampling: the model considers the results of the tokens with top_p probability mass.
Format
float
top_k?integer
The number of highest probability vocabulary tokens to keep for top-k-filtering.
repetition_penalty?number
Penalty for repeated tokens to prevent redundancy.
Format
float
stream?boolean
If set, partial message deltas will be sent as server-sent events.
Default
false
systemPrompt?string
An optional system prompt to guide the model's behavior.
thinking?object
Response Body
curl -X POST "https://api.atlascloud.ai/api/v1/chat/completions" \ -H "Content-Type: application/json" \ -d '{ "model": "deepseek-ai/DeepSeek-V3.1", "messages": [ { "role": "user", "content": "what is difference between http and https" } ], "max_tokens": 32767, "temperature": 1, "top_p": 0.9, "top_k": 50, "repetition_penalty": 1.1, "stream": false }'
{
"id": "chatcmpl-123",
"object": "chat.completion",
"created": 1677652288,
"model": "deepseek-ai/DeepSeek-V3.1",
"choices": [
{
"index": 0,
"message": {
"role": "user",
"content": "string"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 9,
"completion_tokens": 12,
"total_tokens": 21
}
}
Empty
Empty