# GPT-6 Sol — Scenepond API

Model ID: `gpt-6-sol`

Model developer: OpenAI

Source page: https://open.scenepond.ai/en/models/gpt-6-sol#api

Reviewed: 2026-10-21

Base URL: `https://open.scenepond.ai/v1`

Authenticate every request with Authorization: Bearer and your Scenepond API key. Keep the key on your server.

## Chat Completions

`POST /v1/chat/completions`

### Request parameters

- `model` — **Required**; `string`. Use this exact published model ID.
  - Constraints: gpt-6-sol

- `messages` — **Required**; `object[]`. Send the conversation history in order.
  - Constraints: At least one message

### Fields in messages

These fields apply when messages is supplied. A required child does not make its optional parent required.

- `messages[].role` — **Required**; `string`. Role of the message author.
  - Constraints: developer; system; user; assistant; tool

- `messages[].content` — **Conditional**; `string | object[] | null`. Message text, image, PDF or assistant refusal content.
  - Assistant content may be null; preserve the original assistant refusal or tool calls.
  - Required for developer, system, user and tool messages.

### Fields in messages[].content

These fields apply when messages[].content is supplied. A required child does not make its optional parent required.

- `messages[].content[].type` — **Required**; `string`. Content part type.
  - Developer, system and tool messages accept text parts only. User messages accept text, image_url or file; assistant replay accepts text or refusal.
  - Constraints: text; image_url; file; refusal

- `messages[].content[].text` — **Conditional**; `string`. Text content.
  - Required for a text part.

- `messages[].content[].image_url` — **Conditional**; `object`. Image content.
  - Required for an image_url part.

### Fields in messages[].content[].image_url

These fields apply when messages[].content[].image_url is supplied. A required child does not make its optional parent required.

- `messages[].content[].image_url.url` — **Required**; `string`. Image URL or base64 image data URL.

- `messages[].content[].image_url.detail` — **Optional**; `string`. Choose the image detail level.
  - Default: `"auto"`
  - Constraints: auto; low; high


- `messages[].content[].file` — **Conditional**; `object`. PDF input for a user message.
  - Each PDF must be under 50 MB; total files per request must not exceed 50 MB.
  - Required for a file part.

### Fields in messages[].content[].file

These fields apply when messages[].content[].file is supplied. A required child does not make its optional parent required.

- `messages[].content[].file.file_data` — **Optional**; `string`. Base64 PDF data, with filename.
  - Use file_data or an existing upstream file_id.

- `messages[].content[].file.file_id` — **Optional**; `string`. Existing file ID on the executing upstream account.
  - Use file_data or file_id; this gateway has no Files upload endpoint.

- `messages[].content[].file.filename` — **Optional**; `string`. PDF file name.
  - Use with inline file_data.


- `messages[].content[].refusal` — **Conditional**; `string`. Refusal text returned by the assistant.
  - Required for an assistant refusal part.

- `messages[].content[].prompt_cache_breakpoint` — **Optional**; `object`. Mark the exact end of a reusable prompt prefix.
  - For text, image_url or file input parts only.

### Fields in messages[].content[].prompt_cache_breakpoint

These fields apply when messages[].content[].prompt_cache_breakpoint is supplied. A required child does not make its optional parent required.

- `messages[].content[].prompt_cache_breakpoint.mode` — **Required**; `string`. Explicit cache breakpoint mode.
  - Constraints: explicit



- `messages[].tool_call_id` — **Conditional**; `string`. Match the tool reply to its earlier function-call ID.
  - Required for a tool reply.

- `messages[].name` — **Optional**; `string`. Optional name of the message author.
  - For developer, system, user or assistant messages.

- `messages[].refusal` — **Optional**; `string | null`. Refusal text returned by the assistant.
  - For assistant messages replayed from an earlier response.

- `messages[].tool_calls` — **Optional**; `object[]`. Replay earlier assistant function calls with their original IDs.
  - For assistant function-call messages with reasoning_effort explicitly none.

### Fields in messages[].tool_calls

These fields apply when messages[].tool_calls is supplied. A required child does not make its optional parent required.

- `messages[].tool_calls[].id` — **Required**; `string`. Function-call ID.

- `messages[].tool_calls[].type` — **Required**; `string`. Tool type.
  - Constraints: function

- `messages[].tool_calls[].function` — **Required**; `object`. The earlier function call.

### Fields in messages[].tool_calls[].function

These fields apply when messages[].tool_calls[].function is supplied. A required child does not make its optional parent required.

- `messages[].tool_calls[].function.name` — **Required**; `string`. Function name.

- `messages[].tool_calls[].function.arguments` — **Required**; `string`. JSON-encoded function arguments.




- `stream` — **Optional**; `boolean | null`. Set true for server-sent events; false or null uses a non-streaming response.

- `metadata` — **Optional**; `object | null`. Attach string metadata to the request.
  - Constraints: At most 16 key-value pairs; keys have at most 64 characters and string values have at most 512 characters.

- `store` — **Optional**; `boolean | null`. Control chat-completion storage. The upstream stores completions by default for new accounts; set store explicitly for the intended policy.

- `prompt_cache_key` — **Optional**; `string | null`. Group requests that share a reusable prompt prefix.

- `prompt_cache_options` — **Optional**; `object`. Configure prompt caching.

### Fields in prompt_cache_options

These fields apply when prompt_cache_options is supplied. A required child does not make its optional parent required.

- `prompt_cache_options.ttl` — **Optional**; `string`. Minimum cache lifetime.
  - Default: `"30m"`
  - Constraints: 30m

- `prompt_cache_options.mode` — **Optional**; `string`. Choose implicit or explicit cache breakpoints.
  - Default: `"implicit"`
  - Constraints: implicit; explicit


- `stream_options` — **Optional**; `object | null`. Configure streaming response options.
  - Use only with stream = true.

### Fields in stream_options

These fields apply when stream_options is supplied. A required child does not make its optional parent required.

- `stream_options.include_usage` — **Optional**; `boolean`. Include the final usage chunk in the response stream. The gateway may force usage reporting even when false is requested.


- `reasoning_effort` — **Optional**; `string | null`. Choose the reasoning effort for this request.
  - Default: `"medium"`
  - Constraints: none; low; medium; high; xhigh; max

- `max_completion_tokens` — **Optional**; `integer | null`. Limit total generated tokens, including reasoning tokens.
  - Constraints: Maximum value: 128000

- `verbosity` — **Optional**; `string | null`. Choose how much detail to include in the answer.
  - Default: `"medium"`
  - Constraints: low; medium; high

- `response_format` — **Optional**; `object`. Configure text or structured JSON output.

### Fields in response_format

These fields apply when response_format is supplied. A required child does not make its optional parent required.

- `response_format.type` — **Required**; `string`. Output format.
  - Constraints: text; json_object; json_schema

- `response_format.json_schema` — **Conditional**; `object`. Named output schema and optional strict validation.
  - Required when type is json_schema.

### Fields in response_format.json_schema

These fields apply when response_format.json_schema is supplied. A required child does not make its optional parent required.

- `response_format.json_schema.name` — **Required**; `string`. Output schema name.
  - Constraints: Maximum characters: 64; Use only ASCII letters, digits, underscores (_) or hyphens (-).

- `response_format.json_schema.description` — **Optional**; `string`. Describe the expected structured output.

- `response_format.json_schema.schema` — **Optional**; `object`. JSON Schema for the structured output.

- `response_format.json_schema.strict` — **Optional**; `boolean | null`. Enable strict adherence to the supported JSON Schema subset.



- `temperature` — **Optional**; `number | null`. Adjust sampling randomness.
  - Supported only when reasoning_effort is explicitly set to none.
  - Constraints: Minimum value: 0; Maximum value: 2

- `top_p` — **Optional**; `number | null`. Adjust nucleus sampling instead of temperature.
  - Supported only when reasoning_effort is explicitly set to none.
  - Constraints: Minimum value: 0; Maximum value: 1

- `logprobs` — **Optional**; `boolean | null`. Return output token log probabilities.
  - Supported only when reasoning_effort is explicitly set to none.

- `top_logprobs` — **Optional**; `integer | null`. Return the most likely tokens at each output position.
  - Supported only when reasoning_effort is explicitly set to none. Also requires logprobs = true.
  - Constraints: Minimum value: 0; Maximum value: 20

- `tools` — **Optional**; `object[]`. Declare tools; your application executes function calls.
  - Supported only when reasoning_effort is explicitly set to none.

### Fields in tools

These fields apply when tools is supplied. A required child does not make its optional parent required.

- `tools[].type` — **Required**; `string`. Tool type.
  - Constraints: function

- `tools[].function` — **Required**; `object`. Function definition for Chat Completions.

### Fields in tools[].function

These fields apply when tools[].function is supplied. A required child does not make its optional parent required.

- `tools[].function.name` — **Required**; `string`. Function or namespace name.
  - Constraints: Maximum characters: 64; Use only ASCII letters, digits, underscores (_) or hyphens (-).

- `tools[].function.description` — **Optional**; `string`. Describe when the function should be called.

- `tools[].function.parameters` — **Optional**; `object`. JSON Schema for the function arguments.

- `tools[].function.strict` — **Optional**; `boolean | null`. Enable strict adherence to the supported JSON Schema subset.
  - Default: `false`



- `tool_choice` — **Optional**; `string | object`. Select automatic, required, disabled or a named function call.
  - Supported only when reasoning_effort is explicitly set to none. When tool_choice is omitted, the upstream uses none without tools and auto with tools.
  - Constraints: none; auto; required

### Fields in tool_choice

These fields apply when tool_choice is supplied. A required child does not make its optional parent required.

- `tool_choice.type` — **Required**; `string`. Tool-choice object type.
  - Constraints: function; allowed_tools

- `tool_choice.function` — **Conditional**; `object`. Named function to call.
  - Required when type is function.

### Fields in tool_choice.function

These fields apply when tool_choice.function is supplied. A required child does not make its optional parent required.

- `tool_choice.function.name` — **Required**; `string`. Function name.


- `tool_choice.allowed_tools` — **Conditional**; `object`. Constrain calls to a subset of declared functions.
  - Required when type is allowed_tools.

### Fields in tool_choice.allowed_tools

These fields apply when tool_choice.allowed_tools is supplied. A required child does not make its optional parent required.

- `tool_choice.allowed_tools.mode` — **Required**; `string`. Choose how the allowed tool subset is used.
  - Constraints: auto; required

- `tool_choice.allowed_tools.tools` — **Required**; `object[]`. Allowed tool references using this protocol’s function-name shape.

### Fields in tool_choice.allowed_tools.tools

These fields apply when tool_choice.allowed_tools.tools is supplied. A required child does not make its optional parent required.

- `tool_choice.allowed_tools.tools[].type` — **Required**; `string`. Allowed tool reference type.
  - Constraints: function

- `tool_choice.allowed_tools.tools[].function` — **Required**; `object`. Named function to call.

### Fields in tool_choice.allowed_tools.tools[].function

These fields apply when tool_choice.allowed_tools.tools[].function is supplied. A required child does not make its optional parent required.

- `tool_choice.allowed_tools.tools[].function.name` — **Required**; `string`. Function name.





- `parallel_tool_calls` — **Optional**; `boolean`. Allow multiple function calls in one turn.
  - Supported only when reasoning_effort is explicitly set to none.

<details>
<summary>Compatibility parameters</summary>

- `prompt_cache_retention` — **Optional**; `string | null`. Deprecated cache-retention policy; use prompt_cache_options.ttl for the minimum cache lifetime.
  - Constraints: 24h

- `user` — **Optional**; `string | null`. Deprecated user identifier; use prompt_cache_key for cache grouping. The current channel has not opened safety_identifier.

- `max_tokens` — **Optional**; `integer | null`. Deprecated gateway alias for max_completion_tokens.
  - Use instead of max_completion_tokens, never together.
  - Constraints: Maximum value: 128000

</details>

### Minimum request

#### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/chat/completions" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "messages": [
    {
      "role": "user",
      "content": "Hello!"
    }
  ],
  "reasoning_effort": "medium",
  "stream": false
}
JSON
```

#### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Hello!\"\n    }\n  ],\n  \"reasoning_effort\": \"medium\",\n  \"stream\": false\n}")

request = Request(
    "https://open.scenepond.ai/v1/chat/completions",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

#### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "messages": [
    {
      "role": "user",
      "content": "Hello!"
    }
  ],
  "reasoning_effort": "medium",
  "stream": false
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

### Optional parameter examples

#### Streaming with optional parameters 1

##### cURL

```bash
curl --fail-with-body --no-buffer -X POST "https://open.scenepond.ai/v1/chat/completions" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "messages": [
    {
      "role": "developer",
      "content": "Describe the image in one sentence. Return JSON with an answer field."
    },
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "What is shown in this image?"
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
          }
        }
      ]
    }
  ],
  "reasoning_effort": "medium",
  "max_completion_tokens": 1024,
  "verbosity": "low",
  "response_format": {
    "type": "json_schema",
    "json_schema": {
      "name": "answer",
      "description": "A short answer.",
      "strict": true,
      "schema": {
        "type": "object",
        "properties": {
          "answer": {
            "type": "string"
          }
        },
        "required": [
          "answer"
        ],
        "additionalProperties": false
      }
    }
  },
  "stream": true,
  "stream_options": {
    "include_usage": true
  },
  "store": false,
  "metadata": {
    "example": "structured-output"
  },
  "prompt_cache_key": "image-description-v1",
  "prompt_cache_options": {
    "ttl": "30m",
    "mode": "implicit"
  }
}
JSON
```

##### Python

```python
import os
import json
import sys
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"messages\": [\n    {\n      \"role\": \"developer\",\n      \"content\": \"Describe the image in one sentence. Return JSON with an answer field.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"What is shown in this image?\"\n        },\n        {\n          \"type\": \"image_url\",\n          \"image_url\": {\n            \"url\": \"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg\"\n          }\n        }\n      ]\n    }\n  ],\n  \"reasoning_effort\": \"medium\",\n  \"max_completion_tokens\": 1024,\n  \"verbosity\": \"low\",\n  \"response_format\": {\n    \"type\": \"json_schema\",\n    \"json_schema\": {\n      \"name\": \"answer\",\n      \"description\": \"A short answer.\",\n      \"strict\": true,\n      \"schema\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"answer\": {\n            \"type\": \"string\"\n          }\n        },\n        \"required\": [\n          \"answer\"\n        ],\n        \"additionalProperties\": false\n      }\n    }\n  },\n  \"stream\": true,\n  \"stream_options\": {\n    \"include_usage\": true\n  },\n  \"store\": false,\n  \"metadata\": {\n    \"example\": \"structured-output\"\n  },\n  \"prompt_cache_key\": \"image-description-v1\",\n  \"prompt_cache_options\": {\n    \"ttl\": \"30m\",\n    \"mode\": \"implicit\"\n  }\n}")

request = Request(
    "https://open.scenepond.ai/v1/chat/completions",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    for line in response:
        sys.stdout.buffer.write(line)
        sys.stdout.buffer.flush()
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "messages": [
    {
      "role": "developer",
      "content": "Describe the image in one sentence. Return JSON with an answer field."
    },
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "What is shown in this image?"
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
          }
        }
      ]
    }
  ],
  "reasoning_effort": "medium",
  "max_completion_tokens": 1024,
  "verbosity": "low",
  "response_format": {
    "type": "json_schema",
    "json_schema": {
      "name": "answer",
      "description": "A short answer.",
      "strict": true,
      "schema": {
        "type": "object",
        "properties": {
          "answer": {
            "type": "string"
          }
        },
        "required": [
          "answer"
        ],
        "additionalProperties": false
      }
    }
  },
  "stream": true,
  "stream_options": {
    "include_usage": true
  },
  "store": false,
  "metadata": {
    "example": "structured-output"
  },
  "prompt_cache_key": "image-description-v1",
  "prompt_cache_options": {
    "ttl": "30m",
    "mode": "implicit"
  }
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
if (!response.body) throw new Error("Missing response stream");
const reader = response.body.getReader();
const decoder = new TextDecoder();
try {
  while (true) {
    const { value, done } = await reader.read();
    if (done) break;
    process.stdout.write(decoder.decode(value, { stream: true }));
  }
  process.stdout.write(decoder.decode());
} finally {
  await reader.cancel();
  reader.releaseLock();
}
```

#### Inline PDF input 2

This example embeds a complete sample PDF. Chat Completions accepts PDF file_data or an existing upstream file_id, not file_url.

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/chat/completions" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "reasoning_effort": "medium",
  "max_completion_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "name": "reader",
      "content": [
        {
          "type": "text",
          "text": "What sentence is in this PDF?",
          "prompt_cache_breakpoint": {
            "mode": "explicit"
          }
        },
        {
          "type": "file",
          "file": {
            "filename": "sample.pdf",
            "file_data": "data:application/pdf;base64,JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCAzMDAgMTQ0XSAvUmVzb3VyY2VzIDw8IC9Gb250IDw8IC9GMSA0IDAgUiA+PiA+PiAvQ29udGVudHMgNSAwIFIgPj4KZW5kb2JqCjQgMCBvYmoKPDwgL1R5cGUgL0ZvbnQgL1N1YnR5cGUgL1R5cGUxIC9CYXNlRm9udCAvSGVsdmV0aWNhID4+CmVuZG9iago1IDAgb2JqCjw8IC9MZW5ndGggNTcgPj4Kc3RyZWFtCkJUIC9GMSAxMiBUZiAyMCAxMDAgVGQgKFNjZW5lcG9uZCBzYW1wbGUgZG9jdW1lbnQuKSBUaiBFVAplbmRzdHJlYW0KZW5kb2JqCnhyZWYKMCA2CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAwOSAwMDAwMCBuIAowMDAwMDAwMDU4IDAwMDAwIG4gCjAwMDAwMDAxMTUgMDAwMDAgbiAKMDAwMDAwMDI0MSAwMDAwMCBuIAowMDAwMDAwMzExIDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUgNiAvUm9vdCAxIDAgUiA+PgpzdGFydHhyZWYKNDE4CiUlRU9GCg=="
          }
        }
      ]
    }
  ],
  "prompt_cache_options": {
    "ttl": "30m",
    "mode": "explicit"
  }
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"reasoning_effort\": \"medium\",\n  \"max_completion_tokens\": 1024,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"name\": \"reader\",\n      \"content\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"What sentence is in this PDF?\",\n          \"prompt_cache_breakpoint\": {\n            \"mode\": \"explicit\"\n          }\n        },\n        {\n          \"type\": \"file\",\n          \"file\": {\n            \"filename\": \"sample.pdf\",\n            \"file_data\": \"data:application/pdf;base64,JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCAzMDAgMTQ0XSAvUmVzb3VyY2VzIDw8IC9Gb250IDw8IC9GMSA0IDAgUiA+PiA+PiAvQ29udGVudHMgNSAwIFIgPj4KZW5kb2JqCjQgMCBvYmoKPDwgL1R5cGUgL0ZvbnQgL1N1YnR5cGUgL1R5cGUxIC9CYXNlRm9udCAvSGVsdmV0aWNhID4+CmVuZG9iago1IDAgb2JqCjw8IC9MZW5ndGggNTcgPj4Kc3RyZWFtCkJUIC9GMSAxMiBUZiAyMCAxMDAgVGQgKFNjZW5lcG9uZCBzYW1wbGUgZG9jdW1lbnQuKSBUaiBFVAplbmRzdHJlYW0KZW5kb2JqCnhyZWYKMCA2CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAwOSAwMDAwMCBuIAowMDAwMDAwMDU4IDAwMDAwIG4gCjAwMDAwMDAxMTUgMDAwMDAgbiAKMDAwMDAwMDI0MSAwMDAwMCBuIAowMDAwMDAwMzExIDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUgNiAvUm9vdCAxIDAgUiA+PgpzdGFydHhyZWYKNDE4CiUlRU9GCg==\"\n          }\n        }\n      ]\n    }\n  ],\n  \"prompt_cache_options\": {\n    \"ttl\": \"30m\",\n    \"mode\": \"explicit\"\n  }\n}")

request = Request(
    "https://open.scenepond.ai/v1/chat/completions",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "reasoning_effort": "medium",
  "max_completion_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "name": "reader",
      "content": [
        {
          "type": "text",
          "text": "What sentence is in this PDF?",
          "prompt_cache_breakpoint": {
            "mode": "explicit"
          }
        },
        {
          "type": "file",
          "file": {
            "filename": "sample.pdf",
            "file_data": "data:application/pdf;base64,JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCAzMDAgMTQ0XSAvUmVzb3VyY2VzIDw8IC9Gb250IDw8IC9GMSA0IDAgUiA+PiA+PiAvQ29udGVudHMgNSAwIFIgPj4KZW5kb2JqCjQgMCBvYmoKPDwgL1R5cGUgL0ZvbnQgL1N1YnR5cGUgL1R5cGUxIC9CYXNlRm9udCAvSGVsdmV0aWNhID4+CmVuZG9iago1IDAgb2JqCjw8IC9MZW5ndGggNTcgPj4Kc3RyZWFtCkJUIC9GMSAxMiBUZiAyMCAxMDAgVGQgKFNjZW5lcG9uZCBzYW1wbGUgZG9jdW1lbnQuKSBUaiBFVAplbmRzdHJlYW0KZW5kb2JqCnhyZWYKMCA2CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAwOSAwMDAwMCBuIAowMDAwMDAwMDU4IDAwMDAwIG4gCjAwMDAwMDAxMTUgMDAwMDAgbiAKMDAwMDAwMDI0MSAwMDAwMCBuIAowMDAwMDAwMzExIDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUgNiAvUm9vdCAxIDAgUiA+PgpzdGFydHhyZWYKNDE4CiUlRU9GCg=="
          }
        }
      ]
    }
  ],
  "prompt_cache_options": {
    "ttl": "30m",
    "mode": "explicit"
  }
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Replay an assistant refusal 3

Replay the refusal returned by an earlier assistant message before asking a new question.

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/chat/completions" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "reasoning_effort": "medium",
  "max_completion_tokens": 256,
  "messages": [
    {
      "role": "assistant",
      "content": null,
      "refusal": "I cannot help with that."
    },
    {
      "role": "user",
      "content": "Tell me a harmless fun fact."
    }
  ]
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"reasoning_effort\": \"medium\",\n  \"max_completion_tokens\": 256,\n  \"messages\": [\n    {\n      \"role\": \"assistant\",\n      \"content\": null,\n      \"refusal\": \"I cannot help with that.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"Tell me a harmless fun fact.\"\n    }\n  ]\n}")

request = Request(
    "https://open.scenepond.ai/v1/chat/completions",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "reasoning_effort": "medium",
  "max_completion_tokens": 256,
  "messages": [
    {
      "role": "assistant",
      "content": null,
      "refusal": "I cannot help with that."
    },
    {
      "role": "user",
      "content": "Tell me a harmless fun fact."
    }
  ]
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Function calling with optional parameters 4

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/chat/completions" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "messages": [
    {
      "role": "user",
      "content": "What is the weather in Singapore?"
    },
    {
      "role": "assistant",
      "content": null,
      "tool_calls": [
        {
          "id": "call_weather_example",
          "type": "function",
          "function": {
            "name": "get_weather",
            "arguments": "{\"city\":\"Singapore\"}"
          }
        }
      ]
    },
    {
      "role": "tool",
      "tool_call_id": "call_weather_example",
      "content": "{\"temperature_c\":30,\"condition\":\"sunny\"}"
    }
  ],
  "reasoning_effort": "none",
  "max_completion_tokens": 1024,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "get_weather",
        "description": "Get the weather for a city.",
        "strict": true,
        "parameters": {
          "type": "object",
          "properties": {
            "city": {
              "type": "string"
            }
          },
          "required": [
            "city"
          ],
          "additionalProperties": false
        }
      }
    }
  ],
  "tool_choice": {
    "type": "function",
    "function": {
      "name": "get_weather"
    }
  },
  "parallel_tool_calls": false,
  "stream": false
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"What is the weather in Singapore?\"\n    },\n    {\n      \"role\": \"assistant\",\n      \"content\": null,\n      \"tool_calls\": [\n        {\n          \"id\": \"call_weather_example\",\n          \"type\": \"function\",\n          \"function\": {\n            \"name\": \"get_weather\",\n            \"arguments\": \"{\\\"city\\\":\\\"Singapore\\\"}\"\n          }\n        }\n      ]\n    },\n    {\n      \"role\": \"tool\",\n      \"tool_call_id\": \"call_weather_example\",\n      \"content\": \"{\\\"temperature_c\\\":30,\\\"condition\\\":\\\"sunny\\\"}\"\n    }\n  ],\n  \"reasoning_effort\": \"none\",\n  \"max_completion_tokens\": 1024,\n  \"tools\": [\n    {\n      \"type\": \"function\",\n      \"function\": {\n        \"name\": \"get_weather\",\n        \"description\": \"Get the weather for a city.\",\n        \"strict\": true,\n        \"parameters\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"city\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"city\"\n          ],\n          \"additionalProperties\": false\n        }\n      }\n    }\n  ],\n  \"tool_choice\": {\n    \"type\": \"function\",\n    \"function\": {\n      \"name\": \"get_weather\"\n    }\n  },\n  \"parallel_tool_calls\": false,\n  \"stream\": false\n}")

request = Request(
    "https://open.scenepond.ai/v1/chat/completions",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "messages": [
    {
      "role": "user",
      "content": "What is the weather in Singapore?"
    },
    {
      "role": "assistant",
      "content": null,
      "tool_calls": [
        {
          "id": "call_weather_example",
          "type": "function",
          "function": {
            "name": "get_weather",
            "arguments": "{\"city\":\"Singapore\"}"
          }
        }
      ]
    },
    {
      "role": "tool",
      "tool_call_id": "call_weather_example",
      "content": "{\"temperature_c\":30,\"condition\":\"sunny\"}"
    }
  ],
  "reasoning_effort": "none",
  "max_completion_tokens": 1024,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "get_weather",
        "description": "Get the weather for a city.",
        "strict": true,
        "parameters": {
          "type": "object",
          "properties": {
            "city": {
              "type": "string"
            }
          },
          "required": [
            "city"
          ],
          "additionalProperties": false
        }
      }
    }
  ],
  "tool_choice": {
    "type": "function",
    "function": {
      "name": "get_weather"
    }
  },
  "parallel_tool_calls": false,
  "stream": false
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Choose a permitted function 5

Chat Completions nests the allowed function subset inside tool_choice.allowed_tools.

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/chat/completions" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "messages": [
    {
      "role": "user",
      "content": "What is the weather in Singapore?"
    }
  ],
  "reasoning_effort": "none",
  "max_completion_tokens": 1024,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "get_weather",
        "description": "Get the weather for a city.",
        "strict": true,
        "parameters": {
          "type": "object",
          "properties": {
            "city": {
              "type": "string"
            }
          },
          "required": [
            "city"
          ],
          "additionalProperties": false
        }
      }
    }
  ],
  "tool_choice": {
    "type": "allowed_tools",
    "allowed_tools": {
      "mode": "required",
      "tools": [
        {
          "type": "function",
          "function": {
            "name": "get_weather"
          }
        }
      ]
    }
  }
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"What is the weather in Singapore?\"\n    }\n  ],\n  \"reasoning_effort\": \"none\",\n  \"max_completion_tokens\": 1024,\n  \"tools\": [\n    {\n      \"type\": \"function\",\n      \"function\": {\n        \"name\": \"get_weather\",\n        \"description\": \"Get the weather for a city.\",\n        \"strict\": true,\n        \"parameters\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"city\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"city\"\n          ],\n          \"additionalProperties\": false\n        }\n      }\n    }\n  ],\n  \"tool_choice\": {\n    \"type\": \"allowed_tools\",\n    \"allowed_tools\": {\n      \"mode\": \"required\",\n      \"tools\": [\n        {\n          \"type\": \"function\",\n          \"function\": {\n            \"name\": \"get_weather\"\n          }\n        }\n      ]\n    }\n  }\n}")

request = Request(
    "https://open.scenepond.ai/v1/chat/completions",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "messages": [
    {
      "role": "user",
      "content": "What is the weather in Singapore?"
    }
  ],
  "reasoning_effort": "none",
  "max_completion_tokens": 1024,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "get_weather",
        "description": "Get the weather for a city.",
        "strict": true,
        "parameters": {
          "type": "object",
          "properties": {
            "city": {
              "type": "string"
            }
          },
          "required": [
            "city"
          ],
          "additionalProperties": false
        }
      }
    }
  ],
  "tool_choice": {
    "type": "allowed_tools",
    "allowed_tools": {
      "mode": "required",
      "tools": [
        {
          "type": "function",
          "function": {
            "name": "get_weather"
          }
        }
      ]
    }
  }
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Sampling with temperature 6

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/chat/completions" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "messages": [
    {
      "role": "user",
      "content": "Suggest a short title for a garden photo."
    }
  ],
  "reasoning_effort": "none",
  "max_completion_tokens": 128,
  "temperature": 0.2,
  "logprobs": true,
  "top_logprobs": 3
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Suggest a short title for a garden photo.\"\n    }\n  ],\n  \"reasoning_effort\": \"none\",\n  \"max_completion_tokens\": 128,\n  \"temperature\": 0.2,\n  \"logprobs\": true,\n  \"top_logprobs\": 3\n}")

request = Request(
    "https://open.scenepond.ai/v1/chat/completions",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "messages": [
    {
      "role": "user",
      "content": "Suggest a short title for a garden photo."
    }
  ],
  "reasoning_effort": "none",
  "max_completion_tokens": 128,
  "temperature": 0.2,
  "logprobs": true,
  "top_logprobs": 3
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Sampling with top_p 7

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/chat/completions" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "messages": [
    {
      "role": "user",
      "content": "Suggest a short title for a garden photo."
    }
  ],
  "reasoning_effort": "none",
  "max_completion_tokens": 128,
  "top_p": 0.8
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Suggest a short title for a garden photo.\"\n    }\n  ],\n  \"reasoning_effort\": \"none\",\n  \"max_completion_tokens\": 128,\n  \"top_p\": 0.8\n}")

request = Request(
    "https://open.scenepond.ai/v1/chat/completions",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "messages": [
    {
      "role": "user",
      "content": "Suggest a short title for a garden photo."
    }
  ],
  "reasoning_effort": "none",
  "max_completion_tokens": 128,
  "top_p": 0.8
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

<details>
<summary>Compatibility examples</summary>

#### Legacy token-limit alias 1

The gateway converts max_tokens to max_completion_tokens for this model. Prefer max_completion_tokens in new requests.

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/chat/completions" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "messages": [
    {
      "role": "user",
      "content": "Hello!"
    }
  ],
  "reasoning_effort": "medium",
  "max_tokens": 128,
  "user": "user_example",
  "prompt_cache_retention": "24h"
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Hello!\"\n    }\n  ],\n  \"reasoning_effort\": \"medium\",\n  \"max_tokens\": 128,\n  \"user\": \"user_example\",\n  \"prompt_cache_retention\": \"24h\"\n}")

request = Request(
    "https://open.scenepond.ai/v1/chat/completions",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "messages": [
    {
      "role": "user",
      "content": "Hello!"
    }
  ],
  "reasoning_effort": "medium",
  "max_tokens": 128,
  "user": "user_example",
  "prompt_cache_retention": "24h"
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

</details>

### Illustrative responses

Response examples show the structure only. IDs, URLs, and values are placeholders.

#### Completion response

```json
{
  "id": "chatcmpl_EXAMPLE",
  "object": "chat.completion",
  "model": "gpt-6-sol",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello!"
      },
      "finish_reason": "stop"
    }
  ]
}
```

### Request notes

- Use max_completion_tokens for Chat Completions; max_output_tokens belongs to Responses.
- Use developer messages for application instructions.
- Sampling controls and Chat Completions function calls require an explicit reasoning_effort of none. Omitting the effort does not select none.
- These models accept text and image inputs and produce text output.
- The current channel has not opened service_tier, safety_identifier or stream_options.include_obfuscation. These are gateway availability limits, not model exclusions; they are omitted from the parameter list and examples.
- Chat Completions file parts accept PDF only. file_url and PDF detail belong to Responses. The gateway does not implement Files upload, listing or download endpoints.

## Responses

`POST /v1/responses`

### Request parameters

- `model` — **Required**; `string`. Use this exact published model ID.
  - Constraints: gpt-6-sol

- `input` — **Required**; `string | object[]`. Send text, input messages or earlier tool results.

### Fields in input

These fields apply when input is supplied. A required child does not make its optional parent required.

- `input[].type` — **Conditional**; `string | null`. Input item type.
  - Only item_reference permits null or an omitted type. Message items may omit type; every other listed item requires its string discriminator.
  - Required except for message and item_reference items.
  - Constraints: message; function_call; function_call_output; reasoning; compaction; item_reference; computer_call_output; shell_call_output; apply_patch_call_output; mcp_approval_response; tool_search_call; tool_search_output; additional_tools; configuration_update; compaction_trigger; program; program_output

- `input[].role` — **Conditional**; `string`. Role of an input message.
  - additional_tools requires developer.
  - Required for message and additional_tools items.
  - Constraints: developer; system; user; assistant

- `input[].content` — **Conditional**; `string | object[]`. Message text, input content parts or earlier assistant output.
  - PDF files must each be under 50 MB; total files per request must not exceed 50 MB.
  - Required for message items.

### Fields in input[].content

These fields apply when input[].content is supplied. A required child does not make its optional parent required.

- `input[].content[].type` — **Required**; `string`. Content part type.
  - Use input_text, input_image or input_file for input content; output_text and refusal are only for assistant-message replay.
  - Constraints: input_text; input_image; input_file; output_text; refusal

- `input[].content[].text` — **Conditional**; `string`. Text content.
  - Required for input_text or output_text in an assistant-message replay.

- `input[].content[].refusal` — **Conditional**; `string`. Refusal text returned by the assistant.
  - Required for refusal content in an assistant-message replay.

- `input[].content[].annotations` — **Conditional**; `object[]`. Preserve annotations from an earlier output_text item.
  - Retain its original shape.
  - Required when replaying the complete output_text item.

- `input[].content[].image_url` — **Optional**; `string | null`. Image URL or base64 image data URL.
  - For input_image; provide image_url or an existing upstream file_id.

- `input[].content[].file_id` — **Optional**; `string | null`. Existing file ID on the executing upstream account.
  - For input_file or input_image; use one source per content part.

- `input[].content[].file_data` — **Optional**; `string`. Base64 file data, with filename.
  - For input_file; use file_data, file_url or file_id.

- `input[].content[].file_url` — **Optional**; `string`. Publicly accessible file URL.
  - For input_file; use file_data, file_url or file_id.

- `input[].content[].filename` — **Optional**; `string`. File name.
  - Use with inline file_data.

- `input[].content[].detail` — **Optional**; `string`. Choose the image detail level.
  - For input_image. For PDF input_file, use auto, low or high; default auto.
  - Default: `"auto"`
  - Constraints: auto; low; high

- `input[].content[].prompt_cache_breakpoint` — **Optional**; `object`. Mark the exact end of a reusable prompt prefix.
  - For input_text, input_image or input_file only.

### Fields in input[].content[].prompt_cache_breakpoint

These fields apply when input[].content[].prompt_cache_breakpoint is supplied. A required child does not make its optional parent required.

- `input[].content[].prompt_cache_breakpoint.mode` — **Required**; `string`. Explicit cache breakpoint mode.
  - Constraints: explicit



- `input[].call_id` — **Conditional**; `string`. The original tool or program call ID.
  - Preserve the original call ID for all tool results.
  - Required for function_call, computer_call_output, shell_call_output, apply_patch_call_output, program and program_output.

- `input[].output` — **Conditional**; `string | object | object[]`. Tool result content using the matching tool result format.
  - Optional string for apply_patch_call_output.
  - Required for function_call_output, computer_call_output and shell_call_output.

### Fields in input[].output

These fields apply when input[].output is supplied. A required child does not make its optional parent required.

- `input[].output[].type` — **Conditional**; `string`. Content part type.
  - Omit for shell output chunks.
  - Required for function result content parts and computer screenshots.
  - Constraints: input_text; input_image; input_file; computer_screenshot

- `input[].output[].text` — **Conditional**; `string`. Text content.
  - Required for input_text function results.

- `input[].output[].stdout` — **Conditional**; `string`. Captured shell standard output.
  - Required for shell output chunks.

- `input[].output[].stderr` — **Conditional**; `string`. Captured shell standard error.
  - Required for shell output chunks.

- `input[].output[].outcome` — **Conditional**; `object`. Shell command exit or timeout result.
  - Required for shell output chunks.

### Fields in input[].output[].outcome

These fields apply when input[].output[].outcome is supplied. A required child does not make its optional parent required.

- `input[].output[].outcome.type` — **Required**; `string`. Shell result type.
  - Constraints: exit; timeout

- `input[].output[].outcome.exit_code` — **Conditional**; `number`. Shell process exit code.
  - Required when type is exit.


- `input[].output[].image_url` — **Optional**; `string | null`. Image URL or base64 image data URL.
  - For input_image; provide image_url or an existing upstream file_id.

- `input[].output[].file_id` — **Optional**; `string | null`. Existing file ID on the executing upstream account.
  - For input_file or input_image; use one source per content part.

- `input[].output[].file_data` — **Optional**; `string | null`. Base64 file data, with filename.
  - For input_file; use file_data, file_url or file_id.

- `input[].output[].file_url` — **Optional**; `string | null`. Publicly accessible file URL.
  - For input_file; use file_data, file_url or file_id.

- `input[].output[].filename` — **Optional**; `string | null`. File name.
  - Use with inline file_data.

- `input[].output[].detail` — **Optional**; `string | null`. Choose the image detail level.
  - For input_image. For PDF input_file, use auto, low or high; default auto.
  - Default: `"auto"`
  - Constraints: auto; low; high

- `input[].output[].prompt_cache_breakpoint` — **Optional**; `object | null`. Mark the exact end of a reusable prompt prefix.
  - For input_text, input_image or input_file only.

### Fields in input[].output[].prompt_cache_breakpoint

These fields apply when input[].output[].prompt_cache_breakpoint is supplied. A required child does not make its optional parent required.

- `input[].output[].prompt_cache_breakpoint.mode` — **Required**; `string`. Explicit cache breakpoint mode.
  - Constraints: explicit



- `input[].id` — **Conditional**; `string`. Original item ID.
  - Otherwise preserve an existing item ID.
  - Required for item_reference, replayed output message or reasoning items, program and program_output.

- `input[].name` — **Conditional**; `string`. Tool name.
  - Optional for function_call_output.
  - Required for function_call.

- `input[].arguments` — **Conditional**; `string | object`. Function arguments or tool-search input.
  - function_call uses a JSON-encoded string; tool_search_call follows its declared parameter schema.
  - Required for function_call or tool_search_call.

- `input[].tools` — **Conditional**; `object[]`. Loaded or additional tool definitions using the same shape as the top-level tools array.
  - Required for tool_search_output or additional_tools.

- `input[].code` — **Conditional**; `string`. Original JavaScript source from a program item.
  - Required when replaying program.

- `input[].fingerprint` — **Conditional**; `string`. Opaque program replay fingerprint; preserve the original value.
  - Required when replaying program.

- `input[].result` — **Conditional**; `string`. Original program result.
  - Required when replaying program_output.

- `input[].status` — **Conditional**; `string | null`. Original item status.
  - Preserve the status of a replayed item; program_output uses completed or incomplete, apply_patch_call_output uses completed or failed.
  - Required for program_output.
  - Constraints: in_progress; completed; incomplete; failed

- `input[].summary` — **Conditional**; `object[]`. Replay the reasoning summary from the original response.
  - Required for reasoning items.

### Fields in input[].summary

These fields apply when input[].summary is supplied. A required child does not make its optional parent required.

- `input[].summary[].type` — **Required**; `string`. Reasoning summary part type.
  - Constraints: summary_text

- `input[].summary[].text` — **Required**; `string`. Reasoning summary text.


- `input[].encrypted_content` — **Conditional**; `string | null`. Replay original encrypted reasoning or compaction content unchanged.
  - For reasoning items when returned by the upstream response.
  - Required for compaction items.

- `input[].approval_request_id` — **Conditional**; `string`. MCP approval request being answered.
  - Required for mcp_approval_response.

- `input[].approve` — **Conditional**; `boolean`. Approve or reject the MCP request.
  - Required for mcp_approval_response.

- `input[].acknowledged_safety_checks` — **Optional**; `object[] | null`. Acknowledge pending computer-use safety checks from the earlier call.
  - For computer_call_output.

### Fields in input[].acknowledged_safety_checks

These fields apply when input[].acknowledged_safety_checks is supplied. A required child does not make its optional parent required.

- `input[].acknowledged_safety_checks[].id` — **Required**; `string`. Pending safety-check ID.

- `input[].acknowledged_safety_checks[].code` — **Optional**; `string | null`. Safety-check type.

- `input[].acknowledged_safety_checks[].message` — **Optional**; `string | null`. Safety-check details.


- `input[].max_output_length` — **Optional**; `number | null`. Maximum captured UTF-8 characters for the shell output.
  - For shell_call_output.

- `input[].namespace` — **Optional**; `string | null`. Namespace containing the called tool.
  - For namespaced function calls and function results; preserve an earlier namespace unchanged.

- `input[].caller` — **Optional**; `object | null`. Preserve the execution context of an earlier tool call.
  - For function calls and results, or supported custom-tool calls and results.

### Fields in input[].caller

These fields apply when input[].caller is supplied. A required child does not make its optional parent required.

- `input[].caller.type` — **Required**; `string`. Tool-call execution context.
  - Constraints: direct; program

- `input[].caller.caller_id` — **Conditional**; `string`. Original program call ID.
  - Required when caller.type is program.


- `input[].execution` — **Optional**; `string`. Where tool search executes.
  - For tool_search_call or tool_search_output.
  - Constraints: server; client

- `input[].reasoning` — **Optional**; `object`. Change reasoning effort for subsequent turns.
  - For configuration_update in standard, single-agent mode. Do not combine with automatic compaction or truncation, or place updates next to each other.

### Fields in input[].reasoning

These fields apply when input[].reasoning is supplied. A required child does not make its optional parent required.

- `input[].reasoning.effort` — **Optional**; `string | null`. Updated reasoning effort; the original request-level effort stays unchanged.
  - Constraints: none; low; medium; high; xhigh; max


- `input[].phase` — **Optional**; `string | null`. Assistant message phase.
  - For assistant messages.
  - Constraints: commentary; final_answer

- `input[].reason` — **Optional**; `string | null`. Optional reason for the MCP approval decision.
  - For mcp_approval_response.


- `stream` — **Optional**; `boolean | null`. Set true for server-sent events; false or null uses a non-streaming response.

- `metadata` — **Optional**; `object | null`. Attach string metadata to the request.
  - Constraints: At most 16 key-value pairs; keys have at most 64 characters and string values have at most 512 characters.

- `store` — **Optional**; `boolean | null`. Request response storage. The upstream defaults to true; account and gateway policy may override storage.
  - Default: `true`

- `prompt_cache_key` — **Optional**; `string | null`. Group requests that share a reusable prompt prefix.

- `prompt_cache_options` — **Optional**; `object`. Configure prompt caching.

### Fields in prompt_cache_options

These fields apply when prompt_cache_options is supplied. A required child does not make its optional parent required.

- `prompt_cache_options.ttl` — **Optional**; `string`. Minimum cache lifetime.
  - Default: `"30m"`
  - Constraints: 30m

- `prompt_cache_options.mode` — **Optional**; `string`. Choose implicit or explicit cache breakpoints.
  - Default: `"implicit"`
  - Constraints: implicit; explicit

- `prompt_cache_options.comparison_response_id` — **Optional**; `string | null`. Compare cache reuse with an earlier response.
  - Requires an existing response ID and upstream diagnostics access.

- `prompt_cache_options.prewarm` — **Optional**; `boolean`. Prepare the prompt cache without generating output.
  - Default: `false`


- `instructions` — **Optional**; `string | null`. Set the system or developer instructions.

- `previous_response_id` — **Optional**; `string | null`. Continue from an earlier response ID.

- `conversation` — **Optional**; `string | object | null`. Use an existing upstream conversation.
  - Cannot be combined with previous_response_id.

### Fields in conversation

These fields apply when conversation is supplied. A required child does not make its optional parent required.

- `conversation.id` — **Conditional**; `string`. Existing conversation ID.
  - Required when conversation is an object.


- `prompt` — **Optional**; `object | null`. Use a saved upstream prompt template.

### Fields in prompt

These fields apply when prompt is supplied. A required child does not make its optional parent required.

- `prompt.id` — **Required**; `string`. Existing prompt-template ID.

- `prompt.version` — **Optional**; `string | null`. Select a saved prompt version.

- `prompt.variables` — **Optional**; `object | null`. Supply values for the saved prompt variables.


- `context_management` — **Optional**; `object[] | null`. Configure context compaction.

### Fields in context_management

These fields apply when context_management is supplied. A required child does not make its optional parent required.

- `context_management[].type` — **Required**; `string`. Context-management operation.
  - Constraints: compaction

- `context_management[].compact_threshold` — **Optional**; `number | null`. Token threshold for context compaction.


- `reasoning` — **Optional**; `object | null`. Configure reasoning for this response.

### Fields in reasoning

These fields apply when reasoning is supplied. A required child does not make its optional parent required.

- `reasoning.effort` — **Optional**; `string | null`. Choose the reasoning effort for this request.
  - Default: `"medium"`
  - Constraints: none; low; medium; high; xhigh; max

- `reasoning.mode` — **Optional**; `string | null`. Choose the reasoning execution mode.
  - Default: `"standard"`
  - Constraints: standard; pro

- `reasoning.summary` — **Optional**; `string | null`. Request a summary of reasoning.
  - Constraints: auto; concise; detailed

- `reasoning.context` — **Optional**; `string | null`. Control which earlier reasoning is reused.
  - Constraints: auto; current_turn


- `max_output_tokens` — **Optional**; `integer | null`. Limit total generated tokens, including reasoning tokens.
  - Constraints: Maximum value: 128000

- `moderation` — **Optional**; `object | null`. Request moderation scores with the generated response.

### Fields in moderation

These fields apply when moderation is supplied. A required child does not make its optional parent required.

- `moderation.model` — **Required**; `string`. Moderation model, for example omni-moderation-latest.

- `moderation.policy` — **Optional**; `object | null`. Choose whether to score or block input and output.

### Fields in moderation.policy

These fields apply when moderation.policy is supplied. A required child does not make its optional parent required.

- `moderation.policy.input` — **Optional**; `object | null`. Moderation policy for this part of the request.

### Fields in moderation.policy.input

These fields apply when moderation.policy.input is supplied. A required child does not make its optional parent required.

- `moderation.policy.input.mode` — **Required**; `string`. Moderation policy mode.
  - Constraints: score; block


- `moderation.policy.output` — **Optional**; `object | null`. Moderation policy for this part of the request.

### Fields in moderation.policy.output

These fields apply when moderation.policy.output is supplied. A required child does not make its optional parent required.

- `moderation.policy.output.mode` — **Required**; `string`. Moderation policy mode.
  - Constraints: score; block




- `text` — **Optional**; `object`. Configure text output.

### Fields in text

These fields apply when text is supplied. A required child does not make its optional parent required.

- `text.verbosity` — **Optional**; `string | null`. Choose how much detail to include in the answer.
  - Default: `"medium"`
  - Constraints: low; medium; high

- `text.format` — **Optional**; `object`. Configure text or structured JSON output.
  - Default: `{"type":"text"}`

### Fields in text.format

These fields apply when text.format is supplied. A required child does not make its optional parent required.

- `text.format.type` — **Required**; `string`. Output format.
  - Constraints: text; json_object; json_schema

- `text.format.name` — **Conditional**; `string`. Output schema name.
  - Required when type is json_schema.
  - Constraints: Maximum characters: 64; Use only ASCII letters, digits, underscores (_) or hyphens (-).

- `text.format.schema` — **Conditional**; `object`. JSON Schema for the structured output.
  - Required when type is json_schema.

- `text.format.description` — **Optional**; `string`. Describe the expected structured output.
  - Used when type is json_schema.

- `text.format.strict` — **Optional**; `boolean | null`. Enable strict adherence to the supported JSON Schema subset.
  - Used when type is json_schema.



- `tools` — **Optional**; `object[]`. Declare supported built-in tools or your application functions.

### Fields in tools

These fields apply when tools is supplied. A required child does not make its optional parent required.

- `tools[].type` — **Required**; `string`. Tool type.
  - Constraints: function; namespace; programmatic_tool_calling; web_search; file_search; image_generation; code_interpreter; shell; apply_patch; computer; mcp; tool_search

- `tools[].name` — **Conditional**; `string`. Function or namespace name.
  - Required when type is function or namespace.

- `tools[].description` — **Conditional**; `string | null`. Describe when the function should be called.
  - For function, namespace or tool_search tools.
  - Required when type is namespace.

- `tools[].parameters` — **Conditional**; `JSON value`. JSON Schema for the function arguments.
  - For function tools, use an object or null. Optional client tool_search parameters accept a JSON value.
  - Required when type is function.

- `tools[].tools` — **Conditional**; `object[]`. Tool definitions grouped inside a namespace.
  - Required when type is namespace.

### Fields in tools[].tools

These fields apply when tools[].tools is supplied. A required child does not make its optional parent required.

- `tools[].tools[].type` — **Required**; `string`. Namespaced tool type.
  - Constraints: function

- `tools[].tools[].name` — **Required**; `string`. Namespaced tool name.

- `tools[].tools[].description` — **Optional**; `string | null`. Describe when the tool should be called.

- `tools[].tools[].parameters` — **Optional**; `JSON value`. Optional JSON Schema for a namespaced function.
  - For function tools inside a namespace.

- `tools[].tools[].strict` — **Optional**; `boolean | null`. Enable strict adherence to the supported JSON Schema subset.
  - Optional for namespaced functions. If omitted, the upstream attempts strict validation when the schema is compatible and otherwise uses non-strict validation.

- `tools[].tools[].allowed_callers` — **Optional**; `string[] | null`. Limit how the tool may be invoked.
  - Constraints: direct; programmatic

- `tools[].tools[].defer_loading` — **Optional**; `boolean`. Load this tool through tool search.

- `tools[].tools[].output_schema` — **Optional**; `object | null`. JSON Schema for the JSON value encoded in a function result.
  - For function tools.


- `tools[].vector_store_ids` — **Conditional**; `string[]`. Existing upstream vector stores to search.
  - Required when type is file_search.

- `tools[].server_label` — **Conditional**; `string`. MCP server label.
  - Required when type is mcp.

- `tools[].container` — **Conditional**; `string | object`. Existing container ID or automatic code-interpreter container.
  - Required when type is code_interpreter.

### Fields in tools[].container

These fields apply when tools[].container is supplied. A required child does not make its optional parent required.

- `tools[].container.type` — **Required**; `string`. Automatic container type.
  - Constraints: auto

- `tools[].container.file_ids` — **Optional**; `string[]`. Existing upstream files available inside the container.

- `tools[].container.memory_limit` — **Optional**; `string | null`. Container memory limit.
  - Constraints: 1g; 4g; 16g; 64g

- `tools[].container.network_policy` — **Optional**; `object`. Configure container outbound networking.

### Fields in tools[].container.network_policy

These fields apply when tools[].container.network_policy is supplied. A required child does not make its optional parent required.

- `tools[].container.network_policy.type` — **Required**; `string`. Network policy type.
  - Constraints: disabled; allowlist

- `tools[].container.network_policy.allowed_domains` — **Conditional**; `string[]`. Domains the container may access.
  - Required when type is allowlist.

- `tools[].container.network_policy.domain_secrets` — **Optional**; `object[]`. Optional secrets scoped to allowed domains.
  - For allowlist policies.

### Fields in tools[].container.network_policy.domain_secrets

These fields apply when tools[].container.network_policy.domain_secrets is supplied. A required child does not make its optional parent required.

- `tools[].container.network_policy.domain_secrets[].domain` — **Required**; `string`. Domain receiving this secret.

- `tools[].container.network_policy.domain_secrets[].name` — **Required**; `string`. Secret name.

- `tools[].container.network_policy.domain_secrets[].value` — **Required**; `string`. Secret value.




- `tools[].strict` — **Optional**; `boolean | null`. Enable strict adherence to the supported JSON Schema subset.
  - For function tools. If omitted, Responses attempts strict schema normalization and falls back to non-strict calling when needed.

- `tools[].allowed_callers` — **Optional**; `string[] | null`. Limit how the tool may be invoked.
  - For function, mcp, code_interpreter, shell or apply_patch. Programmatic calling also requires the programmatic_tool_calling tool.
  - Constraints: direct; programmatic

- `tools[].defer_loading` — **Optional**; `boolean`. Load the function or MCP tools through tool search.
  - For function or mcp tools; on namespace children, not the namespace itself.

- `tools[].output_schema` — **Optional**; `object | null`. JSON Schema for the JSON value encoded in a function result.
  - For function tools.

- `tools[].max_num_results` — **Optional**; `number`. Maximum file-search result count.
  - For file_search.
  - Constraints: Minimum value: 1; Maximum value: 50

- `tools[].filters` — **Optional**; `object | null`. Limit file-search attributes or web-search domains.
  - For file_search or web_search.

### Fields in tools[].filters

These fields apply when tools[].filters is supplied. A required child does not make its optional parent required.

- `tools[].filters.type` — **Conditional**; `string`. File-search comparison or compound operator.
  - Required for file_search filters.
  - Constraints: eq; ne; gt; gte; lt; lte; in; nin; and; or

- `tools[].filters.key` — **Conditional**; `string`. File attribute to compare.
  - Required for a comparison filter.

- `tools[].filters.value` — **Conditional**; `string | number | boolean | string[] | number[]`. Value or values for a comparison filter.
  - Required for a comparison filter.

- `tools[].filters.filters` — **Conditional**; `object[]`. Nested comparison or compound filters using the same filter shape.
  - Required for and or or.

- `tools[].filters.allowed_domains` — **Optional**; `string[] | null`. Allowed web-search domains, including their subdomains.
  - For web_search; omit the URL scheme.
  - Constraints: Maximum items: 100

- `tools[].filters.blocked_domains` — **Optional**; `string[]`. Exclude web-search domains, including their subdomains.
  - For web_search; omit the URL scheme.
  - Constraints: Maximum items: 100


- `tools[].ranking_options` — **Optional**; `object`. Configure file-search ranking.
  - For file_search.

### Fields in tools[].ranking_options

These fields apply when tools[].ranking_options is supplied. A required child does not make its optional parent required.

- `tools[].ranking_options.ranker` — **Optional**; `string`. File-search ranker.
  - Constraints: auto; default-2024-11-15

- `tools[].ranking_options.score_threshold` — **Optional**; `number`. Minimum relevance score.
  - Constraints: Minimum value: 0; Maximum value: 1

- `tools[].ranking_options.hybrid_search` — **Optional**; `object`. Balance semantic and keyword matches.

### Fields in tools[].ranking_options.hybrid_search

These fields apply when tools[].ranking_options.hybrid_search is supplied. A required child does not make its optional parent required.

- `tools[].ranking_options.hybrid_search.embedding_weight` — **Required**; `number`. Semantic match weight.

- `tools[].ranking_options.hybrid_search.text_weight` — **Required**; `number`. Keyword match weight.



- `tools[].external_web_access` — **Optional**; `boolean`. Allow live web access instead of cached results only.
  - For web_search.
  - Default: `true`

- `tools[].return_token_budget` — **Optional**; `string`. Limit the amount of returned web-search content.
  - For reasoning web_search only; omit when reasoning.effort is none. Not supported by web_search_preview.
  - Default: `"default"`
  - Constraints: default; unlimited

- `tools[].search_context_size` — **Optional**; `string`. Amount of context used for web search.
  - For web_search.
  - Default: `"medium"`
  - Constraints: low; medium; high

- `tools[].user_location` — **Optional**; `object | null`. Approximate location for web search; omitted or null defaults to the United States.
  - For web_search. Use type approximate without location fields to avoid the location fallback.

### Fields in tools[].user_location

These fields apply when tools[].user_location is supplied. A required child does not make its optional parent required.

- `tools[].user_location.type` — **Optional**; `string`. Location approximation type.
  - Constraints: approximate

- `tools[].user_location.country` — **Optional**; `string | null`. Two-letter ISO country code.

- `tools[].user_location.city` — **Optional**; `string | null`. City name.

- `tools[].user_location.region` — **Optional**; `string | null`. Region name.

- `tools[].user_location.timezone` — **Optional**; `string | null`. IANA time zone.


- `tools[].server_url` — **Optional**; `string`. Remote MCP server URL.
  - For mcp; provide server_url, connector_id or tunnel_id.

- `tools[].connector_id` — **Optional**; `string`. Deprecated upstream connector ID; prefer server_url or tunnel_id for newer models.
  - For mcp; provide server_url, connector_id or tunnel_id.
  - Constraints: connector_dropbox; connector_gmail; connector_googlecalendar; connector_googledrive; connector_microsoftteams; connector_outlookcalendar; connector_outlookemail; connector_sharepoint

- `tools[].server_description` — **Optional**; `string`. Describe the MCP server.
  - For mcp.

- `tools[].authorization` — **Optional**; `string`. Authorization token required by the MCP server or connector.
  - For mcp; use credentials authorized for this server.

- `tools[].headers` — **Optional**; `object | null`. String-valued HTTP headers for the MCP server.
  - For mcp.

- `tools[].tunnel_id` — **Optional**; `string`. Existing secure MCP tunnel ID.
  - For mcp with upstream tunnel access.

- `tools[].allowed_tools` — **Optional**; `string[] | object | null`. Restrict tools exposed by the MCP server.
  - For mcp.

### Fields in tools[].allowed_tools

These fields apply when tools[].allowed_tools is supplied. A required child does not make its optional parent required.

- `tools[].allowed_tools[].read_only` — **Optional**; `boolean`. Select read-only tools.

- `tools[].allowed_tools[].tool_names` — **Optional**; `string[]`. Select tools by name.


- `tools[].require_approval` — **Optional**; `string | object | null`. Require approval for remote MCP calls.
  - For mcp.
  - Constraints: always; never

### Fields in tools[].require_approval

These fields apply when tools[].require_approval is supplied. A required child does not make its optional parent required.

- `tools[].require_approval.always` — **Optional**; `object`. Tools that always require approval.

### Fields in tools[].require_approval.always

These fields apply when tools[].require_approval.always is supplied. A required child does not make its optional parent required.

- `tools[].require_approval.always.read_only` — **Optional**; `boolean`. Select read-only tools.

- `tools[].require_approval.always.tool_names` — **Optional**; `string[]`. Select tools by name.


- `tools[].require_approval.never` — **Optional**; `object`. Tools that do not require approval.

### Fields in tools[].require_approval.never

These fields apply when tools[].require_approval.never is supplied. A required child does not make its optional parent required.

- `tools[].require_approval.never.read_only` — **Optional**; `boolean`. Select read-only tools.

- `tools[].require_approval.never.tool_names` — **Optional**; `string[]`. Select tools by name.



- `tools[].environment` — **Optional**; `object | null`. Configure the shell execution environment.
  - For shell.

### Fields in tools[].environment

These fields apply when tools[].environment is supplied. A required child does not make its optional parent required.

- `tools[].environment.type` — **Required**; `string`. Shell environment type.
  - Constraints: container_auto; container_reference; local

- `tools[].environment.container_id` — **Conditional**; `string`. Existing upstream container ID.
  - Required for container_reference.

- `tools[].environment.file_ids` — **Optional**; `string[]`. Existing upstream files available inside the container.
  - For container_auto.

- `tools[].environment.memory_limit` — **Optional**; `string | null`. Container memory limit.
  - For container_auto.
  - Constraints: 1g; 4g; 16g; 64g

- `tools[].environment.network_policy` — **Optional**; `object`. Configure container outbound networking.
  - For container_auto; omit for local or container_reference.

### Fields in tools[].environment.network_policy

These fields apply when tools[].environment.network_policy is supplied. A required child does not make its optional parent required.

- `tools[].environment.network_policy.type` — **Required**; `string`. Network policy type.
  - Constraints: disabled; allowlist

- `tools[].environment.network_policy.allowed_domains` — **Conditional**; `string[]`. Domains the container may access.
  - Required when type is allowlist.

- `tools[].environment.network_policy.domain_secrets` — **Optional**; `object[]`. Optional secrets scoped to allowed domains.
  - For allowlist policies.

### Fields in tools[].environment.network_policy.domain_secrets

These fields apply when tools[].environment.network_policy.domain_secrets is supplied. A required child does not make its optional parent required.

- `tools[].environment.network_policy.domain_secrets[].domain` — **Required**; `string`. Domain receiving this secret.

- `tools[].environment.network_policy.domain_secrets[].name` — **Required**; `string`. Secret name.

- `tools[].environment.network_policy.domain_secrets[].value` — **Required**; `string`. Secret value.



- `tools[].environment.skills` — **Optional**; `object[]`. Skills available to the shell environment.
  - For container_auto or local; omit for container_reference.

### Fields in tools[].environment.skills

These fields apply when tools[].environment.skills is supplied. A required child does not make its optional parent required.

- `tools[].environment.skills[].type` — **Conditional**; `string`. Hosted skill source type.
  - Omit for local skills.
  - Required for container_auto skills.
  - Constraints: skill_reference; inline

- `tools[].environment.skills[].skill_id` — **Conditional**; `string`. Existing upstream skill ID.
  - Required for skill_reference.

- `tools[].environment.skills[].name` — **Conditional**; `string`. Skill name.
  - Required for inline and local skills.

- `tools[].environment.skills[].description` — **Conditional**; `string`. Skill description.
  - Required for inline and local skills.

- `tools[].environment.skills[].path` — **Conditional**; `string`. Local directory containing the skill.
  - Required for local skills.

- `tools[].environment.skills[].source` — **Conditional**; `object`. Inline skill bundle.
  - Required for inline skills.

### Fields in tools[].environment.skills[].source

These fields apply when tools[].environment.skills[].source is supplied. A required child does not make its optional parent required.

- `tools[].environment.skills[].source.type` — **Required**; `string`. Inline source encoding.
  - Constraints: base64

- `tools[].environment.skills[].source.media_type` — **Required**; `string`. Inline skill media type.
  - Constraints: application/zip

- `tools[].environment.skills[].source.data` — **Required**; `string`. Base64-encoded ZIP skill bundle.


- `tools[].environment.skills[].version` — **Optional**; `string`. Skill version: a positive integer or latest.
  - For skill_reference.



- `tools[].execution` — **Optional**; `string`. Where tool search executes.
  - For tool_search.
  - Constraints: server; client

- `tools[].action` — **Optional**; `string`. Image generation or editing action.
  - For image_generation.
  - Default: `"auto"`
  - Constraints: auto; generate; edit

- `tools[].background` — **Optional**; `string`. Generated image background.
  - For image_generation; transparent requires png or webp and a compatible image model.
  - Default: `"auto"`
  - Constraints: auto; opaque; transparent

- `tools[].model` — **Optional**; `string`. Image model used by the image_generation tool.
  - For image_generation; availability and options depend on the selected upstream image model.
  - Default: `"gpt-image-1"`

- `tools[].input_fidelity` — **Optional**; `string | null`. Preserve input-image features during editing.
  - For image_generation with gpt-image-1 or gpt-image-1.5; gpt-image-1-mini accepts low only. Omit for gpt-image-2.
  - Constraints: low; high

- `tools[].input_image_mask` — **Optional**; `object`. Optional inpainting mask.
  - For image_generation.

### Fields in tools[].input_image_mask

These fields apply when tools[].input_image_mask is supplied. A required child does not make its optional parent required.

- `tools[].input_image_mask.file_id` — **Optional**; `string`. Existing upstream mask file ID.

- `tools[].input_image_mask.image_url` — **Optional**; `string`. Base64 mask image data URL.


- `tools[].moderation` — **Optional**; `string`. Image-generation moderation level.
  - For image_generation.
  - Default: `"auto"`
  - Constraints: auto; low

- `tools[].output_compression` — **Optional**; `number`. Generated image compression level.
  - For image_generation.
  - Default: `100`
  - Constraints: Minimum value: 0; Maximum value: 100

- `tools[].output_format` — **Optional**; `string`. Generated image file format.
  - For image_generation.
  - Default: `"png"`
  - Constraints: png; webp; jpeg

- `tools[].partial_images` — **Optional**; `number`. Partial images returned during streaming.
  - For image_generation.
  - Default: `0`
  - Constraints: Minimum value: 0; Maximum value: 3

- `tools[].quality` — **Optional**; `string`. Generated image quality.
  - For image_generation; xhigh and max require gpt-image-2.5-sunburst or gpt-image-2.5-flare.
  - Default: `"auto"`
  - Constraints: auto; low; medium; high; xhigh; max

- `tools[].size` — **Optional**; `string`. Generated image dimensions.
  - For image_generation; custom dimensions depend on the selected image model.
  - Constraints: Dimensions follow the selected image model; standard sizes include 1024x1024, 1536x1024 and 1024x1536.


- `tool_choice` — **Optional**; `string | object`. Select automatic, required, disabled or a named function call.
  - Constraints: none; auto; required

### Fields in tool_choice

These fields apply when tool_choice is supplied. A required child does not make its optional parent required.

- `tool_choice.type` — **Required**; `string`. Tool-choice object type.
  - Constraints: function; allowed_tools; mcp; file_search; web_search_preview; computer; code_interpreter; image_generation; shell; apply_patch; programmatic_tool_calling

- `tool_choice.name` — **Conditional**; `string | null`. Function or remote tool name.
  - Optional when type is mcp.
  - Required when type is function.

- `tool_choice.server_label` — **Conditional**; `string`. MCP server label.
  - Required when type is mcp.

- `tool_choice.mode` — **Conditional**; `string`. Choose how the allowed tool subset is used.
  - Required when type is allowed_tools.
  - Constraints: auto; required

- `tool_choice.tools` — **Conditional**; `object[]`. Allowed tool references using this protocol’s function-name shape.
  - Required when type is allowed_tools.

### Fields in tool_choice.tools

These fields apply when tool_choice.tools is supplied. A required child does not make its optional parent required.

- `tool_choice.tools[].type` — **Required**; `string`. Allowed tool reference type.
  - Match a tool declared in the request.

- `tool_choice.tools[].name` — **Conditional**; `string`. Allowed function or custom-tool name.
  - Required for function tool references.

- `tool_choice.tools[].server_label` — **Conditional**; `string`. MCP server label.
  - Required for mcp tool references.



- `parallel_tool_calls` — **Optional**; `boolean | null`. Allow multiple function calls in one turn.

- `max_tool_calls` — **Optional**; `integer | null`. Limit total calls to built-in tools in this response.

- `truncation` — **Optional**; `string | null`. Choose whether to truncate an oversized input.
  - Default: `"disabled"`
  - Constraints: auto; disabled

- `access_programs` — **Optional**; `object`. Select an optional access program.

### Fields in access_programs

These fields apply when access_programs is supplied. A required child does not make its optional parent required.

- `access_programs.cyber` — **Optional**; `string`. Select the Cyber access program.
  - daybreak_blue requires the model-specific organization and project approval.
  - Constraints: standard; daybreak_blue


- `include` — **Optional**; `string[] | null`. Request additional response data.
  - Include message.output_text.logprobs only when reasoning.effort is explicitly none.
  - Constraints: file_search_call.results; web_search_call.results; web_search_call.action.sources; message.input_image.image_url; computer_call_output.output.image_url; code_interpreter_call.outputs; reasoning.encrypted_content; message.output_text.logprobs

- `temperature` — **Optional**; `number | null`. Adjust sampling randomness.
  - Supported only when reasoning.effort is explicitly set to none.
  - Constraints: Minimum value: 0; Maximum value: 2

- `top_p` — **Optional**; `number | null`. Adjust nucleus sampling instead of temperature.
  - Supported only when reasoning.effort is explicitly set to none.
  - Constraints: Minimum value: 0; Maximum value: 1

- `top_logprobs` — **Optional**; `integer | null`. Return the most likely tokens at each output position.
  - Supported only when reasoning.effort is explicitly set to none.
  - Constraints: Minimum value: 0; Maximum value: 20

<details>
<summary>Compatibility parameters</summary>

- `prompt_cache_retention` — **Optional**; `string | null`. Deprecated cache-retention policy; use prompt_cache_options.ttl for the minimum cache lifetime.
  - Constraints: 24h

- `user` — **Optional**; `string | null`. Deprecated user identifier; use prompt_cache_key for cache grouping. The current channel has not opened safety_identifier.

</details>

### Minimum request

#### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "input": "Hello!",
  "reasoning": {
    "effort": "medium"
  },
  "stream": false
}
JSON
```

#### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"input\": \"Hello!\",\n  \"reasoning\": {\n    \"effort\": \"medium\"\n  },\n  \"stream\": false\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

#### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "input": "Hello!",
  "reasoning": {
    "effort": "medium"
  },
  "stream": false
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

### Optional parameter examples

#### Streaming with optional parameters 1

##### cURL

```bash
curl --fail-with-body --no-buffer -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "input": [
    {
      "type": "message",
      "role": "user",
      "content": "Explain why leaves are green."
    }
  ],
  "instructions": "Answer briefly as JSON with an answer field.",
  "reasoning": {
    "effort": "medium",
    "mode": "standard",
    "summary": "auto",
    "context": "auto"
  },
  "max_output_tokens": 1024,
  "text": {
    "verbosity": "low",
    "format": {
      "type": "json_schema",
      "name": "answer",
      "description": "A short answer.",
      "strict": true,
      "schema": {
        "type": "object",
        "properties": {
          "answer": {
            "type": "string"
          }
        },
        "required": [
          "answer"
        ],
        "additionalProperties": false
      }
    }
  },
  "stream": true,
  "store": false,
  "metadata": {
    "example": "structured-output"
  },
  "prompt_cache_key": "science-answer-v1",
  "prompt_cache_options": {
    "ttl": "30m",
    "mode": "implicit"
  },
  "truncation": "disabled",
  "context_management": [
    {
      "type": "compaction",
      "compact_threshold": 100000
    }
  ]
}
JSON
```

##### Python

```python
import os
import json
import sys
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"input\": [\n    {\n      \"type\": \"message\",\n      \"role\": \"user\",\n      \"content\": \"Explain why leaves are green.\"\n    }\n  ],\n  \"instructions\": \"Answer briefly as JSON with an answer field.\",\n  \"reasoning\": {\n    \"effort\": \"medium\",\n    \"mode\": \"standard\",\n    \"summary\": \"auto\",\n    \"context\": \"auto\"\n  },\n  \"max_output_tokens\": 1024,\n  \"text\": {\n    \"verbosity\": \"low\",\n    \"format\": {\n      \"type\": \"json_schema\",\n      \"name\": \"answer\",\n      \"description\": \"A short answer.\",\n      \"strict\": true,\n      \"schema\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"answer\": {\n            \"type\": \"string\"\n          }\n        },\n        \"required\": [\n          \"answer\"\n        ],\n        \"additionalProperties\": false\n      }\n    }\n  },\n  \"stream\": true,\n  \"store\": false,\n  \"metadata\": {\n    \"example\": \"structured-output\"\n  },\n  \"prompt_cache_key\": \"science-answer-v1\",\n  \"prompt_cache_options\": {\n    \"ttl\": \"30m\",\n    \"mode\": \"implicit\"\n  },\n  \"truncation\": \"disabled\",\n  \"context_management\": [\n    {\n      \"type\": \"compaction\",\n      \"compact_threshold\": 100000\n    }\n  ]\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    for line in response:
        sys.stdout.buffer.write(line)
        sys.stdout.buffer.flush()
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "input": [
    {
      "type": "message",
      "role": "user",
      "content": "Explain why leaves are green."
    }
  ],
  "instructions": "Answer briefly as JSON with an answer field.",
  "reasoning": {
    "effort": "medium",
    "mode": "standard",
    "summary": "auto",
    "context": "auto"
  },
  "max_output_tokens": 1024,
  "text": {
    "verbosity": "low",
    "format": {
      "type": "json_schema",
      "name": "answer",
      "description": "A short answer.",
      "strict": true,
      "schema": {
        "type": "object",
        "properties": {
          "answer": {
            "type": "string"
          }
        },
        "required": [
          "answer"
        ],
        "additionalProperties": false
      }
    }
  },
  "stream": true,
  "store": false,
  "metadata": {
    "example": "structured-output"
  },
  "prompt_cache_key": "science-answer-v1",
  "prompt_cache_options": {
    "ttl": "30m",
    "mode": "implicit"
  },
  "truncation": "disabled",
  "context_management": [
    {
      "type": "compaction",
      "compact_threshold": 100000
    }
  ]
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
if (!response.body) throw new Error("Missing response stream");
const reader = response.body.getReader();
const decoder = new TextDecoder();
try {
  while (true) {
    const { value, done } = await reader.read();
    if (done) break;
    process.stdout.write(decoder.decode(value, { stream: true }));
  }
  process.stdout.write(decoder.decode());
} finally {
  await reader.cancel();
  reader.releaseLock();
}
```

#### Function calling with optional parameters 2

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "input": "What is the weather in Singapore?",
  "reasoning": {
    "effort": "medium"
  },
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "function",
      "name": "get_weather",
      "description": "Get the weather for a city.",
      "strict": true,
      "parameters": {
        "type": "object",
        "properties": {
          "city": {
            "type": "string"
          }
        },
        "required": [
          "city"
        ],
        "additionalProperties": false
      },
      "allowed_callers": [
        "direct"
      ]
    }
  ],
  "tool_choice": {
    "type": "function",
    "name": "get_weather"
  },
  "parallel_tool_calls": false,
  "stream": false
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"input\": \"What is the weather in Singapore?\",\n  \"reasoning\": {\n    \"effort\": \"medium\"\n  },\n  \"max_output_tokens\": 1024,\n  \"tools\": [\n    {\n      \"type\": \"function\",\n      \"name\": \"get_weather\",\n      \"description\": \"Get the weather for a city.\",\n      \"strict\": true,\n      \"parameters\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"city\": {\n            \"type\": \"string\"\n          }\n        },\n        \"required\": [\n          \"city\"\n        ],\n        \"additionalProperties\": false\n      },\n      \"allowed_callers\": [\n        \"direct\"\n      ]\n    }\n  ],\n  \"tool_choice\": {\n    \"type\": \"function\",\n    \"name\": \"get_weather\"\n  },\n  \"parallel_tool_calls\": false,\n  \"stream\": false\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "input": "What is the weather in Singapore?",
  "reasoning": {
    "effort": "medium"
  },
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "function",
      "name": "get_weather",
      "description": "Get the weather for a city.",
      "strict": true,
      "parameters": {
        "type": "object",
        "properties": {
          "city": {
            "type": "string"
          }
        },
        "required": [
          "city"
        ],
        "additionalProperties": false
      },
      "allowed_callers": [
        "direct"
      ]
    }
  ],
  "tool_choice": {
    "type": "function",
    "name": "get_weather"
  },
  "parallel_tool_calls": false,
  "stream": false
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Function with automatic strictness 3

Omit strict to let Responses attempt strict schema normalization and fall back to non-strict calling when needed.

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "input": "What is the weather in Singapore?",
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "function",
      "name": "get_weather",
      "description": "Get the weather for a city.",
      "parameters": {
        "type": "object",
        "properties": {
          "city": {
            "type": "string"
          }
        },
        "required": [
          "city"
        ],
        "additionalProperties": false
      }
    }
  ]
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"input\": \"What is the weather in Singapore?\",\n  \"max_output_tokens\": 1024,\n  \"tools\": [\n    {\n      \"type\": \"function\",\n      \"name\": \"get_weather\",\n      \"description\": \"Get the weather for a city.\",\n      \"parameters\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"city\": {\n            \"type\": \"string\"\n          }\n        },\n        \"required\": [\n          \"city\"\n        ],\n        \"additionalProperties\": false\n      }\n    }\n  ]\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "input": "What is the weather in Singapore?",
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "function",
      "name": "get_weather",
      "description": "Get the weather for a city.",
      "parameters": {
        "type": "object",
        "properties": {
          "city": {
            "type": "string"
          }
        },
        "required": [
          "city"
        ],
        "additionalProperties": false
      }
    }
  ]
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Continue from a function result 4

Replace previous_response_id and call_id with the IDs returned by your earlier function-call response.

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "previous_response_id": "resp_REPLACE_WITH_PREVIOUS_RESPONSE_ID",
  "input": [
    {
      "type": "function_call_output",
      "call_id": "call_REPLACE_WITH_FUNCTION_CALL_ID",
      "output": "{\"temperature_c\":30,\"condition\":\"sunny\"}"
    }
  ],
  "reasoning": {
    "effort": "medium"
  },
  "max_output_tokens": 1024
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"previous_response_id\": \"resp_REPLACE_WITH_PREVIOUS_RESPONSE_ID\",\n  \"input\": [\n    {\n      \"type\": \"function_call_output\",\n      \"call_id\": \"call_REPLACE_WITH_FUNCTION_CALL_ID\",\n      \"output\": \"{\\\"temperature_c\\\":30,\\\"condition\\\":\\\"sunny\\\"}\"\n    }\n  ],\n  \"reasoning\": {\n    \"effort\": \"medium\"\n  },\n  \"max_output_tokens\": 1024\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "previous_response_id": "resp_REPLACE_WITH_PREVIOUS_RESPONSE_ID",
  "input": [
    {
      "type": "function_call_output",
      "call_id": "call_REPLACE_WITH_FUNCTION_CALL_ID",
      "output": "{\"temperature_c\":30,\"condition\":\"sunny\"}"
    }
  ],
  "reasoning": {
    "effort": "medium"
  },
  "max_output_tokens": 1024
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Built-in tools with optional parameters 5

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "input": "Find one recent astronomy discovery and cite its source.",
  "reasoning": {
    "effort": "medium"
  },
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "web_search",
      "external_web_access": true,
      "search_context_size": "medium",
      "return_token_budget": "default",
      "filters": {
        "allowed_domains": [
          "science.nasa.gov"
        ],
        "blocked_domains": [
          "example.org"
        ]
      },
      "user_location": {
        "type": "approximate",
        "country": "SG",
        "timezone": "Asia/Singapore"
      }
    }
  ],
  "tool_choice": "auto",
  "max_tool_calls": 2,
  "include": [
    "web_search_call.action.sources"
  ]
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"input\": \"Find one recent astronomy discovery and cite its source.\",\n  \"reasoning\": {\n    \"effort\": \"medium\"\n  },\n  \"max_output_tokens\": 1024,\n  \"tools\": [\n    {\n      \"type\": \"web_search\",\n      \"external_web_access\": true,\n      \"search_context_size\": \"medium\",\n      \"return_token_budget\": \"default\",\n      \"filters\": {\n        \"allowed_domains\": [\n          \"science.nasa.gov\"\n        ],\n        \"blocked_domains\": [\n          \"example.org\"\n        ]\n      },\n      \"user_location\": {\n        \"type\": \"approximate\",\n        \"country\": \"SG\",\n        \"timezone\": \"Asia/Singapore\"\n      }\n    }\n  ],\n  \"tool_choice\": \"auto\",\n  \"max_tool_calls\": 2,\n  \"include\": [\n    \"web_search_call.action.sources\"\n  ]\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "input": "Find one recent astronomy discovery and cite its source.",
  "reasoning": {
    "effort": "medium"
  },
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "web_search",
      "external_web_access": true,
      "search_context_size": "medium",
      "return_token_budget": "default",
      "filters": {
        "allowed_domains": [
          "science.nasa.gov"
        ],
        "blocked_domains": [
          "example.org"
        ]
      },
      "user_location": {
        "type": "approximate",
        "country": "SG",
        "timezone": "Asia/Singapore"
      }
    }
  ],
  "tool_choice": "auto",
  "max_tool_calls": 2,
  "include": [
    "web_search_call.action.sources"
  ]
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Saved prompt and conversation options 6

Replace the prompt and conversation IDs with existing resources in your upstream account. Use conversation instead of previous_response_id.

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "input": "Explain why leaves are green.",
  "conversation": {
    "id": "conv_REPLACE_WITH_CONVERSATION_ID"
  },
  "prompt": {
    "id": "pmpt_REPLACE_WITH_PROMPT_ID",
    "version": "1",
    "variables": {
      "topic": "green leaves"
    }
  },
  "max_output_tokens": 1024
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"input\": \"Explain why leaves are green.\",\n  \"conversation\": {\n    \"id\": \"conv_REPLACE_WITH_CONVERSATION_ID\"\n  },\n  \"prompt\": {\n    \"id\": \"pmpt_REPLACE_WITH_PROMPT_ID\",\n    \"version\": \"1\",\n    \"variables\": {\n      \"topic\": \"green leaves\"\n    }\n  },\n  \"max_output_tokens\": 1024\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "input": "Explain why leaves are green.",
  "conversation": {
    "id": "conv_REPLACE_WITH_CONVERSATION_ID"
  },
  "prompt": {
    "id": "pmpt_REPLACE_WITH_PROMPT_ID",
    "version": "1",
    "variables": {
      "topic": "green leaves"
    }
  },
  "max_output_tokens": 1024
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Prompt-cache diagnostics options 7

Replace comparison_response_id with an earlier response ID from your account. Diagnostics depend on upstream feature access.

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "input": "Explain why leaves are green.",
  "max_output_tokens": 1024,
  "prompt_cache_options": {
    "ttl": "30m",
    "mode": "implicit",
    "comparison_response_id": "resp_REPLACE_WITH_COMPARISON_ID",
    "prewarm": false
  }
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"input\": \"Explain why leaves are green.\",\n  \"max_output_tokens\": 1024,\n  \"prompt_cache_options\": {\n    \"ttl\": \"30m\",\n    \"mode\": \"implicit\",\n    \"comparison_response_id\": \"resp_REPLACE_WITH_COMPARISON_ID\",\n    \"prewarm\": false\n  }\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "input": "Explain why leaves are green.",
  "max_output_tokens": 1024,
  "prompt_cache_options": {
    "ttl": "30m",
    "mode": "implicit",
    "comparison_response_id": "resp_REPLACE_WITH_COMPARISON_ID",
    "prewarm": false
  }
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Inline moderation options 8

Request input and output moderation with the generated response. Inspect moderation results before displaying output; streaming scores arrive after the complete output.

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "input": "Write one harmless sentence about a garden.",
  "max_output_tokens": 1024,
  "moderation": {
    "model": "omni-moderation-latest",
    "policy": {
      "input": {
        "mode": "score"
      },
      "output": {
        "mode": "score"
      }
    }
  }
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"input\": \"Write one harmless sentence about a garden.\",\n  \"max_output_tokens\": 1024,\n  \"moderation\": {\n    \"model\": \"omni-moderation-latest\",\n    \"policy\": {\n      \"input\": {\n        \"mode\": \"score\"\n      },\n      \"output\": {\n        \"mode\": \"score\"\n      }\n    }\n  }\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "input": "Write one harmless sentence about a garden.",
  "max_output_tokens": 1024,
  "moderation": {
    "model": "omni-moderation-latest",
    "policy": {
      "input": {
        "mode": "score"
      },
      "output": {
        "mode": "score"
      }
    }
  }
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Change reasoning between turns 9

Replace the response ID with your earlier response. In standard, single-agent mode, the update changes only effort while preserving the request-level reasoning and cached prefix. Do not use automatic compaction or truncation.

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "previous_response_id": "resp_REPLACE_WITH_PREVIOUS_RESPONSE_ID",
  "reasoning": {
    "effort": "medium",
    "mode": "standard"
  },
  "input": [
    {
      "type": "configuration_update",
      "reasoning": {
        "effort": "high"
      }
    },
    {
      "role": "user",
      "content": "Now examine the difficult cases."
    }
  ],
  "max_output_tokens": 1024,
  "truncation": "disabled"
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"previous_response_id\": \"resp_REPLACE_WITH_PREVIOUS_RESPONSE_ID\",\n  \"reasoning\": {\n    \"effort\": \"medium\",\n    \"mode\": \"standard\"\n  },\n  \"input\": [\n    {\n      \"type\": \"configuration_update\",\n      \"reasoning\": {\n        \"effort\": \"high\"\n      }\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"Now examine the difficult cases.\"\n    }\n  ],\n  \"max_output_tokens\": 1024,\n  \"truncation\": \"disabled\"\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "previous_response_id": "resp_REPLACE_WITH_PREVIOUS_RESPONSE_ID",
  "reasoning": {
    "effort": "medium",
    "mode": "standard"
  },
  "input": [
    {
      "type": "configuration_update",
      "reasoning": {
        "effort": "high"
      }
    },
    {
      "role": "user",
      "content": "Now examine the difficult cases."
    }
  ],
  "max_output_tokens": 1024,
  "truncation": "disabled"
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Explicit context compaction 10

Replace the response ID with your earlier response. After explicit compaction, add a fresh configuration_update before the next user message if you need to restore an updated effort.

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "previous_response_id": "resp_REPLACE_WITH_PREVIOUS_RESPONSE_ID",
  "reasoning": {
    "effort": "medium",
    "mode": "standard"
  },
  "input": [
    {
      "type": "compaction_trigger"
    },
    {
      "role": "user",
      "content": "Continue with the remaining work."
    }
  ],
  "max_output_tokens": 1024
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"previous_response_id\": \"resp_REPLACE_WITH_PREVIOUS_RESPONSE_ID\",\n  \"reasoning\": {\n    \"effort\": \"medium\",\n    \"mode\": \"standard\"\n  },\n  \"input\": [\n    {\n      \"type\": \"compaction_trigger\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"Continue with the remaining work.\"\n    }\n  ],\n  \"max_output_tokens\": 1024\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "previous_response_id": "resp_REPLACE_WITH_PREVIOUS_RESPONSE_ID",
  "reasoning": {
    "effort": "medium",
    "mode": "standard"
  },
  "input": [
    {
      "type": "compaction_trigger"
    },
    {
      "role": "user",
      "content": "Continue with the remaining work."
    }
  ],
  "max_output_tokens": 1024
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Namespaced tools and tool search 11

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "input": "What is the weather in Singapore?",
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "namespace",
      "name": "weather",
      "description": "Public weather utilities.",
      "tools": [
        {
          "type": "function",
          "name": "get_weather",
          "description": "Get the weather for a city.",
          "strict": true,
          "parameters": {
            "type": "object",
            "properties": {
              "city": {
                "type": "string"
              }
            },
            "required": [
              "city"
            ],
            "additionalProperties": false
          },
          "defer_loading": true
        },
        {
          "type": "function",
          "name": "get_time"
        }
      ]
    },
    {
      "type": "tool_search",
      "execution": "server"
    }
  ]
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"input\": \"What is the weather in Singapore?\",\n  \"max_output_tokens\": 1024,\n  \"tools\": [\n    {\n      \"type\": \"namespace\",\n      \"name\": \"weather\",\n      \"description\": \"Public weather utilities.\",\n      \"tools\": [\n        {\n          \"type\": \"function\",\n          \"name\": \"get_weather\",\n          \"description\": \"Get the weather for a city.\",\n          \"strict\": true,\n          \"parameters\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"city\": {\n                \"type\": \"string\"\n              }\n            },\n            \"required\": [\n              \"city\"\n            ],\n            \"additionalProperties\": false\n          },\n          \"defer_loading\": true\n        },\n        {\n          \"type\": \"function\",\n          \"name\": \"get_time\"\n        }\n      ]\n    },\n    {\n      \"type\": \"tool_search\",\n      \"execution\": \"server\"\n    }\n  ]\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "input": "What is the weather in Singapore?",
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "namespace",
      "name": "weather",
      "description": "Public weather utilities.",
      "tools": [
        {
          "type": "function",
          "name": "get_weather",
          "description": "Get the weather for a city.",
          "strict": true,
          "parameters": {
            "type": "object",
            "properties": {
              "city": {
                "type": "string"
              }
            },
            "required": [
              "city"
            ],
            "additionalProperties": false
          },
          "defer_loading": true
        },
        {
          "type": "function",
          "name": "get_time"
        }
      ]
    },
    {
      "type": "tool_search",
      "execution": "server"
    }
  ]
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Programmatic function calling 12

The hosted program can coordinate eligible tools. Your application still executes client-owned functions and returns their results with the original call_id and caller context.

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "input": "Compare the weather in Singapore and Paris.",
  "reasoning": {
    "effort": "medium"
  },
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "function",
      "name": "get_weather",
      "description": "Get the weather for a city.",
      "strict": true,
      "parameters": {
        "type": "object",
        "properties": {
          "city": {
            "type": "string"
          }
        },
        "required": [
          "city"
        ],
        "additionalProperties": false
      },
      "allowed_callers": [
        "programmatic"
      ],
      "output_schema": {
        "type": "object",
        "properties": {
          "temperature_c": {
            "type": "number"
          }
        },
        "required": [
          "temperature_c"
        ],
        "additionalProperties": false
      }
    },
    {
      "type": "programmatic_tool_calling"
    }
  ],
  "tool_choice": {
    "type": "programmatic_tool_calling"
  }
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"input\": \"Compare the weather in Singapore and Paris.\",\n  \"reasoning\": {\n    \"effort\": \"medium\"\n  },\n  \"max_output_tokens\": 1024,\n  \"tools\": [\n    {\n      \"type\": \"function\",\n      \"name\": \"get_weather\",\n      \"description\": \"Get the weather for a city.\",\n      \"strict\": true,\n      \"parameters\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"city\": {\n            \"type\": \"string\"\n          }\n        },\n        \"required\": [\n          \"city\"\n        ],\n        \"additionalProperties\": false\n      },\n      \"allowed_callers\": [\n        \"programmatic\"\n      ],\n      \"output_schema\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"temperature_c\": {\n            \"type\": \"number\"\n          }\n        },\n        \"required\": [\n          \"temperature_c\"\n        ],\n        \"additionalProperties\": false\n      }\n    },\n    {\n      \"type\": \"programmatic_tool_calling\"\n    }\n  ],\n  \"tool_choice\": {\n    \"type\": \"programmatic_tool_calling\"\n  }\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "input": "Compare the weather in Singapore and Paris.",
  "reasoning": {
    "effort": "medium"
  },
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "function",
      "name": "get_weather",
      "description": "Get the weather for a city.",
      "strict": true,
      "parameters": {
        "type": "object",
        "properties": {
          "city": {
            "type": "string"
          }
        },
        "required": [
          "city"
        ],
        "additionalProperties": false
      },
      "allowed_callers": [
        "programmatic"
      ],
      "output_schema": {
        "type": "object",
        "properties": {
          "temperature_c": {
            "type": "number"
          }
        },
        "required": [
          "temperature_c"
        ],
        "additionalProperties": false
      }
    },
    {
      "type": "programmatic_tool_calling"
    }
  ],
  "tool_choice": {
    "type": "programmatic_tool_calling"
  }
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Inline PDF and image input 13

This example embeds a complete sample PDF. Responses also accepts file_url; file_id requires an existing file on the executing upstream account.

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "reasoning": {
    "effort": "medium"
  },
  "max_output_tokens": 1024,
  "input": [
    {
      "type": "message",
      "role": "user",
      "content": [
        {
          "type": "input_text",
          "text": "Read the PDF and describe the image.",
          "prompt_cache_breakpoint": {
            "mode": "explicit"
          }
        },
        {
          "type": "input_file",
          "filename": "sample.pdf",
          "file_data": "data:application/pdf;base64,JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCAzMDAgMTQ0XSAvUmVzb3VyY2VzIDw8IC9Gb250IDw8IC9GMSA0IDAgUiA+PiA+PiAvQ29udGVudHMgNSAwIFIgPj4KZW5kb2JqCjQgMCBvYmoKPDwgL1R5cGUgL0ZvbnQgL1N1YnR5cGUgL1R5cGUxIC9CYXNlRm9udCAvSGVsdmV0aWNhID4+CmVuZG9iago1IDAgb2JqCjw8IC9MZW5ndGggNTcgPj4Kc3RyZWFtCkJUIC9GMSAxMiBUZiAyMCAxMDAgVGQgKFNjZW5lcG9uZCBzYW1wbGUgZG9jdW1lbnQuKSBUaiBFVAplbmRzdHJlYW0KZW5kb2JqCnhyZWYKMCA2CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAwOSAwMDAwMCBuIAowMDAwMDAwMDU4IDAwMDAwIG4gCjAwMDAwMDAxMTUgMDAwMDAgbiAKMDAwMDAwMDI0MSAwMDAwMCBuIAowMDAwMDAwMzExIDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUgNiAvUm9vdCAxIDAgUiA+PgpzdGFydHhyZWYKNDE4CiUlRU9GCg==",
          "detail": "low"
        },
        {
          "type": "input_image",
          "image_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg",
          "detail": "auto"
        }
      ]
    }
  ],
  "prompt_cache_options": {
    "ttl": "30m",
    "mode": "explicit"
  }
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"reasoning\": {\n    \"effort\": \"medium\"\n  },\n  \"max_output_tokens\": 1024,\n  \"input\": [\n    {\n      \"type\": \"message\",\n      \"role\": \"user\",\n      \"content\": [\n        {\n          \"type\": \"input_text\",\n          \"text\": \"Read the PDF and describe the image.\",\n          \"prompt_cache_breakpoint\": {\n            \"mode\": \"explicit\"\n          }\n        },\n        {\n          \"type\": \"input_file\",\n          \"filename\": \"sample.pdf\",\n          \"file_data\": \"data:application/pdf;base64,JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCAzMDAgMTQ0XSAvUmVzb3VyY2VzIDw8IC9Gb250IDw8IC9GMSA0IDAgUiA+PiA+PiAvQ29udGVudHMgNSAwIFIgPj4KZW5kb2JqCjQgMCBvYmoKPDwgL1R5cGUgL0ZvbnQgL1N1YnR5cGUgL1R5cGUxIC9CYXNlRm9udCAvSGVsdmV0aWNhID4+CmVuZG9iago1IDAgb2JqCjw8IC9MZW5ndGggNTcgPj4Kc3RyZWFtCkJUIC9GMSAxMiBUZiAyMCAxMDAgVGQgKFNjZW5lcG9uZCBzYW1wbGUgZG9jdW1lbnQuKSBUaiBFVAplbmRzdHJlYW0KZW5kb2JqCnhyZWYKMCA2CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAwOSAwMDAwMCBuIAowMDAwMDAwMDU4IDAwMDAwIG4gCjAwMDAwMDAxMTUgMDAwMDAgbiAKMDAwMDAwMDI0MSAwMDAwMCBuIAowMDAwMDAwMzExIDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUgNiAvUm9vdCAxIDAgUiA+PgpzdGFydHhyZWYKNDE4CiUlRU9GCg==\",\n          \"detail\": \"low\"\n        },\n        {\n          \"type\": \"input_image\",\n          \"image_url\": \"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg\",\n          \"detail\": \"auto\"\n        }\n      ]\n    }\n  ],\n  \"prompt_cache_options\": {\n    \"ttl\": \"30m\",\n    \"mode\": \"explicit\"\n  }\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "reasoning": {
    "effort": "medium"
  },
  "max_output_tokens": 1024,
  "input": [
    {
      "type": "message",
      "role": "user",
      "content": [
        {
          "type": "input_text",
          "text": "Read the PDF and describe the image.",
          "prompt_cache_breakpoint": {
            "mode": "explicit"
          }
        },
        {
          "type": "input_file",
          "filename": "sample.pdf",
          "file_data": "data:application/pdf;base64,JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCAzMDAgMTQ0XSAvUmVzb3VyY2VzIDw8IC9Gb250IDw8IC9GMSA0IDAgUiA+PiA+PiAvQ29udGVudHMgNSAwIFIgPj4KZW5kb2JqCjQgMCBvYmoKPDwgL1R5cGUgL0ZvbnQgL1N1YnR5cGUgL1R5cGUxIC9CYXNlRm9udCAvSGVsdmV0aWNhID4+CmVuZG9iago1IDAgb2JqCjw8IC9MZW5ndGggNTcgPj4Kc3RyZWFtCkJUIC9GMSAxMiBUZiAyMCAxMDAgVGQgKFNjZW5lcG9uZCBzYW1wbGUgZG9jdW1lbnQuKSBUaiBFVAplbmRzdHJlYW0KZW5kb2JqCnhyZWYKMCA2CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAwOSAwMDAwMCBuIAowMDAwMDAwMDU4IDAwMDAwIG4gCjAwMDAwMDAxMTUgMDAwMDAgbiAKMDAwMDAwMDI0MSAwMDAwMCBuIAowMDAwMDAwMzExIDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUgNiAvUm9vdCAxIDAgUiA+PgpzdGFydHhyZWYKNDE4CiUlRU9GCg==",
          "detail": "low"
        },
        {
          "type": "input_image",
          "image_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg",
          "detail": "auto"
        }
      ]
    }
  ],
  "prompt_cache_options": {
    "ttl": "30m",
    "mode": "explicit"
  }
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Code interpreter container options 14

Built-in tools require upstream tool access and may incur tool charges. This example creates an isolated container with outbound networking disabled.

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "input": "Use Python to calculate 17 times 23.",
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "code_interpreter",
      "container": {
        "type": "auto",
        "memory_limit": "1g",
        "network_policy": {
          "type": "disabled"
        }
      }
    }
  ]
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"input\": \"Use Python to calculate 17 times 23.\",\n  \"max_output_tokens\": 1024,\n  \"tools\": [\n    {\n      \"type\": \"code_interpreter\",\n      \"container\": {\n        \"type\": \"auto\",\n        \"memory_limit\": \"1g\",\n        \"network_policy\": {\n          \"type\": \"disabled\"\n        }\n      }\n    }\n  ]\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "input": "Use Python to calculate 17 times 23.",
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "code_interpreter",
      "container": {
        "type": "auto",
        "memory_limit": "1g",
        "network_policy": {
          "type": "disabled"
        }
      }
    }
  ]
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### File-search filters and ranking 15

Replace vector_store_ids with existing vector stores on the executing upstream account.

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "input": "Find the most relevant public onboarding note.",
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "file_search",
      "vector_store_ids": [
        "vs_REPLACE_WITH_VECTOR_STORE_ID"
      ],
      "max_num_results": 5,
      "filters": {
        "type": "and",
        "filters": [
          {
            "type": "eq",
            "key": "category",
            "value": "onboarding"
          }
        ]
      },
      "ranking_options": {
        "ranker": "auto",
        "score_threshold": 0.5,
        "hybrid_search": {
          "embedding_weight": 1,
          "text_weight": 1
        }
      }
    }
  ],
  "include": [
    "file_search_call.results"
  ]
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"input\": \"Find the most relevant public onboarding note.\",\n  \"max_output_tokens\": 1024,\n  \"tools\": [\n    {\n      \"type\": \"file_search\",\n      \"vector_store_ids\": [\n        \"vs_REPLACE_WITH_VECTOR_STORE_ID\"\n      ],\n      \"max_num_results\": 5,\n      \"filters\": {\n        \"type\": \"and\",\n        \"filters\": [\n          {\n            \"type\": \"eq\",\n            \"key\": \"category\",\n            \"value\": \"onboarding\"\n          }\n        ]\n      },\n      \"ranking_options\": {\n        \"ranker\": \"auto\",\n        \"score_threshold\": 0.5,\n        \"hybrid_search\": {\n          \"embedding_weight\": 1,\n          \"text_weight\": 1\n        }\n      }\n    }\n  ],\n  \"include\": [\n    \"file_search_call.results\"\n  ]\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "input": "Find the most relevant public onboarding note.",
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "file_search",
      "vector_store_ids": [
        "vs_REPLACE_WITH_VECTOR_STORE_ID"
      ],
      "max_num_results": 5,
      "filters": {
        "type": "and",
        "filters": [
          {
            "type": "eq",
            "key": "category",
            "value": "onboarding"
          }
        ]
      },
      "ranking_options": {
        "ranker": "auto",
        "score_threshold": 0.5,
        "hybrid_search": {
          "embedding_weight": 1,
          "text_weight": 1
        }
      }
    }
  ],
  "include": [
    "file_search_call.results"
  ]
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Image-generation tool options 16

This tool produces an image through the upstream image model and may incur tool charges; the chat model still returns text and tool results.

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "input": "Generate a small illustration of a leaf on a white background.",
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "image_generation",
      "model": "gpt-image-1.5",
      "action": "generate",
      "background": "opaque",
      "output_format": "webp",
      "output_compression": 80,
      "size": "1024x1024",
      "quality": "low",
      "moderation": "auto",
      "partial_images": 0
    }
  ],
  "tool_choice": {
    "type": "image_generation"
  }
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"input\": \"Generate a small illustration of a leaf on a white background.\",\n  \"max_output_tokens\": 1024,\n  \"tools\": [\n    {\n      \"type\": \"image_generation\",\n      \"model\": \"gpt-image-1.5\",\n      \"action\": \"generate\",\n      \"background\": \"opaque\",\n      \"output_format\": \"webp\",\n      \"output_compression\": 80,\n      \"size\": \"1024x1024\",\n      \"quality\": \"low\",\n      \"moderation\": \"auto\",\n      \"partial_images\": 0\n    }\n  ],\n  \"tool_choice\": {\n    \"type\": \"image_generation\"\n  }\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "input": "Generate a small illustration of a leaf on a white background.",
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "image_generation",
      "model": "gpt-image-1.5",
      "action": "generate",
      "background": "opaque",
      "output_format": "webp",
      "output_compression": 80,
      "size": "1024x1024",
      "quality": "low",
      "moderation": "auto",
      "partial_images": 0
    }
  ],
  "tool_choice": {
    "type": "image_generation"
  }
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### MCP server and approval options 17

Replace the server URL with an authorized MCP endpoint and tool_names with tools it exposes. Approvals must be answered using the original approval_request_id.

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "input": "Find the public help page for this product.",
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "mcp",
      "server_label": "product_docs",
      "server_url": "https://REPLACE_WITH_AUTHORIZED_MCP_HOST/mcp",
      "server_description": "Public product documentation",
      "allowed_tools": {
        "read_only": true,
        "tool_names": [
          "search_docs"
        ]
      },
      "require_approval": {
        "always": {
          "tool_names": [
            "search_docs"
          ]
        }
      },
      "defer_loading": false
    }
  ],
  "tool_choice": {
    "type": "mcp",
    "server_label": "product_docs",
    "name": "search_docs"
  }
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"input\": \"Find the public help page for this product.\",\n  \"max_output_tokens\": 1024,\n  \"tools\": [\n    {\n      \"type\": \"mcp\",\n      \"server_label\": \"product_docs\",\n      \"server_url\": \"https://REPLACE_WITH_AUTHORIZED_MCP_HOST/mcp\",\n      \"server_description\": \"Public product documentation\",\n      \"allowed_tools\": {\n        \"read_only\": true,\n        \"tool_names\": [\n          \"search_docs\"\n        ]\n      },\n      \"require_approval\": {\n        \"always\": {\n          \"tool_names\": [\n            \"search_docs\"\n          ]\n        }\n      },\n      \"defer_loading\": false\n    }\n  ],\n  \"tool_choice\": {\n    \"type\": \"mcp\",\n    \"server_label\": \"product_docs\",\n    \"name\": \"search_docs\"\n  }\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "input": "Find the public help page for this product.",
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "mcp",
      "server_label": "product_docs",
      "server_url": "https://REPLACE_WITH_AUTHORIZED_MCP_HOST/mcp",
      "server_description": "Public product documentation",
      "allowed_tools": {
        "read_only": true,
        "tool_names": [
          "search_docs"
        ]
      },
      "require_approval": {
        "always": {
          "tool_names": [
            "search_docs"
          ]
        }
      },
      "defer_loading": false
    }
  ],
  "tool_choice": {
    "type": "mcp",
    "server_label": "product_docs",
    "name": "search_docs"
  }
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Hosted shell environment options 18

Hosted shell requires upstream tool access. The example disables outbound networking in its automatically created container.

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "input": "Print a hello-world sentence in the shell.",
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "shell",
      "environment": {
        "type": "container_auto",
        "memory_limit": "1g",
        "network_policy": {
          "type": "disabled"
        }
      }
    }
  ],
  "tool_choice": {
    "type": "shell"
  }
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"input\": \"Print a hello-world sentence in the shell.\",\n  \"max_output_tokens\": 1024,\n  \"tools\": [\n    {\n      \"type\": \"shell\",\n      \"environment\": {\n        \"type\": \"container_auto\",\n        \"memory_limit\": \"1g\",\n        \"network_policy\": {\n          \"type\": \"disabled\"\n        }\n      }\n    }\n  ],\n  \"tool_choice\": {\n    \"type\": \"shell\"\n  }\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "input": "Print a hello-world sentence in the shell.",
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "shell",
      "environment": {
        "type": "container_auto",
        "memory_limit": "1g",
        "network_policy": {
          "type": "disabled"
        }
      }
    }
  ],
  "tool_choice": {
    "type": "shell"
  }
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Deferred function and tool-search options 19

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "input": "What is the weather in Singapore?",
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "tool_search",
      "execution": "server"
    },
    {
      "type": "function",
      "name": "get_weather",
      "description": "Get the weather for a city.",
      "strict": true,
      "parameters": {
        "type": "object",
        "properties": {
          "city": {
            "type": "string"
          }
        },
        "required": [
          "city"
        ],
        "additionalProperties": false
      },
      "defer_loading": true,
      "output_schema": {
        "type": "object",
        "properties": {
          "temperature_c": {
            "type": "number"
          }
        },
        "required": [
          "temperature_c"
        ],
        "additionalProperties": false
      }
    }
  ],
  "tool_choice": "auto"
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"input\": \"What is the weather in Singapore?\",\n  \"max_output_tokens\": 1024,\n  \"tools\": [\n    {\n      \"type\": \"tool_search\",\n      \"execution\": \"server\"\n    },\n    {\n      \"type\": \"function\",\n      \"name\": \"get_weather\",\n      \"description\": \"Get the weather for a city.\",\n      \"strict\": true,\n      \"parameters\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"city\": {\n            \"type\": \"string\"\n          }\n        },\n        \"required\": [\n          \"city\"\n        ],\n        \"additionalProperties\": false\n      },\n      \"defer_loading\": true,\n      \"output_schema\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"temperature_c\": {\n            \"type\": \"number\"\n          }\n        },\n        \"required\": [\n          \"temperature_c\"\n        ],\n        \"additionalProperties\": false\n      }\n    }\n  ],\n  \"tool_choice\": \"auto\"\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "input": "What is the weather in Singapore?",
  "max_output_tokens": 1024,
  "tools": [
    {
      "type": "tool_search",
      "execution": "server"
    },
    {
      "type": "function",
      "name": "get_weather",
      "description": "Get the weather for a city.",
      "strict": true,
      "parameters": {
        "type": "object",
        "properties": {
          "city": {
            "type": "string"
          }
        },
        "required": [
          "city"
        ],
        "additionalProperties": false
      },
      "defer_loading": true,
      "output_schema": {
        "type": "object",
        "properties": {
          "temperature_c": {
            "type": "number"
          }
        },
        "required": [
          "temperature_c"
        ],
        "additionalProperties": false
      }
    }
  ],
  "tool_choice": "auto"
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Optional access program 20

Use standard for the mainline program. daybreak_blue requires the model-specific organization and project approval; daybreak_red is unavailable for these models.

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "input": "Summarize this public security advisory.",
  "reasoning": {
    "effort": "medium"
  },
  "max_output_tokens": 1024,
  "access_programs": {
    "cyber": "standard"
  }
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"input\": \"Summarize this public security advisory.\",\n  \"reasoning\": {\n    \"effort\": \"medium\"\n  },\n  \"max_output_tokens\": 1024,\n  \"access_programs\": {\n    \"cyber\": \"standard\"\n  }\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "input": "Summarize this public security advisory.",
  "reasoning": {
    "effort": "medium"
  },
  "max_output_tokens": 1024,
  "access_programs": {
    "cyber": "standard"
  }
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Sampling with temperature 21

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "input": "Suggest a short title for a garden photo.",
  "reasoning": {
    "effort": "none"
  },
  "max_output_tokens": 128,
  "temperature": 0.2,
  "top_logprobs": 3,
  "include": [
    "message.output_text.logprobs"
  ]
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"input\": \"Suggest a short title for a garden photo.\",\n  \"reasoning\": {\n    \"effort\": \"none\"\n  },\n  \"max_output_tokens\": 128,\n  \"temperature\": 0.2,\n  \"top_logprobs\": 3,\n  \"include\": [\n    \"message.output_text.logprobs\"\n  ]\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "input": "Suggest a short title for a garden photo.",
  "reasoning": {
    "effort": "none"
  },
  "max_output_tokens": 128,
  "temperature": 0.2,
  "top_logprobs": 3,
  "include": [
    "message.output_text.logprobs"
  ]
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

#### Sampling with top_p 22

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "input": "Suggest a short title for a garden photo.",
  "reasoning": {
    "effort": "none"
  },
  "max_output_tokens": 128,
  "top_p": 0.8
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"input\": \"Suggest a short title for a garden photo.\",\n  \"reasoning\": {\n    \"effort\": \"none\"\n  },\n  \"max_output_tokens\": 128,\n  \"top_p\": 0.8\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "input": "Suggest a short title for a garden photo.",
  "reasoning": {
    "effort": "none"
  },
  "max_output_tokens": 128,
  "top_p": 0.8
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

<details>
<summary>Compatibility examples</summary>

#### Deprecated identifier and retention options 1

These legacy options are still forwarded. Use prompt_cache_key for cache grouping. The current channel has not opened safety_identifier. Cache retention and minimum cache lifetime are independent policies.

##### cURL

```bash
curl --fail-with-body -X POST "https://open.scenepond.ai/v1/responses" \
  -H "Authorization: Bearer $SCENEPOND_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6-sol",
  "input": "Hello!",
  "max_output_tokens": 128,
  "user": "user_example",
  "prompt_cache_retention": "24h"
}
JSON
```

##### Python

```python
import os
import json
from urllib.parse import quote
from urllib.request import Request, urlopen

payload = json.loads("{\n  \"model\": \"gpt-6-sol\",\n  \"input\": \"Hello!\",\n  \"max_output_tokens\": 128,\n  \"user\": \"user_example\",\n  \"prompt_cache_retention\": \"24h\"\n}")

request = Request(
    "https://open.scenepond.ai/v1/responses",
    headers={
        "Authorization": "Bearer " + os.environ["SCENEPOND_API_KEY"],
        "Content-Type": "application/json",
    },
    data=json.dumps(payload).encode("utf-8"),
    method="POST",
)
with urlopen(request) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
```

##### JavaScript

```javascript
const response = await fetch("https://open.scenepond.ai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SCENEPOND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gpt-6-sol",
  "input": "Hello!",
  "max_output_tokens": 128,
  "user": "user_example",
  "prompt_cache_retention": "24h"
})
});
if (!response.ok) throw new Error(`API error: ${response.status} ${await response.text()}`);
const result = await response.json();
console.log(result);
```

</details>

### Illustrative responses

Response examples show the structure only. IDs, URLs, and values are placeholders.

#### Completed response

```json
{
  "id": "resp_EXAMPLE",
  "object": "response",
  "model": "gpt-6-sol",
  "status": "completed",
  "output": [
    {
      "type": "message",
      "role": "assistant",
      "status": "completed",
      "content": [
        {
          "type": "output_text",
          "text": "Hello!",
          "annotations": []
        }
      ]
    }
  ]
}
```

### Request notes

- Use reasoning.effort and max_output_tokens for Responses; reasoning_effort and max_completion_tokens belong to Chat Completions.
- Responses function definitions put name, parameters and strict beside type; Chat Completions nests them inside function.
- Return function results as function_call_output items with the matching call_id.
- Sampling controls require reasoning.effort to be explicitly none. Omitting the effort does not select none.
- The current channel has not opened service_tier, safety_identifier or stream_options.include_obfuscation. These are gateway availability limits, not model exclusions; they are omitted from the parameter list and examples.
- Built-in tools require upstream access and may incur separate tool charges. Existing file, vector-store, conversation and container IDs must belong to the executing upstream account.
- The gateway does not implement Files upload, listing or download endpoints. Prefer inline file_data or a public file_url for file inputs.
- Replay complete earlier output items unchanged. The nested parameter table describes common input variants; specialized computer and shell result payloads follow the linked official tool reference.
- Deprecated reasoning.generate_summary is not forwarded; use reasoning.summary. Programmatic calls require the programmatic_tool_calling tool and an eligible tool’s allowed_callers setting.
- Configuration updates are supported only in standard, single-agent mode. They cannot be adjacent, combined with automatic compaction or truncation, or sent to the standalone compaction endpoint.
- Moderation scores cover the completed input and output. Streaming scores arrive after output is complete; inspect them before displaying content or taking downstream actions.
- Background generation and GET retrieval of ordinary Responses are unavailable on this gateway. Continue using the response ID returned by a completed request.

## Sources

- [Official model reference](https://developers.openai.com/api/docs/models/gpt-6-sol)
- [Official Chat Completions parameter reference](https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create)
- [Official file input guide](https://developers.openai.com/api/docs/guides/file-inputs)
- [Official image input guide](https://developers.openai.com/api/docs/guides/images-vision)
- [Official Responses parameter reference](https://developers.openai.com/api/reference/resources/responses/methods/create)
- [Official reasoning guide](https://developers.openai.com/api/docs/guides/reasoning)
- [Official protocol migration guide](https://developers.openai.com/api/docs/guides/migrate-to-responses)
- [Official web-search guide](https://developers.openai.com/api/docs/guides/tools-web-search)
- [Official tool-search guide](https://developers.openai.com/api/docs/guides/tools-tool-search)
- [Official programmatic tool-calling guide](https://developers.openai.com/api/docs/guides/tools-programmatic-tool-calling)
- [Official function-calling guide](https://developers.openai.com/api/docs/guides/function-calling)
- [Official asynchronous tool-calling guide](https://developers.openai.com/api/docs/guides/async-tool-calling)
- [Official moderation guide](https://developers.openai.com/api/docs/guides/moderation)
