chat
Create chat completion
Creates a model response for the given chat conversation.
The conversation is provided as an array of messages, where each message has a role (system, user, assistant, or tool) and content.
Set stream: true to receive partial responses as server-sent events.
post/chat/completions
Request body
Example request
{
"max_tokens": 256,
"messages": [
{
"content": "You are a helpful assistant.",
"role": "system"
},
{
"content": "What is a doubleword?",
"role": "user"
}
],
"model": "Qwen/Qwen3-30B-A3B-FP8",
"temperature": 0.7
}Response
Chat completion generated successfully. When streaming, returns a series of SSE events.
Example response
{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "A doubleword is a data unit that is twice the size of a standard word in computer architecture, typically 32 or 64 bits depending on the system.",
"role": "assistant"
}
}
],
"created": 1703187200,
"id": "chatcmpl-abc123",
"model": "Qwen/Qwen3-30B-A3B-FP8",
"object": "chat.completion",
"usage": {
"completion_tokens": 36,
"prompt_tokens": 24,
"total_tokens": 60
}
}Changes
No recorded changes to this endpoint across all 1 revision of this API.