Enable reasoning models to think before they respond using the Responses API
Reasoning models are LLMs trained with reinforcement learning to think before they answer, producing a long internal chain of thought before responding. They excel at complex problem solving, coding, scientific reasoning, and multi-step planning for agentic workflows.
The Responses API is best supported on the Enterprise plan. Use https://enterprise.blackbox.ai as the base URL for full model availability and production reliability. The API is also available on standard plans at https://api.blackbox.ai, where it is currently experimental.
Pass a reasoning object with an effort field to control how much the model thinks before responding:
Copy
const response = await fetch('https://enterprise.blackbox.ai/v1/responses', { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${process.env.BLACKBOX_API_KEY}`, }, body: JSON.stringify({ model: 'openai/gpt-5.3-codex', reasoning: { effort: 'medium', }, input: [ { role: 'user', content: 'Write a bash script that takes a matrix represented as a string with format [1,2],[3,4],[5,6] and prints the transpose in the same format.', }, ], }),});const data = await response.json();console.log(data.output_text);
The reasoning.summary field is part of the OpenAI Responses API spec and is accepted by the API. Support varies by model — when supported, setting it causes the output array to include a reasoning item before the message item containing a human-readable summary of the model’s internal thinking.
Value
Description
"auto"
Uses the most detailed summarizer available (recommended)
"detailed"
Full step-by-step reasoning summary
"concise"
A shorter, high-level summary of the reasoning process
reasoning.summary is not currently supported by openai/gpt-5.3-codex. When unsupported, the field is accepted but ignored — the response returns only the message output item.
When a model supports reasoning.summary, the output array contains a reasoning item before the message:
Copy
[ { "id": "rs_abc123", "type": "reasoning", "summary": [ { "type": "summary_text", "text": "**Answering a simple question**\n\nThe capital of France is Paris — a well-known fact. I'll keep the answer brief and direct." } ] }, { "id": "msg_abc456", "type": "message", "status": "completed", "role": "assistant", "content": [ { "type": "output_text", "text": "The capital of France is Paris.", "annotations": [] } ] }]
Reasoning tokens are generated internally and are not visible in the response, but they are billed as output tokens and appear in usage.output_tokens_details:
If the model runs out of token budget while reasoning, it may return status: incomplete — or in some cases return status: completed with an empty output_text when all tokens were consumed by internal reasoning. Reserve enough tokens for both reasoning and the visible output to avoid this.
Copy
const response = await fetch('https://enterprise.blackbox.ai/v1/responses', { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${process.env.BLACKBOX_API_KEY}`, }, body: JSON.stringify({ model: 'openai/gpt-5.3-codex', reasoning: { effort: 'medium' }, max_output_tokens: 300, input: [ { role: 'user', content: 'Write a bash script that transposes a matrix.', }, ], }),});const data = await response.json();if (data.status === 'incomplete' && data.incomplete_details?.reason === 'max_output_tokens') { console.log('Ran out of tokens'); if (data.output_text?.length > 0) { console.log('Partial output:', data.output_text); } else { console.log('Ran out of tokens during reasoning — no visible output produced'); }}
When set, returns a human-readable reasoning summary alongside the response. One of "auto", "detailed", or "concise". Not included unless explicitly set.
Maximum number of tokens to generate in the response, including reasoning tokens. Increase this when using higher effort levels to avoid incomplete responses.