List input items

Returns a list of input items for a given response.

Request

GET

https://ai.api.cloud.yandex.net/v1/responses/{response_id}/input_items
        

Path parameters

Name

Description

response_id

Type: string

The ID of the response to retrieve input items for.

Example: ``

Query parameters

Name

Description

after

Type: string

An item ID to list items after, used in pagination.

Example: ``

include

Type: IncludeEnum[]

CURRENTLY NOT SUPPORTED

Additional fields to include in the response.

Example: ``

limit

Type: integer

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

Default: 20

order

Type: string

The order to return the input items in. Default is desc.

  • asc: Return the input items in ascending order.
  • desc: Return the input items in descending order.

Enum: asc, desc

IncludeEnum

Specify additional output data to include in the model response. Currently supported values are:

  • web_search_call.action.sources: Include the sources of the web search tool call.
  • code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items.
  • computer_call_output.output.image_url: Include image urls from the computer call output.
  • file_search_call.results: Include the search results of the file search tool call.
  • message.input_image.image_url: Include image urls from the input message.
  • message.output_text.logprobs: Include logprobs with assistant messages.
  • reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the store parameter is set to false, or when an organization is enrolled in the zero data retention program).

Type: string

Enum: 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

Responses

200 OK

OK

Body

application/json
{
          "object": "list",
          "data": [
            {
              "type": "message",
              "role": "user",
              "status": "in_progress",
              "content": [
                null
              ],
              "id": "example"
            }
          ],
          "has_more": true,
          "first_id": "example",
          "last_id": "example"
        }
        

Name

Description

data

Type: ItemResource[]

A list of items used to generate this response.

Example
[
          {
            "type": "message",
            "role": "user",
            "status": "in_progress",
            "content": [
              null
            ],
            "id": "example"
          }
        ]
        

first_id

Type: string

The ID of the first item in the list.

Example: example

has_more

Type: boolean

Whether there are more items available.

last_id

Type: string

The ID of the last item in the list.

Example: example

object

Type: string

The type of object returned, must be list.

Const: list

Example: example

InputTextContent

A text input to the model.

Name

Description

text

Type: string

The text input to the model.

Example: example

type

Type: string

The type of the input item. Always input_text.

Default: input_text

Const: input_text

Example
{
          "type": "input_text",
          "text": "example"
        }
        

ImageDetail

Type: string

Enum: low, high, auto, original

InputImageContent

An image input to the model.

Name

Description

detail

Type: ImageDetail

The detail level of the image to be sent to the model. One of high, low, auto, or original. Defaults to auto.

Enum: low, high, auto, original

type

Type: string

The type of the input item. Always input_image.

Default: input_image

Const: input_image

file_id

Any of 2 types
  • Type: string

    The ID of the file to be sent to the model.

    Example: example

  • Type: null

    Example: null

Example: example

image_url

Any of 2 types
  • Type: string

    The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

    Example: example

  • Type: null

    Example: null

Example: example

Example
{
          "type": "input_image",
          "image_url": "example",
          "file_id": "example",
          "detail": "low"
        }
        

FileInputDetail

Type: string

Enum: low, high

InputFileContent

A file input to the model.

Name

Description

type

Type: string

The type of the input item. Always input_file.

Default: input_file

Const: input_file

detail

Type: FileInputDetail

The detail level of the file to be sent to the model. Use low for the default rendering behavior, or high to render the file at higher quality. Defaults to low.

Enum: low, high

file_data

Type: string

The content of the file to be sent to the model.

Example: example

file_id

Any of 2 types
  • Type: string

    The ID of the file to be sent to the model.

    Example: example

  • Type: null

    Example: null

Example: example

file_url

Type: string

The URL of the file to be sent to the model.

Example: example

filename

Type: string

The name of the file to be sent to the model.

Example: example

Example
{
          "type": "input_file",
          "file_id": "example",
          "filename": "example",
          "file_data": "example",
          "file_url": "example",
          "detail": "low"
        }
        

InputContent

One of 3 types
  • Input text

    Type: InputTextContent

    A text input to the model.

    Example
    {
              "type": "input_text",
              "text": "example"
            }
            
  • Input image

    Type: InputImageContent

    An image input to the model.

    Example
    {
              "type": "input_image",
              "image_url": "example",
              "file_id": "example",
              "detail": "low"
            }
            
  • Input file

    Type: InputFileContent

    A file input to the model.

    Example
    {
              "type": "input_file",
              "file_id": "example",
              "filename": "example",
              "file_data": "example",
              "file_url": "example",
              "detail": "low"
            }
            
Example
{
          "type": "input_text",
          "text": "example"
        }
        

InputMessageContentList

A list of one or many input items to the model, containing different content types.

Type: InputContent[]

Example
[
          {
            "type": "input_text",
            "text": "example"
          }
        ]
        

InputMessage

A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role.

Name

Description

content

Type: InputMessageContentList

A list of one or many input items to the model, containing different content types.

Example
[
          {
            "type": "input_text",
            "text": "example"
          }
        ]
        

role

Type: string

The role of the message input. One of user, system, or developer.

Enum: user, system, developer

status

Type: string

The status of item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

Enum: in_progress, completed, incomplete

type

Type: string

The type of the message input. Always set to message.

Const: message

Example: example

Example
{
          "type": "message",
          "role": "user",
          "status": "in_progress",
          "content": [
            {
              "type": "input_text",
              "text": "example"
            }
          ]
        }
        

InputMessageResource

All of 2 types
  • Input message

    Type: InputMessage

    A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role.

    Example
    {
              "type": "message",
              "role": "user",
              "status": "in_progress",
              "content": [
                {
                  "type": "input_text",
                  "text": "example"
                }
              ]
            }
            
  • Type: object

    id

    Type: string

    The unique ID of the message input.

    Example: example

    Example
    {
              "id": "example"
            }
            
Example
{
          "type": "message",
          "role": "user",
          "status": "in_progress",
          "content": [
            {
              "type": "input_text",
              "text": "example"
            }
          ],
          "id": "example"
        }
        

FileCitationBody

A citation to a file.

Name

Description

file_id

Type: string

The ID of the file.

Example: example

filename

Type: string

The filename of the file cited.

Example: example

index

Type: integer

The index of the file in the list of files.

type

Type: string

The type of the file citation. Always file_citation.

Default: file_citation

Const: file_citation

Example
{
          "type": "file_citation",
          "file_id": "example",
          "index": 0,
          "filename": "example"
        }
        

UrlCitationBody

A citation for a web resource used to generate a model response.

Name

Description

end_index

Type: integer

The index of the last character of the URL citation in the message.

start_index

Type: integer

The index of the first character of the URL citation in the message.

title

Type: string

The title of the web resource.

Example: example

type

Type: string

The type of the URL citation. Always url_citation.

Default: url_citation

Const: url_citation

url

Type: string

The URL of the web resource.

Example: example

Example
{
          "type": "url_citation",
          "url": "example",
          "start_index": 0,
          "end_index": 0,
          "title": "example"
        }
        

ContainerFileCitationBody

A citation for a container file used to generate a model response.

Name

Description

container_id

Type: string

The ID of the container file.

Example: example

end_index

Type: integer

The index of the last character of the container file citation in the message.

file_id

Type: string

The ID of the file.

Example: example

filename

Type: string

The filename of the container file cited.

Example: example

start_index

Type: integer

The index of the first character of the container file citation in the message.

type

Type: string

The type of the container file citation. Always container_file_citation.

Default: container_file_citation

Const: container_file_citation

Example
{
          "type": "container_file_citation",
          "container_id": "example",
          "file_id": "example",
          "start_index": 0,
          "end_index": 0,
          "filename": "example"
        }
        

FilePath

A path to a file.

Name

Description

file_id

Type: string

The ID of the file.

Example: example

index

Type: integer

The index of the file in the list of files.

type

Type: string

The type of the file path. Always file_path.

Const: file_path

Example: example

Example
{
          "type": "file_path",
          "file_id": "example",
          "index": 0
        }
        

Annotation

An annotation that applies to a span of output text.

One of 4 types
  • File citation

    Type: FileCitationBody

    A citation to a file.

    Example
    {
              "type": "file_citation",
              "file_id": "example",
              "index": 0,
              "filename": "example"
            }
            
  • URL citation

    Type: UrlCitationBody

    A citation for a web resource used to generate a model response.

    Example
    {
              "type": "url_citation",
              "url": "example",
              "start_index": 0,
              "end_index": 0,
              "title": "example"
            }
            
  • Container file citation

    Type: ContainerFileCitationBody

    A citation for a container file used to generate a model response.

    Example
    {
              "type": "container_file_citation",
              "container_id": "example",
              "file_id": "example",
              "start_index": 0,
              "end_index": 0,
              "filename": "example"
            }
            
  • File path

    Type: FilePath

    A path to a file.

    Example
    {
              "type": "file_path",
              "file_id": "example",
              "index": 0
            }
            
Example
{
          "type": "file_citation",
          "file_id": "example",
          "index": 0,
          "filename": "example"
        }
        

TopLogProb

The top log probability of a token.

Name

Description

bytes

Type: integer[]

Example
[
          0
        ]
        

logprob

Type: number

token

Type: string

Example: example

Example
{
          "token": "example",
          "logprob": 0.5,
          "bytes": [
            0
          ]
        }
        

LogProb

The log probability of a token.

Name

Description

bytes

Type: integer[]

Example
[
          0
        ]
        

logprob

Type: number

token

Type: string

Example: example

top_logprobs

Type: TopLogProb[]

Example
[
          {
            "token": "example",
            "logprob": 0.5,
            "bytes": [
              0
            ]
          }
        ]
        
Example
{
          "token": "example",
          "logprob": 0.5,
          "bytes": [
            0
          ],
          "top_logprobs": [
            {
              "token": "example",
              "logprob": 0.5,
              "bytes": [
                0
              ]
            }
          ]
        }
        

OutputTextContent

A text output from the model.

Name

Description

annotations

Type: Annotation[]

The annotations of the text output.

Example
[
          {
            "type": "file_citation",
            "file_id": "example",
            "index": 0,
            "filename": "example"
          }
        ]
        

logprobs

Type: LogProb[]

Example
[
          {
            "token": "example",
            "logprob": 0.5,
            "bytes": [
              0
            ],
            "top_logprobs": [
              {
                "token": "example",
                "logprob": 0.5,
                "bytes": [
                  0
                ]
              }
            ]
          }
        ]
        

text

Type: string

The text output from the model.

Example: example

type

Type: string

The type of the output text. Always output_text.

Default: output_text

Const: output_text

Example
{
          "type": "output_text",
          "text": "example",
          "annotations": [
            {
              "type": "file_citation",
              "file_id": "example",
              "index": 0,
              "filename": "example"
            }
          ],
          "logprobs": [
            {
              "token": "example",
              "logprob": 0.5,
              "bytes": [
                0
              ],
              "top_logprobs": [
                {
                  "token": "example",
                  "logprob": 0.5,
                  "bytes": [
                    null
                  ]
                }
              ]
            }
          ]
        }
        

RefusalContent

A refusal from the model.

Name

Description

refusal

Type: string

The refusal explanation from the model.

Example: example

type

Type: string

The type of the refusal. Always refusal.

Default: refusal

Const: refusal

Example
{
          "type": "refusal",
          "refusal": "example"
        }
        

OutputMessageContent

One of 2 types
  • Output text

    Type: OutputTextContent

    A text output from the model.

    Example
    {
              "type": "output_text",
              "text": "example",
              "annotations": [
                {
                  "type": "file_citation",
                  "file_id": "example",
                  "index": 0,
                  "filename": "example"
                }
              ],
              "logprobs": [
                {
                  "token": "example",
                  "logprob": 0.5,
                  "bytes": [
                    0
                  ],
                  "top_logprobs": [
                    {
                      "token": "example",
                      "logprob": 0.5,
                      "bytes": [
                        null
                      ]
                    }
                  ]
                }
              ]
            }
            
  • Refusal

    Type: RefusalContent

    A refusal from the model.

    Example
    {
              "type": "refusal",
              "refusal": "example"
            }
            
Example
{
          "type": "output_text",
          "text": "example",
          "annotations": [
            {
              "type": "file_citation",
              "file_id": "example",
              "index": 0,
              "filename": "example"
            }
          ],
          "logprobs": [
            {
              "token": "example",
              "logprob": 0.5,
              "bytes": [
                0
              ],
              "top_logprobs": [
                {}
              ]
            }
          ]
        }
        

MessagePhase

Labels an assistant message as intermediate commentary (commentary) or the final answer (final_answer). Not used for user messages.

Type: string

Enum: commentary, final_answer

OutputMessage

An output message from the model.

Name

Description

content

Type: OutputMessageContent[]

The content of the output message.

Example
[
          {
            "type": "output_text",
            "text": "example",
            "annotations": [
              {}
            ],
            "logprobs": [
              {
                "token": "example",
                "logprob": 0.5,
                "bytes": [
                  null
                ],
                "top_logprobs": [
                  null
                ]
              }
            ]
          }
        ]
        

id

Type: string

The unique ID of the output message.

Example: example

role

Type: string

The role of the output message. Always assistant.

Const: assistant

Example: example

status

Type: string

The status of the message input. One of in_progress, completed, or incomplete. Populated when input items are returned via API.

Enum: in_progress, completed, incomplete

type

Type: string

The type of the output message. Always message.

Const: message

Example: example

phase

Any of 2 types
  • Type: MessagePhase

    Labels an assistant message as intermediate commentary (commentary) or the final answer (final_answer). Not used for user messages.

    Enum: commentary, final_answer

  • Type: null

    Example: null

Example: commentary

Example
{
          "id": "example",
          "type": "message",
          "role": "assistant",
          "content": [
            {
              "type": "output_text",
              "text": "example",
              "annotations": [
                null
              ],
              "logprobs": [
                {}
              ]
            }
          ],
          "phase": "commentary",
          "status": "in_progress"
        }
        

VectorStoreFileAttributes

Any of 2 types
  • Type: object

    [additional]

    One of 3 types
    • Type: string

      Max length: 512

      Example: example

    • Type: number

    • Type: boolean

    Example: example

    Set of key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.

    Max properties: 16

    Example
    {}
            
  • Type: unknown

    Example: null

Default: null

FileSearchToolCall

The results of a File Search tool call.

Name

Description

id

Type: string

The unique ID of the file search tool call.

Example: example

queries

Type: string[]

The queries used to search for files.

Example
[
          "example"
        ]
        

status

Type: string

The status of the file search tool call. One of in_progress, searching, incomplete or failed,

Enum: in_progress, searching, completed, incomplete, failed

type

Type: string

The type of the file search tool call. Always file_search_call.

Const: file_search_call

Example: example

results

Any of 2 types
  • Type: object[]

    attributes

    Type: VectorStoreFileAttributes

    Default: null

    Example
    {}
            

    file_id

    Type: string

    The unique ID of the file.

    Example: example

    filename

    Type: string

    The name of the file.

    Example: example

    score

    Type: number

    The relevance score of the file - a value between 0 and 1.

    text

    Type: string

    The text that was retrieved from the file.

    Example: example

    The results of the file search tool call.

    Example
    [
              {
                "file_id": "example",
                "text": "example",
                "filename": "example",
                "attributes": null,
                "score": 0.5
              }
            ]
            
  • Type: null

    Example: null

Example
[
          {
            "file_id": "example",
            "text": "example",
            "filename": "example",
            "attributes": null,
            "score": 0.5
          }
        ]
        
Example
{
          "id": "example",
          "type": "file_search_call",
          "status": "in_progress",
          "queries": [
            "example"
          ],
          "results": [
            {
              "file_id": "example",
              "text": "example",
              "filename": "example",
              "attributes": null,
              "score": 0.5
            }
          ]
        }
        

WebSearchActionSearch

Action type "search" - Performs a web search query.

Name

Description

query

Type: string

[DEPRECATED] The search query.

Example: example

type

Type: string

The action type.

Const: search

Example: example

queries

Type: string[]

The search queries.

Example
[
          "example"
        ]
        

sources

Type: Web search source

type

Type: string

The type of source. Always url.

Const: url

Example: example

url

Type: string

The URL of the source.

Example: example

The sources used in the search.

Example
[
          {
            "type": "url",
            "url": "example"
          }
        ]
        
Example
{
          "type": "search",
          "query": "example",
          "queries": [
            "example"
          ],
          "sources": [
            {
              "type": "url",
              "url": "example"
            }
          ]
        }
        

WebSearchActionOpenPage

Action type "open_page" - Opens a specific URL from search results.

Name

Description

type

Type: string

The action type.

Const: open_page

Example: example

url

Any of 2 types
  • Type: string<uri>

    Example: https://example.com

  • Type: null

    Example: null

The URL opened by the model.

Example: https://example.com

Example
{
          "type": "open_page",
          "url": "https://example.com"
        }
        

WebSearchActionFind

Action type "find_in_page": Searches for a pattern within a loaded page.

Name

Description

pattern

Type: string

The pattern or text to search for within the page.

Example: example

type

Type: string

The action type.

Const: find_in_page

Example: example

url

Type: string<uri>

The URL of the page searched for the pattern.

Example: https://example.com

Example
{
          "type": "find_in_page",
          "url": "https://example.com",
          "pattern": "example"
        }
        

WebSearchToolCall

The results of a web search tool call.

Name

Description

action

Type: object

One of 3 types
  • Search action

    Type: WebSearchActionSearch

    Action type "search" - Performs a web search query.

    Example
    {
              "type": "search",
              "query": "example",
              "queries": [
                "example"
              ],
              "sources": [
                {
                  "type": "url",
                  "url": "example"
                }
              ]
            }
            
  • Open page action

    Type: WebSearchActionOpenPage

    Action type "open_page" - Opens a specific URL from search results.

    Example
    {
              "type": "open_page",
              "url": "https://example.com"
            }
            
  • Find action

    Type: WebSearchActionFind

    Action type "find_in_page": Searches for a pattern within a loaded page.

    Example
    {
              "type": "find_in_page",
              "url": "https://example.com",
              "pattern": "example"
            }
            

An object describing the specific action taken in this web search call. Includes details on how the model used the web (search, open_page, find_in_page).

Example
{
          "type": "search",
          "query": "example",
          "queries": [
            "example"
          ],
          "sources": [
            {
              "type": "url",
              "url": "example"
            }
          ]
        }
        

id

Type: string

The unique ID of the web search tool call.

Example: example

status

Type: string

The status of the web search tool call.

Enum: in_progress, searching, completed, failed

type

Type: string

The type of the web search tool call. Always web_search_call.

Const: web_search_call

Example: example

Example
{
          "id": "example",
          "type": "web_search_call",
          "status": "in_progress",
          "action": {
            "type": "search",
            "query": "example",
            "queries": [
              "example"
            ],
            "sources": [
              {
                "type": "url",
                "url": "example"
              }
            ]
          }
        }
        

SummaryTextContent

A summary text from the model.

Name

Description

text

Type: string

A summary of the reasoning output from the model so far.

Example: example

type

Type: string

The type of the object. Always summary_text.

Default: summary_text

Const: summary_text

Example
{
          "type": "summary_text",
          "text": "example"
        }
        

ReasoningTextContent

Reasoning text from the model.

Name

Description

text

Type: string

The reasoning text from the model.

Example: example

type

Type: string

The type of the reasoning text. Always reasoning_text.

Default: reasoning_text

Const: reasoning_text

Example
{
          "type": "reasoning_text",
          "text": "example"
        }
        

ReasoningItem

A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your input to the Responses API for subsequent turns of a conversation if you are manually managing context.

Name

Description

id

Type: string

The unique identifier of the reasoning content.

Example: example

summary

Type: SummaryTextContent[]

Reasoning summary content.

Example
[
          {
            "type": "summary_text",
            "text": "example"
          }
        ]
        

type

Type: string

The type of the object. Always reasoning.

Const: reasoning

Example: example

content

Type: ReasoningTextContent[]

Reasoning text content.

Example
[
          {
            "type": "reasoning_text",
            "text": "example"
          }
        ]
        

encrypted_content

Any of 2 types
  • Type: string

    The encrypted content of the reasoning item - populated when a response is
    generated with reasoning.encrypted_content in the include parameter.

    Example: example

  • Type: null

    Example: null

Example: example

status

Type: string

The status of the item. One of in_progress, completed, or
incomplete. Populated when items are returned via API.

Enum: in_progress, completed, incomplete

Example
{
          "type": "reasoning",
          "id": "example",
          "encrypted_content": "example",
          "summary": [
            {
              "type": "summary_text",
              "text": "example"
            }
          ],
          "content": [
            {
              "type": "reasoning_text",
              "text": "example"
            }
          ],
          "status": "in_progress"
        }
        

CompactionBody

A compaction item generated by the v1/responses/compact API.

Name

Description

encrypted_content

Type: string

The encrypted content that was produced by compaction.

Example: example

id

Type: string

The unique ID of the compaction item.

Example: example

type

Type: string

The type of the item. Always compaction.

Default: compaction

Const: compaction

created_by

Type: string

The identifier of the actor that created the item.

Example: example

Example
{
          "type": "compaction",
          "id": "example",
          "encrypted_content": "example",
          "created_by": "example"
        }
        

ImageGenToolCall

An image generation request made by the model.

Name

Description

id

Type: string

The unique ID of the image generation call.

Example: example

result

Any of 2 types
  • Type: string

    The generated image encoded in base64.

    Example: example

  • Type: null

    Example: null

Example: example

status

Type: string

The status of the image generation call.

Enum: in_progress, completed, generating, failed

type

Type: string

The type of the image generation call. Always image_generation_call.

Const: image_generation_call

Example: example

Example
{
          "type": "image_generation_call",
          "id": "example",
          "status": "in_progress",
          "result": "example"
        }
        

CodeInterpreterOutputLogs

The logs output from the code interpreter.

Name

Description

logs

Type: string

The logs output from the code interpreter.

Example: example

type

Type: string

The type of the output. Always logs.

Default: logs

Const: logs

Example
{
          "type": "logs",
          "logs": "example"
        }
        

CodeInterpreterOutputImage

The image output from the code interpreter.

Name

Description

type

Type: string

The type of the output. Always image.

Default: image

Const: image

url

Type: string

The URL of the image output from the code interpreter.

Example: example

Example
{
          "type": "image",
          "url": "example"
        }
        

CodeInterpreterToolCall

A tool call to run code.

Name

Description

code

Any of 2 types
  • Type: string

    The code to run, or null if not available.

    Example: example

  • Type: null

    Example: null

Example: example

container_id

Type: string

The ID of the container used to run the code.

Example: example

id

Type: string

The unique ID of the code interpreter tool call.

Example: example

outputs

Any of 2 types
  • Type: array
    One of 2 types
    • Code interpreter output logs

      Type: CodeInterpreterOutputLogs

      The logs output from the code interpreter.

      Example
      {
                "type": "logs",
                "logs": "example"
              }
              
    • Code interpreter output image

      Type: CodeInterpreterOutputImage

      The image output from the code interpreter.

      Example
      {
                "type": "image",
                "url": "example"
              }
              

    The outputs generated by the code interpreter, such as logs or images.
    Can be null if no outputs are available.

    Example
    [
              {
                "type": "logs",
                "logs": "example"
              }
            ]
            
  • Type: null

    Example: null

Example
[
          {
            "type": "logs",
            "logs": "example"
          }
        ]
        

status

Type: string

The status of the code interpreter tool call. Valid values are in_progress, completed, incomplete, interpreting, and failed.

Enum: in_progress, completed, incomplete, interpreting, failed

type

Type: string

The type of the code interpreter tool call. Always code_interpreter_call.

Default: code_interpreter_call

Const: code_interpreter_call

Example
{
          "type": "code_interpreter_call",
          "id": "example",
          "status": "in_progress",
          "container_id": "example",
          "code": "example",
          "outputs": [
            {
              "type": "logs",
              "logs": "example"
            }
          ]
        }
        

MCPListToolsTool

A tool available on an MCP server.

Name

Description

input_schema

Type: object

The JSON schema describing the tool's input.

Example
{}
        

name

Type: string

The name of the tool.

Example: example

annotations

Any of 2 types
  • Type: object

    Additional annotations about the tool.

    Example
    {}
            
  • Type: null

    Example: null

Example
{}
        

description

Any of 2 types
  • Type: string

    The description of the tool.

    Example: example

  • Type: null

    Example: null

Example: example

Example
{
          "name": "example",
          "description": "example",
          "input_schema": {},
          "annotations": {}
        }
        

MCPListTools

A list of tools available on an MCP server.

Name

Description

id

Type: string

The unique ID of the list.

Example: example

server_label

Type: string

The label of the MCP server.

Example: example

tools

Type: MCPListToolsTool[]

The tools available on the server.

Example
[
          {
            "name": "example",
            "description": "example",
            "input_schema": {},
            "annotations": {}
          }
        ]
        

type

Type: string

The type of the item. Always mcp_list_tools.

Const: mcp_list_tools

Example: example

error

Any of 2 types
  • Type: string

    Error message if the server could not list tools.

    Example: example

  • Type: null

    Example: null

Example: example

Example
{
          "type": "mcp_list_tools",
          "id": "example",
          "server_label": "example",
          "tools": [
            {
              "name": "example",
              "description": "example",
              "input_schema": {},
              "annotations": {}
            }
          ],
          "error": "example"
        }
        

MCPApprovalRequest

A request for human approval of a tool invocation.

Name

Description

arguments

Type: string

A JSON string of arguments for the tool.

Example: example

id

Type: string

The unique ID of the approval request.

Example: example

name

Type: string

The name of the tool to run.

Example: example

server_label

Type: string

The label of the MCP server making the request.

Example: example

type

Type: string

The type of the item. Always mcp_approval_request.

Const: mcp_approval_request

Example: example

Example
{
          "type": "mcp_approval_request",
          "id": "example",
          "server_label": "example",
          "name": "example",
          "arguments": "example"
        }
        

MCPApprovalResponseResource

A response to an MCP approval request.

Name

Description

approval_request_id

Type: string

The ID of the approval request being answered.

Example: example

approve

Type: boolean

Whether the request was approved.

id

Type: string

The unique ID of the approval response

Example: example

type

Type: string

The type of the item. Always mcp_approval_response.

Const: mcp_approval_response

Example: example

reason

Any of 2 types
  • Type: string

    Optional reason for the decision.

    Example: example

  • Type: null

    Example: null

Example: example

Example
{
          "type": "mcp_approval_response",
          "id": "example",
          "approval_request_id": "example",
          "approve": true,
          "reason": "example"
        }
        

MCPToolCallStatus

Type: string

Enum: in_progress, completed, incomplete, calling, failed

MCPToolCall

An invocation of a tool on an MCP server.

Name

Description

arguments

Type: string

A JSON string of the arguments passed to the tool.

Example: example

id

Type: string

The unique ID of the tool call.

Example: example

name

Type: string

The name of the tool that was run.

Example: example

server_label

Type: string

The label of the MCP server running the tool.

Example: example

type

Type: string

The type of the item. Always mcp_call.

Const: mcp_call

Example: example

approval_request_id

Any of 2 types
  • Type: string

    Unique identifier for the MCP tool call approval request.
    Include this value in a subsequent mcp_approval_response input to approve or reject the corresponding tool call.

    Example: example

  • Type: null

    Example: null

Example: example

error

Any of 2 types
  • Type: string

    The error from the tool call, if any.

    Example: example

  • Type: null

    Example: null

Example: example

output

Any of 2 types
  • Type: string

    The output from the tool call.

    Example: example

  • Type: null

    Example: null

Example: example

status

Type: MCPToolCallStatus

The status of the tool call. One of in_progress, completed, incomplete, calling, or failed.

Enum: in_progress, completed, incomplete, calling, failed

Example
{
          "type": "mcp_call",
          "id": "example",
          "server_label": "example",
          "name": "example",
          "arguments": "example",
          "output": "example",
          "error": "example",
          "status": "in_progress",
          "approval_request_id": "example"
        }
        

ItemResource

Content item used to generate a response.

One of 12 types
  • Type: InputMessageResource

    Example
    {
              "type": "message",
              "role": "user",
              "status": "in_progress",
              "content": [
                {
                  "type": "input_text",
                  "text": "example"
                }
              ],
              "id": "example"
            }
            
  • Output message

    Type: OutputMessage

    An output message from the model.

    Example
    {
              "id": "example",
              "type": "message",
              "role": "assistant",
              "content": [
                {
                  "type": "output_text",
                  "text": "example",
                  "annotations": [
                    null
                  ],
                  "logprobs": [
                    {}
                  ]
                }
              ],
              "phase": "commentary",
              "status": "in_progress"
            }
            
  • File search tool call

    Type: FileSearchToolCall

    The results of a File Search tool call.

    Example
    {
              "id": "example",
              "type": "file_search_call",
              "status": "in_progress",
              "queries": [
                "example"
              ],
              "results": [
                {
                  "file_id": "example",
                  "text": "example",
                  "filename": "example",
                  "attributes": null,
                  "score": 0.5
                }
              ]
            }
            
  • Web search tool call

    Type: WebSearchToolCall

    The results of a web search tool call.

    Example
    {
              "id": "example",
              "type": "web_search_call",
              "status": "in_progress",
              "action": {
                "type": "search",
                "query": "example",
                "queries": [
                  "example"
                ],
                "sources": [
                  {
                    "type": "url",
                    "url": "example"
                  }
                ]
              }
            }
            
  • Reasoning

    Type: ReasoningItem

    A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your input to the Responses API for subsequent turns of a conversation if you are manually managing context.

    Example
    {
              "type": "reasoning",
              "id": "example",
              "encrypted_content": "example",
              "summary": [
                {
                  "type": "summary_text",
                  "text": "example"
                }
              ],
              "content": [
                {
                  "type": "reasoning_text",
                  "text": "example"
                }
              ],
              "status": "in_progress"
            }
            
  • Compaction item

    Type: CompactionBody

    A compaction item generated by the v1/responses/compact API.

    Example
    {
              "type": "compaction",
              "id": "example",
              "encrypted_content": "example",
              "created_by": "example"
            }
            
  • Image generation call

    Type: ImageGenToolCall

    An image generation request made by the model.

    Example
    {
              "type": "image_generation_call",
              "id": "example",
              "status": "in_progress",
              "result": "example"
            }
            
  • Code interpreter tool call

    Type: CodeInterpreterToolCall

    A tool call to run code.

    Example
    {
              "type": "code_interpreter_call",
              "id": "example",
              "status": "in_progress",
              "container_id": "example",
              "code": "example",
              "outputs": [
                {
                  "type": "logs",
                  "logs": "example"
                }
              ]
            }
            
  • MCP list tools

    Type: MCPListTools

    A list of tools available on an MCP server.

    Example
    {
              "type": "mcp_list_tools",
              "id": "example",
              "server_label": "example",
              "tools": [
                {
                  "name": "example",
                  "description": "example",
                  "input_schema": {},
                  "annotations": {}
                }
              ],
              "error": "example"
            }
            
  • MCP approval request

    Type: MCPApprovalRequest

    A request for human approval of a tool invocation.

    Example
    {
              "type": "mcp_approval_request",
              "id": "example",
              "server_label": "example",
              "name": "example",
              "arguments": "example"
            }
            
  • MCP approval response

    Type: MCPApprovalResponseResource

    A response to an MCP approval request.

    Example
    {
              "type": "mcp_approval_response",
              "id": "example",
              "approval_request_id": "example",
              "approve": true,
              "reason": "example"
            }
            
  • MCP tool call

    Type: MCPToolCall

    An invocation of a tool on an MCP server.

    Example
    {
              "type": "mcp_call",
              "id": "example",
              "server_label": "example",
              "name": "example",
              "arguments": "example",
              "output": "example",
              "error": "example",
              "status": "in_progress",
              "approval_request_id": "example"
            }
            
Example
{
          "type": "message",
          "role": "user",
          "status": "in_progress",
          "content": [
            {}
          ],
          "id": "example"
        }