Responses API
POST https://tokuse.com/v1/responses follows the OpenAI Responses API. You send the conversation as input, and the generated text comes back in an output message item. Reasoning-capable models are supported, which changes how the output budget behaves.
| Item | Value |
|---|---|
| Method and path | POST /v1/responses |
| Authentication | Authorization: Bearer $TOKUSE_API_KEY |
| Models | Reasoning-capable aliases in the current Tokuse catalog |
| Pricing | Tokuse pricing and the upstream provider console |
Endpoint and authentication
Use https://tokuse.com/v1/responses with a Bearer token. The endpoint is separate from /v1/chat/completions; the request body uses input and max_output_tokens rather than messages and max_tokens.
Models
Use an alias that supports both reasoning and the Responses API. The catalog is the source of truth for your account. Replace your-reasoning-model in the example with that alias rather than reusing a chat-only model name.
Request
curl https://tokuse.com/v1/responses \
-H "Authorization: Bearer $TOKUSE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "your-reasoning-model",
"input": "Compare p95 and average latency for an API gateway.",
"reasoning": {"effort": "medium"},
"max_output_tokens": 1200
}'
Response
{
"id": "resp_0c7b",
"object": "response",
"status": "completed",
"output": [
{
"type": "message",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Average latency hides the slow tail. A p95 figure shows the latency that one in twenty requests actually experiences."
}
]
}
],
"usage": {
"input_tokens": 24,
"output_tokens": 180,
"output_tokens_details": {"reasoning_tokens": 96},
"total_tokens": 204
}
}
Budgeting for reasoning
The max_output_tokens value covers reasoning tokens as well as the visible answer. Leave headroom. If reasoning consumes the whole budget, the request can finish without usable text, and output_text comes back empty.
When that happens, raise max_output_tokens or shorten the prompt, then inspect the output array to see which items the model returned. A retry with the same budget usually reproduces the empty result.
Notes and limits
- Read the text from the message item's
output_textcontent. Reasoning items are not the answer you show to a user. - Output limits and reasoning-token accounting are model-specific. Check the selected alias before setting a budget in production.
- This endpoint and the chat endpoint have different request shapes. Do not swap a working chat payload into
/v1/responseswithout changing the fields.
Billing
Prices are not fixed in this reference. Requests are billed by input and output tokens, and reasoning tokens count toward output usage. Confirm current rates on the Tokuse pricing page and in the upstream provider console. The /pricing page lists the gateway rates.