GPT-5.5 pro
Text Generation • OpenAI
openai/gpt-5.5-pro
- Third-party
- Zero data retention
GPT-5.5 pro uses OpenAI's Responses API with built-in tools, improved reasoning, and stateful context management.
| Model Info | |
|---|---|
| Context Window ↗ | 1,000,000 tokens |
| Terms and License | link ↗ |
| More information | link ↗ |
| Zero data retention | Yes |
| Request formats | Responses |
| Pricing | <ul><li>Input (per 1M tokens)$30.00</li><li>Output (per 1M tokens)$180.00</li></ul> |
Usage
const response = await env.AI.run(
'openai/gpt-5.5-pro',
{ input: 'What are the three laws of thermodynamics?' },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/responses \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "openai/gpt-5.5-pro",
"input": "What are the three laws of thermodynamics?"
}'
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.
{
"background": false,
"billing": {
"payer": "developer"
},
"completed_at": 1777054314,
"created_at": 1777054206,
"error": null,
"frequency_penalty": 0,
"gatewayMetadata": {
"keySource": "Unified"
},
"id": "resp_063e06a488467aad0169ebb1fc91d4819081d5cf054ee32daa",
"incomplete_details": null,
"instructions": null,
"max_output_tokens": null,
"max_tool_calls": null,
"metadata": {},
"model": "gpt-5.5-pro-2026-04-23",
"moderation": null,
"object": "response",
"output": [
{
"id": "rs_063e06a488467aad0169ebb262c1408190aa715f10dd4763dc",
"summary": [],
"type": "reasoning"
},
{
"content": [
{
"annotations": [],
"logprobs": [],
"text": "The **three laws of thermodynamics** are:\n\n1. **First Law — Conservation of Energy** \n Energy cannot be created or destroyed, only transferred or transformed. \n In thermodynamics: the change in a system’s internal energy equals heat added to the system minus work done by the system. \n \\[\n \\Delta U = Q - W\n \\]\n\n2. **Second Law — Entropy Increases** \n In any natural process, the total entropy of an isolated system tends to increase. \n Equivalently, heat flows spontaneously from hotter objects to colder ones, and no heat engine can be 100% efficient.\n\n3. **Third Law — Absolute Zero Limit** \n As temperature approaches absolute zero, the entropy of a perfect crystal approaches zero. \n It also implies that absolute zero cannot be reached by any finite physical process.\n\nThere 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.",
"type": "output_text"
}
],
"id": "msg_063e06a488467aad0169ebb262c45c819093301855572fac7f",
"phase": "final_answer",
"role": "assistant",
"status": "completed",
"type": "message"
}
],
"parallel_tool_calls": true,
"presence_penalty": 0,
"previous_response_id": null,
"prompt_cache_key": null,
"prompt_cache_retention": "24h",
"reasoning": {
"effort": "high",
"summary": null
},
"safety_identifier": null,
"service_tier": "default",
"status": "completed",
"store": false,
"temperature": 1,
"text": {
"format": {
"type": "text"
},
"verbosity": "medium"
},
"tool_choice": "auto",
"tools": [],
"top_logprobs": 0,
"top_p": 0.98,
"truncation": "disabled",
"usage": {
"input_tokens": 15,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 293,
"output_tokens_details": {
"reasoning_tokens": 66
},
"total_tokens": 308
},
"user": null
}
Examples
<details>
<summary>With Instructions — Using instructions to set context</summary>
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)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/responses \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "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."
}'
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.
{
"background": false,
"billing": {
"payer": "developer"
},
"completed_at": 1777054286,
"created_at": 1777054264,
"error": null,
"frequency_penalty": 0,
"gatewayMetadata": {
"keySource": "Unified"
},
"id": "resp_0a5627201ea32bd60169ebb23813c081978bb6448d3757ad16",
"incomplete_details": null,
"instructions": "You are a helpful coding assistant specializing in Python.",
"max_output_tokens": null,
"max_tool_calls": null,
"metadata": {},
"model": "gpt-5.5-pro-2026-04-23",
"moderation": null,
"object": "response",
"output": [
{
"id": "rs_0a5627201ea32bd60169ebb24e286081979a18901a559d3252",
"summary": [],
"type": "reasoning"
},
{
"content": [
{
"annotations": [],
"logprobs": [],
"text": "Use Python’s built-in `json` module:\n\n```python\nimport json\n\nwith open(\"data.json\", \"r\", encoding=\"utf-8\") as file:\n data = json.load(file)\n\nprint(data)\n```\n\nIf `data.json` contains:\n\n```json\n{\n \"name\": \"Alice\",\n \"age\": 30\n}\n```\n\nThen `data` will be a Python dictionary:\n\n```python\nprint(data[\"name\"]) # Alice\nprint(data[\"age\"]) # 30\n```\n\nYou can also handle common errors:\n\n```python\nimport json\n\ntry:\n with open(\"data.json\", \"r\", encoding=\"utf-8\") as file:\n data = json.load(file)\n\n print(data)\n\nexcept FileNotFoundError:\n print(\"The JSON file was not found.\")\n\nexcept json.JSONDecodeError:\n print(\"The file is not valid JSON.\")\n```\n\nUse `json.load(file)` for reading from a file, and `json.loads(string)` for parsing a JSON string.",
"type": "output_text"
}
],
"id": "msg_0a5627201ea32bd60169ebb24e2a148197917120444493cfa0",
"phase": "final_answer",
"role": "assistant",
"status": "completed",
"type": "message"
}
],
"parallel_tool_calls": true,
"presence_penalty": 0,
"previous_response_id": null,
"prompt_cache_key": null,
"prompt_cache_retention": "24h",
"reasoning": {
"effort": "high",
"summary": null
},
"safety_identifier": null,
"service_tier": "default",
"status": "completed",
"store": false,
"temperature": 1,
"text": {
"format": {
"type": "text"
},
"verbosity": "medium"
},
"tool_choice": "auto",
"tools": [],
"top_logprobs": 0,
"top_p": 0.98,
"truncation": "disabled",
"usage": {
"input_tokens": 30,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 387,
"output_tokens_details": {
"reasoning_tokens": 170
},
"total_tokens": 417
},
"user": null
}
</details>
<details>
<summary>Multi-turn Conversation — Continuing a conversation with message array</summary>
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)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/responses \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "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
}'
- 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.
{
"background": false,
"billing": {
"payer": "developer"
},
"completed_at": 1777421264,
"created_at": 1777421233,
"error": null,
"frequency_penalty": 0,
"gatewayMetadata": {
"keySource": "BYOK"
},
"id": "resp_01ed6abc47bd85fc0169f14bb1332481968b1628177ee39463",
"incomplete_details": null,
"instructions": null,
"max_output_tokens": 16000,
"max_tool_calls": null,
"metadata": {},
"model": "gpt-5.5-pro-2026-04-23",
"moderation": null,
"object": "response",
"output": [
{
"id": "rs_01ed6abc47bd85fc0169f14bcfd2508196b39551bf06fa05b5",
"summary": [],
"type": "reasoning"
},
{
"content": [
{
"annotations": [],
"logprobs": [],
"text": "- Monterey/Carmel is great for beaches, seafood, and a quick scenic stroll. \n- Big Sur offers dramatic ocean views, Bixby Bridge, and McWay Falls. \n- Santa Barbara is perfect for lunch, State Street, and Stearns Wharf.",
"type": "output_text"
}
],
"id": "msg_01ed6abc47bd85fc0169f14bcfd38c81968fbe4768d5cc9b0f",
"phase": "final_answer",
"role": "assistant",
"status": "completed",
"type": "message"
}
],
"parallel_tool_calls": true,
"presence_penalty": 0,
"previous_response_id": null,
"prompt_cache_key": null,
"prompt_cache_retention": "24h",
"reasoning": {
"effort": "high",
"summary": null
},
"safety_identifier": null,
"service_tier": "default",
"status": "completed",
"store": false,
"temperature": 1,
"text": {
"format": {
"type": "text"
},
"verbosity": "medium"
},
"tool_choice": "auto",
"tools": [],
"top_logprobs": 0,
"top_p": 0.98,
"truncation": "disabled",
"usage": {
"input_tokens": 78,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 251,
"output_tokens_details": {
"reasoning_tokens": 191
},
"total_tokens": 329
},
"user": null
}
</details>
<details>
<summary>Temperature Control — Using temperature for creative responses</summary>
const response = await env.AI.run(
'openai/gpt-5.5-pro',
{ input: 'Write a haiku about artificial intelligence', temperature: 1 },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/responses \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "openai/gpt-5.5-pro",
"input": "Write a haiku about artificial intelligence",
"temperature": 1
}'
Silent circuits dream
Learning patterns in starlight
Dawn hums through the code
{
"background": false,
"billing": {
"payer": "developer"
},
"completed_at": 1777054304,
"created_at": 1777054296,
"error": null,
"frequency_penalty": 0,
"gatewayMetadata": {
"keySource": "Unified"
},
"id": "resp_0861b6980fc9f4ab0169ebb2585a388196b5ae496c923d5c46",
"incomplete_details": null,
"instructions": null,
"max_output_tokens": null,
"max_tool_calls": null,
"metadata": {},
"model": "gpt-5.5-pro-2026-04-23",
"moderation": null,
"object": "response",
"output": [
{
"id": "rs_0861b6980fc9f4ab0169ebb260b08c81968600b365effb3d15",
"summary": [],
"type": "reasoning"
},
{
"content": [
{
"annotations": [],
"logprobs": [],
"text": "Silent circuits dream \nLearning patterns in starlight \nDawn hums through the code",
"type": "output_text"
}
],
"id": "msg_0861b6980fc9f4ab0169ebb260b29c81968b2573cb5b00befc",
"phase": "final_answer",
"role": "assistant",
"status": "completed",
"type": "message"
}
],
"parallel_tool_calls": true,
"presence_penalty": 0,
"previous_response_id": null,
"prompt_cache_key": null,
"prompt_cache_retention": "24h",
"reasoning": {
"effort": "high",
"summary": null
},
"safety_identifier": null,
"service_tier": "default",
"status": "completed",
"store": false,
"temperature": 1,
"text": {
"format": {
"type": "text"
},
"verbosity": "medium"
},
"tool_choice": "auto",
"tools": [],
"top_logprobs": 0,
"top_p": 0.98,
"truncation": "disabled",
"usage": {
"input_tokens": 13,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 121,
"output_tokens_details": {
"reasoning_tokens": 97
},
"total_tokens": 134
},
"user": null
}
</details>
<details>
<summary>With Reasoning — Using reasoning effort for complex problems</summary>
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)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/responses \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "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"
}
}'
