o3-pro

This documentation is valid for the following list of our models:

  • openai/o3-pro

Model Overview

Designed for deeper reasoning and tougher questions, o3-pro uses more compute to deliver higher-quality answers. It’s only available in the /responses API, which supports multi-turn model interactions and will enable more advanced features in the future. Some complex requests may take a few minutes.

How to Make a Call

Step-by-Step Instructions

1️ Setup You Can’t Skip

▪️ Create an Account: Visit the AI/ML API website and create an account (if you don’t have one yet). ▪️ Generate an API Key: After logging in, navigate to your account dashboard and generate your API key. Ensure that key is enabled on UI.

2️ Copy the code example

At the bottom of this page, you'll find a code example that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.

3️ Modify the code example

▪️ Replace <YOUR_AIMLAPI_KEY> with your actual AI/ML API key from your account. ▪️ Insert your question or request into the input field—this is what the model will respond to.

4️ (Optional) Adjust other optional parameters if needed

Only model and input are required parameters for this model (and we’ve already filled them in for you in the example), but you can include optional parameters if needed to adjust the model’s behavior. Below, you can find the corresponding API schema, which lists all available parameters along with notes on how to use them.

5️ Run your modified code

Run your modified code in your development environment. Response time depends on various factors, but for simple prompts it rarely exceeds a few seconds.

API Schema

post
Authorizations
Body
modelundefined · enumRequiredPossible values:
inputany ofRequired

Text, image, or file inputs to the model, used to generate a response.

stringOptional

A text input to the model, equivalent to a text input with the user role.

or
instructionsstring | nullableOptional

A system (or developer) message inserted into the model's context.

When using along with previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.

max_output_tokensintegerOptional

An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.

Default: 512
parallel_tool_callsboolean | nullableOptional

Whether to allow the model to run tool calls in parallel.

previous_response_idstring | nullableOptional

The unique ID of the previous response to the model. Use this to create multi-turn conversations.

storeboolean | nullableOptional

Whether to store the generated model response for later retrieval via API.

Default: false
streamboolean | nullableOptional

If set to true, the model response data will be streamed to the client as it is generated using server-sent events.

Default: false
temperaturenumber | nullableOptional

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both.

tool_choiceany ofOptional

How the model should select which tool (or tools) to use when generating a response.

string · enumOptional

Controls which (if any) tool is called by the model.

none means the model will not call any tool and instead generates a message.

auto means the model can pick between generating a message or calling one or more tools.

required means the model must call one or more tools.

Possible values:
or
or
top_pnumber | nullableOptional

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.

truncationstring · enumOptional

The truncation strategy to use for the model response.

- auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation.
- disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error.
Default: disabledPossible values:
Responses
201Success
post
POST /v1/responses HTTP/1.1
Host: api.aimlapi.com
Authorization: Bearer <YOUR_AIMLAPI_KEY>
Content-Type: application/json
Accept: */*
Content-Length: 672

{
  "model": "openai/o3-pro",
  "input": "text",
  "include": [
    "message.input_image.image_url"
  ],
  "instructions": "text",
  "max_output_tokens": 512,
  "metadata": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "parallel_tool_calls": true,
  "previous_response_id": "text",
  "prompt": {
    "id": "text",
    "variables": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "version": "text"
  },
  "reasoning": {
    "effort": "low",
    "summary": "auto"
  },
  "store": false,
  "stream": false,
  "temperature": 1,
  "text": {
    "format": {
      "type": "text"
    }
  },
  "tool_choice": "none",
  "tools": [
    {
      "type": "web_search_preview",
      "search_context_size": "low",
      "user_location": {
        "type": "approximate",
        "city": "text",
        "country": "text",
        "region": "text",
        "timezone": "text"
      }
    }
  ],
  "top_p": 1,
  "truncation": "disabled"
}
201Success

No content

Code Example

import requests
import json   # for getting a structured output with indentation

response = requests.post(
    "https://api.aimlapi.com/v1/responses",
    headers={
        "Content-Type":"application/json", 

        # Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
        "Authorization":"Bearer <YOUR_AIMLAPI_KEY>",
        "Content-Type":"application/json"
    },
    json={
        "model":"openai/o3-pro",
        "input":"Hello"  # Insert your question for the model here, instead of Hello   
    }
)

data = response.json()
print(json.dumps(data, indent=2, ensure_ascii=False))
Response
{
  "id": "resp_686ba45ce63481a2a4b1fad55d2bea8102a1cc22f1a1bcf1",
  "object": "response",
  "created_at": 1751884892,
  "error": null,
  "incomplete_details": null,
  "instructions": null,
  "max_output_tokens": 512,
  "model": "o3-pro-2025-06-10",
  "output": [
    {
      "id": "rs_686ba463d18481a29dde85cfd7b055bf02a1cc22f1a1bcf1",
      "type": "reasoning",
      "summary": []
    },
    {
      "id": "msg_686ba463d4e081a2b2e2aff962ab00f702a1cc22f1a1bcf1",
      "type": "message",
      "status": "in_progress",
      "content": [
        {
          "type": "output_text",
          "annotations": [],
          "logprobs": [],
          "text": "Hello! How can I help you today?"
        }
      ],
      "role": "assistant"
    }
  ],
  "parallel_tool_calls": true,
  "previous_response_id": null,
  "reasoning": {
    "effort": "medium",
    "summary": null
  },
  "temperature": 1,
  "text": {
    "format": {
      "type": "text"
    }
  },
  "tool_choice": "auto",
  "tools": [],
  "top_p": 1,
  "truncation": "disabled",
  "usage": {
    "input_tokens": 294,
    "input_tokens_details": {
      "cached_tokens": 0
    },
    "output_tokens": 2520,
    "output_tokens_details": {
      "reasoning_tokens": 0
    },
    "total_tokens": 2814
  },
  "metadata": {},
  "output_text": "Hello! How can I help you today?"
}

Last updated

Was this helpful?