/reasoning API

/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

  • Authorizationstringrequired

    Bearer <INDUCTION_API_KEY>. Find your key under API Keys at app.induction.ai.

Choose a reasoning effort

POSThttps://api.induction.ai/v1/reasoning

Body

  • max_reasoning_effort"none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max"required

    The highest level the response may name. Send the level your agent would use without this API.

  • contextobjectrequired

    The request your agent is about to send to the model, formatted as an OpenAI Responses API request.

    Any reasoning setting inside context is ignored. Only max_reasoning_effort sets the limit.

    Show child attributes
    • modelstringrequired

      The model the next request will run on. The level is chosen for this model.

    • inputstring | arrayrequired

      The 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
      • messageobject

        A message from the user, the model, or the developer.

        Show child attributes
        • type"message"

          "message". Can be left out.

        • role"user" | "assistant" | "system" | "developer"required

          Who wrote the message.

        • contentstring | arrayrequired

          The message text, or a list of content parts such as input_text and output_text.

      • function_callobject

        A tool call the model made.

        Show child attributes
        • type"function_call"required

          Always "function_call".

        • call_idstringrequired

          The id that links the call to its result.

        • namestringrequired

          The name of the tool that was called.

        • argumentsstringrequired

          The call’s arguments, as a JSON string.

      • function_call_outputobject

        The result of a tool call.

        Show child attributes
        • type"function_call_output"required

          Always "function_call_output".

        • call_idstringrequired

          The call_id of the function_call this is the result of.

        • outputstring | arrayrequired

          What the tool returned.

      • reasoningobject

        The model’s reasoning for a step, as OpenAI returned it.

        Show child attributes
        • type"reasoning"required

          Always "reasoning".

        • summaryarray

          The reasoning summary parts, each with its text.

    • toolsarray

      The 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 equal max_reasoning_effort when the step needs it.
    • "unchanged": No choice was made, and reasoning_effort is your max_reasoning_effort.

The status is unchanged when:

  • max_reasoning_effort is low or below, so there is nothing lower to choose.
  • The API does not choose levels for context.model.
  • context.input is 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.

StatusMeaning
400Missing or invalid parameters, including a context that is not a Responses API request.
401Missing or invalid Induction API key.
413Request exceeds the 100 MB limit.
415Content-Type must be application/json.
500Internal server error.
Request
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"
            }
          }
        }
      }
    ]
  }
}'
Response
{
  "object": "reasoning",
  "reasoning_effort": "low",
  "status": "chosen"
}

Agent Integration

Call /reasoning before each model request, both after a user message and after tool results:

  1. Build the model request as usual.
  2. Call /reasoning with that request as context and your usual level as max_reasoning_effort.
  3. Send the model request to your model provider, with the returned reasoning_effort as its reasoning.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 request, sent to your provider
{
  "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.