> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bigmodel.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 查询输入项列表

> 分页列出某次 Response 的输入项。创建时须 `store=true`。点击 **Try it** 可试用。



## OpenAPI

````yaml /openapi/openapi-responses.json get /v1/responses/{response_id}/input_items
openapi: 3.0.1
info:
  title: 智谱 AI Response API
  version: 1.0.0
  description: >-
    创建、查询与删除模型 Response。端点 `https://open.bigmodel.cn/api/v1`。概念见 [Response
    API](/cn/guide/develop/responses/introduction)。
  contact:
    name: Z.AI 开发者
    url: https://chat.z.ai/legal-agreement/privacy-policy
    email: user_feedback@z.ai
servers:
  - url: https://open.bigmodel.cn/api
    description: 开放平台 Response API
security:
  - bearerAuth: []
tags:
  - name: Response
    description: 创建、查询、列举输入项与删除 Response。
paths:
  /v1/responses/{response_id}/input_items:
    get:
      tags:
        - Response
      summary: 查询输入项列表
      description: 分页列出某次 Response 的输入项。创建时须 `store=true`。点击 **Try it** 可试用。
      operationId: listResponseInputItems
      parameters:
        - name: response_id
          in: path
          required: true
          description: 要检索的响应 ID，即创建响应时返回的 `id`。
          schema:
            type: string
            example: resp_xxx
        - name: order
          in: query
          required: false
          description: 排序方式：`desc`（默认）/ `asc`。
          schema:
            type: string
            enum:
              - desc
              - asc
            default: desc
        - name: limit
          in: query
          required: false
          description: 单页返回条数，范围 1–100，默认 20。
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - name: after
          in: query
          required: false
          description: 分页游标，取上一页返回的 `last_id`；首页留空。
          schema:
            type: string
      responses:
        '200':
          description: 业务处理成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InputItemList'
        default:
          description: 请求失败。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    InputItemList:
      type: object
      properties:
        data:
          type: array
          description: >-
            当前页的输入项，元素为 message / reasoning / function_call /
            function_call_output 等。
          items:
            $ref: '#/components/schemas/InputItem'
        first_id:
          type: string
          nullable: true
          description: 当前页首条输入项的 id；空页为 null。
        last_id:
          type: string
          nullable: true
          description: 当前页末条输入项的 id，作为下一页 `after`；空页为 null。
        has_more:
          type: boolean
          description: 是否还有下一页。
    Error:
      type: object
      description: >-
        Response API 错误。`error.code` 为字符串，与对话补全的数字业务码不是同一套。


        | code | 含义 |

        | --- | --- |

        | `invalid_request` | 请求参数或格式错误 |

        | `model_not_found` | 模型不存在 |

        | `not_implemented` | 接口或能力未实现 |

        | `request_too_large` | 请求体超过大小限制 |

        | `authentication_error` / `invalid_api_key` / `expired` | 认证失败 |

        | `permission_denied` | 权限不足 |

        | `context_length_exceeded` | 输入超过模型上下文窗口 |

        | `rate_limit_exceeded` | 请求频率超限 |

        | `insufficient_quota` / `quota_exceeded` / `usage_limit_reached` /
        `usage_not_included` | 额度或用量限制 |

        | `server_error` | 服务端内部错误 |

        | `server_is_overloaded` / `overloaded` / `slow_down` | 服务过载或要求降速 |

        | `content_filter` / `cyber_policy` | 内容或安全策略拦截 |
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: 错误码，例如 `invalid_request`。
            message:
              type: string
              description: 错误描述。
    InputItem:
      description: 一条输入项。
      oneOf:
        - $ref: '#/components/schemas/InputMessage'
          title: 用户消息
        - $ref: '#/components/schemas/InputFunctionCall'
          title: 工具命中
        - $ref: '#/components/schemas/InputFunctionCallOutput'
          title: 工具返回
        - $ref: '#/components/schemas/InputReasoning'
          title: 思维链输入
    InputMessage:
      type: object
      required:
        - type
        - role
        - content
      properties:
        type:
          type: string
          enum:
            - message
          description: 消息输入的类型，此处应为 `message`。
        role:
          type: string
          enum:
            - user
            - system
            - assistant
            - developer
          description: 输入消息角色。回放助手文本时为 `assistant`。
        content:
          description: 文本、图片、文件，或助手的 `output_text`。
          oneOf:
            - type: string
              title: 文本
            - $ref: '#/components/schemas/InputContentPart'
              title: 内容块
            - type: array
              items:
                $ref: '#/components/schemas/InputContentPart'
              title: 内容块列表
      title: 用户消息
    InputFunctionCall:
      type: object
      required:
        - type
        - name
        - call_id
        - arguments
      properties:
        type:
          type: string
          enum:
            - function_call
          description: 工具调用，始终为 `function_call`。
        name:
          type: string
          description: 要运行的函数名称。
        call_id:
          type: string
          description: 模型生成的函数调用唯一 ID。
        arguments:
          type: string
          description: 传递给函数的参数 JSON 字符串。
        namespace:
          type: string
          description: 函数所属命名空间。
      title: 工具命中
    InputFunctionCallOutput:
      type: object
      required:
        - type
        - call_id
        - output
      properties:
        type:
          type: string
          enum:
            - function_call_output
          description: 工具输出，始终为 `function_call_output`。
        call_id:
          type: string
          description: 对应函数调用的唯一 ID。
        output:
          type: string
          description: 工具执行结果。
      title: 工具返回
    InputReasoning:
      type: object
      required:
        - type
        - content
      properties:
        type:
          type: string
          enum:
            - reasoning
          description: 思维链，始终为 `reasoning`。
        content:
          $ref: '#/components/schemas/ReasoningTextPart'
      title: 思维链输入
    InputContentPart:
      oneOf:
        - type: object
          required:
            - type
            - text
          properties:
            type:
              type: string
              enum:
                - input_text
              description: 文本输入。
            text:
              type: string
              description: 输入模型的文本。
          title: 文本输入
        - type: object
          required:
            - type
            - image_url
          properties:
            type:
              type: string
              enum:
                - input_image
              description: 图像输入。
            image_url:
              type: string
              description: 图片 URL 或 base64。
          title: 图像输入
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - input_file
              description: 文件输入。
            file_data:
              type: string
              description: 文件 base64。
            file_url:
              type: string
              description: 文件 URL。
          title: 文件输入
        - type: object
          required:
            - type
            - text
          properties:
            type:
              type: string
              enum:
                - output_text
              description: 回放助手文本时使用。
            text:
              type: string
              description: 模型输出的文本。
          title: 助手文本回放
      title: 内容块
    ReasoningTextPart:
      type: object
      required:
        - type
        - text
      properties:
        type:
          type: string
          enum:
            - reasoning_text
          description: 输出文本类型，此处为 `reasoning_text`。
        text:
          type: string
          description: 推理文本。
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        标准 HTTP Bearer 认证。在 [API
        Keys](https://bigmodel.cn/usercenter/proj-mgmt/apikeys) 获取密钥。

````