Make your first completion.
Send a POST request to the Chat Completions endpoint. Ox Alpha uses the model identifier stealth/ox-alpha.
https://tokenra.io/v1/chat/completionsSet the required headers.
Pass your Tokenra API key as a Bearer token. The request body must be JSON. HTTP-Referer and X-Title are optional metadata headers for provider rankings.
Send messages and enable reasoning.
Use an array of messages in the familiar OpenAI chat format. Set reasoning.enabled to true when you want the model to return reasoning details.
{
"model": "stealth/ox-alpha",
"messages": [
{
"role": "user",
"content": "What AI model are you?"
}
],
"reasoning": {
"enabled": true
}
}Request parameters.
Only model and messages are required for a basic completion. Add reasoning and generation controls as your application needs them.
| Name | Type | Default | Description |
|---|---|---|---|
| model required | string | — | Set to stealth/ox-alpha. |
| messages required | array | — | Conversation messages with a role and content. |
| reasoning | object | — | Controls reasoning behavior. Set enabled to true to request reasoning details. |
| max_tokens | integer | — | Maximum number of tokens the model may generate. |
| temperature | float | 1 | Controls sampling variety in the generated response. |
| top_p | float | 0.95 | Limits sampling to the most likely cumulative token mass. |
| tools | array | — | Tool definitions following the OpenAI tool calling format. |
| tool_choice | string or object | — | Controls whether and which tool the model calls. |
| top_k | integer | 0 | Limits the number of candidate tokens considered at each step. |
| response_format | object | — | Requests a specific output format when supported. |
Read the assistant response.
A successful completion contains the generated message in choices[0].message.content. When reasoning is enabled, inspect reasoning and reasoning_details in the message.
{
"id": "gen-1787298854-P6E9CphWvR6pCRwxXa3j",
"object": "chat.completion",
"created": 1787298854,
"model": "stealth/ox-alpha",
"provider": "Stealth",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "I am **ox-alpha**, an AI language model developed by an undisclosed organization.\n\nIs there something I can help you with today?",
"refusal": null,
"reasoning": "The user is asking about my identity as an AI model. According to my instructions, I should identify myself strictly as \\"ox-alpha\\", developed by an undisclosed organization.",
"reasoning_details": [
{
"type": "reasoning.text",
"text": "The user is asking about my identity as an AI model...",
"format": "unknown",
"index": 0
}
]
}
}
],
"usage": {
"prompt_tokens": 93,
"completion_tokens": 62,
"total_tokens": 155,
"cost": 0,
"is_byok": false,
"prompt_tokens_details": { "cached_tokens": 64, "cache_write_tokens": 0, "audio_tokens": 0, "video_tokens": 0 },
"cost_details": { "upstream_inference_cost": 0, "upstream_inference_prompt_cost": 0, "upstream_inference_completions_cost": 0 },
"completion_tokens_details": { "reasoning_tokens": 0, "image_tokens": 0, "audio_tokens": 0 }
}
}choices[].message.content
The generated assistant response for the requested completion.
choices[].message.reasoning
Reasoning text returned when reasoning is enabled and available.
usage.total_tokens
Total tokens consumed by the request, including prompt and completion tokens.
choices[].finish_reason
Why generation stopped, such as stop or a token limit.