API Reference
Creates a model completion response for the provided chat conversation history. Supports multi-turn context, streaming, and tool execution.
https://api.cortiqa.co/api/v1/chat/completions| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer sk-cortiqa-... |
Content-Type | string | Yes | application/json |
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | ID of the model to use, e.g. openai/gpt-oss-120b. |
messages | array | Yes | A list of message objects with role and content. |
temperature | number | No | Sampling temperature between 0.0 and 2.0 (default: 0.7). |
stream | boolean | No | If true, returns Server-Sent Events delta tokens. Default: false. |
max_tokens | integer | No | Maximum output tokens to generate (up to 4,096). |
tools | array | No | List of tool definitions available to the model. |
curl https://api.cortiqa.co/api/v1/chat/completions \
-H "Authorization: Bearer sk-cortiqa-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-oss-120b",
"messages": [
{"role": "system", "content": "You are a helpful assistant powered by Cortiqa."},
{"role": "user", "content": "Explain microservices in 1 sentence."}
],
"temperature": 0.7
}'{
"id": "chatcmpl-91b4ca",
"object": "chat.completion",
"created": 1726982400,
"model": "openai/gpt-oss-120b",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Microservices are an architectural approach where an application is composed of small, independently deployable services communicating over lightweight APIs."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 24,
"completion_tokens": 28,
"total_tokens": 52
}
}