Chat Completions
Create a chat completion using a supported Zora GPT/Codex model. This endpoint is compatible with the OpenAI Chat Completions API.
POST/v1/chat/completions
Request Body
| Parameter | Type | Required | Description |
|---|
model | string | Yes | Model ID to use, such as gpt-5.5 or gpt-5.4-mini |
messages | array | Yes | List of message objects |
effort | string | No | Reasoning effort for text models: low, medium, high, or xhigh |
reasoning_effort | string | No | Alias for effort |
temperature | number | No | Sampling temperature (0-2) |
max_tokens | integer | No | Maximum tokens to generate |
stream | boolean | No | Enable streaming response |
top_p | number | No | Nucleus sampling parameter |
Example Request
curl https://api.zora.io.vn/v1/chat/completions \
-H "Authorization: Bearer YOUR_ZORA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is machine learning?"}
],
"effort": "medium",
"temperature": 0.7,
"max_tokens": 1000,
"stream": false
}'
$body = @{
model = "gpt-5.5"
messages = @(
@{ role = "system"; content = "You are a helpful assistant." }
@{ role = "user"; content = "What is machine learning?" }
)
effort = "medium"
temperature = 0.7
stream = $false
} | ConvertTo-Json -Depth 5
Invoke-WebRequest `
-Uri "https://api.zora.io.vn/v1/chat/completions" `
-Method POST `
-Headers @{ Authorization = "Bearer YOUR_ZORA_API_KEY" } `
-ContentType "application/json" `
-Body $body
Model access
A
401 invalid_api_key response means the key is missing, mistyped, masked, revoked, or from an older disabled key. First verify the same key with
GET /v1/models. A
403 model_not_allowed response means the key is valid, but the selected model is not enabled on that plan. Start with
gpt-5.5 or another model listed in
Models for the account tier.
Response
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1710000000,
"model": "gpt-5.5",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Machine learning is a subset of AI..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 25,
"completion_tokens": 150,
"total_tokens": 175
}
}
Streaming
Set stream: true to receive responses as Server-Sent Events (SSE). Each chunk contains a delta object with the incremental content:
data: {"id":"chatcmpl-abc123","choices":[{"delta":{"content":"Machine"}}]}
data: {"id":"chatcmpl-abc123","choices":[{"delta":{"content":" learning"}}]}
data: {"id":"chatcmpl-abc123","choices":[{"delta":{"content":" is"}}]}
...
data: [DONE]