/reasoning picks the reasoning effort for an agent’s next model request. Send the conversation so far and the highest level you allow, and it returns the level to use.
Most steps of an agent’s work, such as reading a file or running a command, don’t need the effort that planning or debugging does. The API lowers the effort on those steps and keeps your level where the work needs it, which cuts reasoning tokens and latency.
The API returns one of two outcomes:
- A chosen level: At or below your maximum, picked for the step the model is about to take.
- Your maximum, unchanged: When no choice can be made. When in doubt, the API keeps your level.
Authorization
AuthorizationstringrequiredBearer <INDUCTION_API_KEY>. Find your key under API Keys at app.induction.ai.
Choose a reasoning effort
https://api.induction.ai/v1/reasoningBody
max_reasoning_effort"none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max"requiredThe highest level the response may name. Send the level your agent would use without this API.
contextobjectrequiredThe request your agent is about to send to the model, formatted as an OpenAI Responses API request.
Any
reasoningsetting insidecontextis ignored. Onlymax_reasoning_effortsets the limit.Show child attributes
modelstringrequiredThe model the next request will run on. The level is chosen for this model.
inputstring | arrayrequiredThe conversation so far as OpenAI Responses input items, ending in the user message or tool results the model will answer next.
Each item is one of the kinds below. Other OpenAI Responses item types are accepted too.
Show child attributes
messageobjectA message from the user, the model, or the developer.
Show child attributes
type"message""message". Can be left out.role"user" | "assistant" | "system" | "developer"requiredWho wrote the message.
contentstring | arrayrequiredThe message text, or a list of content parts such as
input_textandoutput_text.
function_callobjectA tool call the model made.
Show child attributes
type"function_call"requiredAlways
"function_call".call_idstringrequiredThe id that links the call to its result.
namestringrequiredThe name of the tool that was called.
argumentsstringrequiredThe call’s arguments, as a JSON string.
function_call_outputobjectThe result of a tool call.
Show child attributes
type"function_call_output"requiredAlways
"function_call_output".call_idstringrequiredThe
call_idof thefunction_callthis is the result of.outputstring | arrayrequiredWhat the tool returned.
reasoningobjectThe model’s reasoning for a step, as OpenAI returned it.
Show child attributes
type"reasoning"requiredAlways
"reasoning".summaryarrayThe reasoning summary parts, each with its
text.
toolsarrayThe agent’s tool definitions in OpenAI Responses format.
Response
object"reasoning"Always
"reasoning".reasoning_effort"none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max"The level to run the next model request at. Never higher than
max_reasoning_effort.status"chosen" | "unchanged"Indicates the outcome:
"chosen": A level was chosen for this step. It can equalmax_reasoning_effortwhen the step needs it."unchanged": No choice was made, andreasoning_effortis yourmax_reasoning_effort.
The status is unchanged when:
max_reasoning_effortislowor below, so there is nothing lower to choose.- The API does not choose levels for
context.model. context.inputis empty, or ends in the model’s own output instead of a user message or tool results.- A level could not be chosen for this request.
Errors
Errors return an error object with a message. A request that reaches the API but cannot be graded still returns 200 with status unchanged.
| Status | Meaning |
|---|---|
400 | Missing or invalid parameters, including a context that is not a Responses API request. |
401 | Missing or invalid Induction API key. |
413 | Request exceeds the 100 MB limit. |
415 | Content-Type must be application/json. |
500 | Internal server error. |
curl -X POST "https://api.induction.ai/v1/reasoning" \
-H "Authorization: Bearer $INDUCTION_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"max_reasoning_effort": "high",
"context": {
"model": "gpt-6-sol",
"input": [
{
"type": "message",
"role": "user",
"content": "The checkout test is failing. Find out why."
},
{
"type": "function_call",
"call_id": "call_1",
"name": "run_tests",
"arguments": "{\"path\":\"tests/checkout.test.ts\"}"
},
{
"type": "function_call_output",
"call_id": "call_1",
"output": "12 passed, 0 failed"
}
],
"tools": [
{
"type": "function",
"name": "run_tests",
"description": "Run the test suite.",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string"
}
}
}
}
]
}
}'{
"object": "reasoning",
"reasoning_effort": "low",
"status": "chosen"
}Agent Integration
Call /reasoning before each model request, both after a user message and after tool results:
- Build the model request as usual.
- Call
/reasoningwith that request ascontextand your usual level asmax_reasoning_effort. - Send the model request to your model provider, with the returned
reasoning_effortas itsreasoning.effort.
The request you send to the model in step 3 is the same one you sent as context in step 2, with only the effort changed:
{
"model": "gpt-6-sol",
"reasoning": { "effort": "low" },
"input": [ ... ]
}- Each call stands alone. Nothing is remembered between calls, and the same request can get a different level.
- If a call fails or times out, send the model request at your usual level.
To also reduce large tool results before they reach the model, see the /subset API.