Skip to content
OpenAI logo

GPT-5.5 pro

Text GenerationOpenAI

GPT-5.5 pro uses OpenAI's Responses API with built-in tools, improved reasoning, and stateful context management.

Model Info
Context Window1,000,000 tokens
Terms and Licenselink
More informationlink
Zero data retentionYes
Request formatsResponses
PricingView pricing in the Cloudflare dashboard

Usage

TypeScript
const response = await env.AI.run(
'openai/gpt-5.5-pro',
{ input: 'What are the three laws of thermodynamics?' },
)
console.log(response)
The **three laws of thermodynamics** are:

1. **First Law — Conservation of Energy**  
   Energy cannot be created or destroyed, only transferred or transformed.  
   In thermodynamics: the change in a system’s internal energy equals heat added to the system minus work done by the system.  
   \[
   \Delta U = Q - W
   \]

2. **Second Law — Entropy Increases**  
   In any natural process, the total entropy of an isolated system tends to increase.  
   Equivalently, heat flows spontaneously from hotter objects to colder ones, and no heat engine can be 100% efficient.

3. **Third Law — Absolute Zero Limit**  
   As temperature approaches absolute zero, the entropy of a perfect crystal approaches zero.  
   It also implies that absolute zero cannot be reached by any finite physical process.

There is also a **Zeroth Law**, often stated separately: if two systems are each in thermal equilibrium with a third system, they are in thermal equilibrium with each other. This is what makes temperature well-defined.

Examples

With Instructions — Using instructions to set context
TypeScript
const response = await env.AI.run(
'openai/gpt-5.5-pro',
{
input: 'How do I read a JSON file in Python?',
instructions: 'You are a helpful coding assistant specializing in Python.',
},
)
console.log(response)
Use Python’s built-in `json` module:

```python
import json

with open("data.json", "r", encoding="utf-8") as file:
    data = json.load(file)

print(data)
```

If `data.json` contains:

```json
{
  "name": "Alice",
  "age": 30
}
```

Then `data` will be a Python dictionary:

```python
print(data["name"])  # Alice
print(data["age"])   # 30
```

You can also handle common errors:

```python
import json

try:
    with open("data.json", "r", encoding="utf-8") as file:
        data = json.load(file)

    print(data)

except FileNotFoundError:
    print("The JSON file was not found.")

except json.JSONDecodeError:
    print("The file is not valid JSON.")
```

Use `json.load(file)` for reading from a file, and `json.loads(string)` for parsing a JSON string.
Multi-turn Conversation — Continuing a conversation with message array
TypeScript
const response = await env.AI.run(
'openai/gpt-5.5-pro',
{
input: [
{
content: 'I need help planning a road trip from San Francisco to Los Angeles.',
role: 'user',
},
{
content:
"I'd be happy to help! The drive is about 380 miles and takes roughly 5-6 hours. Would you like suggestions for scenic routes or interesting stops along the way?",
role: 'assistant',
},
{ content: 'Yes, name three good stops in one short sentence each.', role: 'user' },
],
max_output_tokens: 16000,
},
)
console.log(response)
- Monterey/Carmel is great for beaches, seafood, and a quick scenic stroll.  
- Big Sur offers dramatic ocean views, Bixby Bridge, and McWay Falls.  
- Santa Barbara is perfect for lunch, State Street, and Stearns Wharf.
Temperature Control — Using temperature for creative responses
TypeScript
const response = await env.AI.run(
'openai/gpt-5.5-pro',
{ input: 'Write a haiku about artificial intelligence', temperature: 1 },
)
console.log(response)
Silent circuits dream  
Learning patterns in starlight  
Dawn hums through the code
With Reasoning — Using reasoning effort for complex problems
TypeScript
const response = await env.AI.run(
'openai/gpt-5.5-pro',
{
input:
'Solve this problem step by step: A train leaves Chicago at 60mph heading east. Another train leaves New York at 80mph heading west. They are 900 miles apart. When do they meet?',
reasoning: { effort: 'medium' },
},
)
console.log(response)
Assuming both trains leave at the same time:

1. Train from Chicago speed: **60 mph**
2. Train from New York speed: **80 mph**
3. Since they are moving toward each other, add their speeds:

\[
60 + 80 = 140 \text{ mph}
\]

4. They are **900 miles** apart, so time is:

\[
\text{time} = \frac{900}{140}
\]

\[
\text{time} = 6.428571\ldots \text{ hours}
\]

5. Convert the decimal part:

\[
0.428571 \times 60 \approx 25.7 \text{ minutes}
\]

So they meet after about:

\[
\boxed{6 \text{ hours } 26 \text{ minutes}}
\]

More exactly, they meet after **6 hours, 25 minutes, and 43 seconds**.

Parameters

instructions
string
temperature
numberminimum: 0maximum: 2
max_output_tokens
numberexclusiveMinimum: 0
top_p
numberminimum: 0maximum: 1
stream
boolean
tool_choice

API Schemas (Raw)

Input
Output