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

# 列出 Run

> 按时间倒序查看 Run，可按状态、数据提供商、接口、Task 或元数据筛选。

每行均为摘要。完整输入、输出和数据提供商错误详情请通过[获取 Run](https://glasser.ai/docs/zh/api-reference/runs/get.md)读取。


## OpenAPI

````yaml /openapi.zh.json get /v1/runs
openapi: 3.1.0
info:
  title: Glasser
  version: 0.0.1
  description: 一个 API Key，无需合同，按次付费，即可调用批量采购的付费 API。每个响应包含 x-request-id；所有错误正文采用统一结构。
servers:
  - url: https://api.glasser.ai
security: []
tags:
  - name: Solutions
  - name: Endpoints
  - name: Runs
  - name: Balance
paths:
  /v1/runs:
    get:
      tags:
        - Runs
      summary: 列出 Run
      description: >-
        按时间倒序查看 Run。可按状态、数据提供商、接口、Task 或元数据筛选，并通过 next_cursor 读取下一页。只显示 API Key
        Policy 允许的 Run。


        每行均为摘要：input 和 output 为 {"omitted": true}，不包含数据提供商错误正文。完整输入、输出和错误详情请通过
        Get Run 读取。
      operationId: runs-list
      parameters:
        - name: limit
          in: query
          schema:
            type: string
            pattern: ^[+-]?\d*\.?\d+(?:[Ee][+-]?\d+)?$
          required: false
        - name: cursor
          in: query
          schema:
            anyOf:
              - type: string
                description: 传入上次响应中的 next_cursor 读取下一页。
              - type: 'null'
          required: false
        - name: status
          in: query
          schema:
            anyOf:
              - type: string
                enum:
                  - QUEUED
                  - RUNNING
                  - COMPLETED
                  - FAILED
                  - STOPPED
              - type: 'null'
          required: false
        - name: provider
          in: query
          schema:
            anyOf:
              - type: string
              - type: 'null'
          required: false
        - name: endpoint
          in: query
          schema:
            anyOf:
              - type: string
              - type: 'null'
          required: false
        - name: task
          in: query
          schema:
            anyOf:
              - type: string
                description: 只返回记录在该 Task 下的 Run，精确匹配。
              - type: 'null'
          required: false
        - name: metadata
          in: query
          schema:
            anyOf:
              - type: string
                description: >-
                  只返回 metadata 包含此 JSON 对象中全部键值对的 Run，例如
                  {"user_id":"user_123"}，精确匹配。
                contentMediaType: application/json
              - type: 'null'
          required: false
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        run_url:
                          type: string
                          description: 在控制台打开 Run，需要工作空间成员权限。
                        provider:
                          type: string
                          pattern: ^[a-z0-9][a-z0-9-]*$
                        endpoint:
                          type: string
                          pattern: ^\/.+$
                        endpoint_version:
                          type: integer
                          exclusiveMinimum: 0
                        status:
                          type: string
                          enum:
                            - QUEUED
                            - RUNNING
                            - COMPLETED
                            - FAILED
                            - STOPPED
                          description: >-
                            QUEUED 或 RUNNING 表示仍在执行。COMPLETED 表示已有数据提供商响应，包括非
                            2xx 响应。FAILED 请读取 failure。STOPPED 表示分派前停止。charge_usd
                            与状态分别检查。
                        failure:
                          anyOf:
                            - type: object
                              properties:
                                kind:
                                  type: string
                                  enum:
                                    - TIMED_OUT
                                    - INTERNAL
                                message:
                                  type: string
                              required:
                                - kind
                                - message
                              additionalProperties: false
                            - type: 'null'
                          description: Run 失败原因，仅在 status 为 FAILED 时非 null。
                        input:
                          type: object
                          properties:
                            omitted:
                              type: boolean
                              enum:
                                - true
                          required:
                            - omitted
                          additionalProperties: false
                        output:
                          type: object
                          properties:
                            omitted:
                              type: boolean
                              enum:
                                - true
                          required:
                            - omitted
                          additionalProperties: false
                        provider_response:
                          anyOf:
                            - type: object
                              properties:
                                http_status:
                                  type: integer
                                  minimum: 100
                                  maximum: 599
                                  description: 数据提供商返回的 HTTP 状态，即使 Run 为 COMPLETED 也应检查。
                              required:
                                - http_status
                              additionalProperties: false
                            - type: 'null'
                        charge_usd:
                          anyOf:
                            - type: string
                              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              description: >-
                                精确的美元十进制字符串，小数位数为 2–6，采用唯一规范格式。求和时使用十进制运算或乘以
                                10^6 转为整数，不使用浮点数。
                            - type: 'null'
                          description: >-
                            最终费用，精确的美元十进制字符串。QUEUED 或 RUNNING 时为 null。FAILED 状态的
                            Run 仍可能按接口定价产生非零费用。
                        charge_basis:
                          anyOf:
                            - type: object
                              properties:
                                clause:
                                  type: string
                                  enum:
                                    - rule
                                    - NO_RESULT
                                    - PROVIDER_ERROR
                                    - TIMED_OUT
                                    - INTERNAL
                                quantity:
                                  anyOf:
                                    - type: integer
                                      minimum: 0
                                    - type: 'null'
                              required:
                                - clause
                                - quantity
                              additionalProperties: false
                            - type: 'null'
                          description: 计算费用所用的价格条款。结算前或未尝试调用数据提供商时为 null。
                        stoppable:
                          type: boolean
                          description: 当前是否可接受停止请求。不保证能在分派前停止 Run。
                        stop_requested_at:
                          anyOf:
                            - type: string
                              description: ISO 8601 UTC 时间戳。
                              format: date-time
                            - type: 'null'
                          description: 请求停止的时间。如果已开始分派，Run 仍可能继续。
                        created_at:
                          type: string
                          description: ISO 8601 UTC 时间戳。
                          format: date-time
                        started_at:
                          anyOf:
                            - type: string
                              description: ISO 8601 UTC 时间戳。
                              format: date-time
                            - type: 'null'
                        completed_at:
                          anyOf:
                            - type: string
                              description: ISO 8601 UTC 时间戳。
                              format: date-time
                            - type: 'null'
                        task_id:
                          anyOf:
                            - type: string
                            - type: 'null'
                        metadata:
                          type: object
                          additionalProperties:
                            type: string
                            minLength: 1
                            maxLength: 500
                          maxProperties: 20
                          propertyNames:
                            type: string
                            pattern: ^[a-z][a-z0-9_]{0,39}$
                          description: |-
                            已保存的追踪字段，可用于筛选 Run，不发送给数据提供商，不影响路由、价格或幂等。

                            - 最多 20 个键：小写字母、数字和下划线，以字母开头，最长 40 个字符。
                            - 值：长度为 1–500 的字符串。
                            - user_id：终端用户的不透明 ID，不得使用邮箱或姓名。
                      required:
                        - id
                        - run_url
                        - provider
                        - endpoint
                        - endpoint_version
                        - status
                        - failure
                        - input
                        - output
                        - provider_response
                        - charge_usd
                        - charge_basis
                        - stoppable
                        - stop_requested_at
                        - created_at
                        - started_at
                        - completed_at
                        - task_id
                        - metadata
                      additionalProperties: false
                  next_cursor:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: 下一页游标，没有更多条目时为 null。
                  client:
                    type: object
                    properties:
                      client_version:
                        anyOf:
                          - type: string
                          - type: 'null'
                      minimum_version:
                        type: string
                      latest_version:
                        type: string
                      upgrade_command:
                        type: string
                      reason:
                        type: string
                    required:
                      - client_version
                      - minimum_version
                      - latest_version
                      - upgrade_command
                      - reason
                    additionalProperties: false
                required:
                  - data
                  - next_cursor
                additionalProperties: false
        '400':
          description: ValidationFailed
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ValidationFailedEncoded'
                  - $ref: '#/components/schemas/ValidationFailedEncoded'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedEncoded'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenEncoded'
        '429':
          description: RateLimited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitedEncoded'
      security:
        - bearer: []
components:
  schemas:
    ValidationFailedEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - validation_failed
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
    UnauthorizedEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - unauthorized
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
    ForbiddenEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - forbidden
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
    RateLimitedEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - rate_limited
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
  securitySchemes:
    bearer:
      type: http
      scheme: Bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.