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

# 列出请求记录

> 按时间倒序返回请求记录，包含失败请求。将 next 原样作为 before 获取下一页，next=null 表示结束。权限范围和监控读取限流与用量汇总相同。



## OpenAPI

````yaml /openapi.cn.json get /v1/manage/requests
openapi: 3.1.0
info:
  title: OmniRelay API
  version: 1.0.0
  description: 面向已核验真实文本模型的兼容 OpenAI 网关。访问按工作空间开通，使用自己的模型列表查询能力与客户价格。
servers:
  - url: https://api.omnirelay.ai
security:
  - bearerAuth: []
tags:
  - name: 服务
  - name: 模型
  - name: 对话
  - name: 管理 API
  - name: 响应
  - name: 向量
  - name: 图片
  - name: 视频
paths:
  /v1/manage/requests:
    get:
      tags:
        - 管理 API
      summary: 列出请求记录
      description: >-
        按时间倒序返回请求记录，包含失败请求。将 next 原样作为 before 获取下一页，next=null
        表示结束。权限范围和监控读取限流与用量汇总相同。
      operationId: managementListRequestRecords
      parameters:
        - name: range
          in: query
          schema:
            type: string
            enum:
              - 24h
              - 7d
              - 30d
              - 90d
            default: 7d
        - name: step
          in: query
          schema:
            type: string
            enum:
              - hour
              - day
            default: day
          description: hour 仅适用于 range=24h 或 7d。
        - name: model
          in: query
          schema:
            type: string
        - name: provider
          in: query
          schema:
            type: string
        - name: key
          in: query
          schema:
            type: string
          description: API Key 的 ID，不是密钥正文。
        - name: member
          in: query
          schema:
            type: string
          description: 成员 ID，要求管理密钥所有者具有 members.read 权限。
        - name: tag_key
          in: query
          schema:
            type: string
        - name: tag_value
          in: query
          schema:
            type: string
        - name: tag_group
          in: query
          schema:
            type: string
        - name: status
          in: query
          schema:
            type: string
            enum:
              - ok
              - error
        - name: id
          in: query
          schema:
            type: string
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 50
        - name: before
          in: query
          schema:
            type: string
      responses:
        '200':
          description: 请求成功。
          content:
            application/json:
              schema:
                type: object
                properties:
                  requests:
                    type: array
                    items:
                      $ref: '#/components/schemas/ManagementRequestRecord'
                  total:
                    type: integer
                  next:
                    type: string
                    nullable: true
                  limit:
                    type: integer
              example:
                requests: []
                total: 0
                next: null
                limit: 50
        '400':
          description: JSON、输入、标签、模型规则、到期时间或预算规则无效。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: unauthorized 或 management_key_required。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: insufficient_scope 或 forbidden。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: not_found：路径不存在或 Key 不属于调用者。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: rate_limited：每个管理密钥每分钟 120 次，还可能受所有者额外限流约束。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - managementAuth: []
components:
  schemas:
    ManagementRequestRecord:
      type: object
      properties:
        id:
          type: string
        created:
          type: string
        model:
          type: string
        provider:
          type: string
          nullable: true
        key_id:
          type: string
          nullable: true
        status:
          type: integer
        error:
          type: string
          nullable: true
        input:
          type: integer
          nullable: true
        output:
          type: integer
          nullable: true
        cost:
          type: integer
          nullable: true
        latency:
          type: integer
        mode:
          type: string
        tags:
          type: string
          nullable: true
          description: JSON 编码的标签字符串，或 null。
        first_token_ms:
          type:
            - integer
            - 'null'
          minimum: 0
          description: 首个流式文本或工具参数 Token 的延迟，单位毫秒。非流式或未观测请求为 null。
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - type
          properties:
            code:
              type: string
              example: model_unavailable
            message:
              type: string
              example: The model does not exist or is disabled.
              description: 用于日志和 SDK 异常的简短英文说明；措辞可能调整，请按 code 判断。
            type:
              type: string
              example: not_found_error
              description: >-
                按 HTTP
                状态划分的错误类别：invalid_request_error、authentication_error、insufficient_quota、permission_error、not_found_error、conflict_error、rate_limit_error、service_unavailable
                或 api_error。
            param:
              type: string
              maxLength: 200
              description: 可识别时返回被拒绝的请求字段路径，不包含参数值；Responses 使用原生字段名。
        request_id:
          type: string
          description: 在对话补全、Responses 和 Embeddings 出错时返回。
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 在 OmniRelay 控制台创建的 API Key。所有者确认身份后可在控制台再次查看。
    managementAuth:
      type: http
      scheme: bearer
      description: 在控制台创建的管理密钥；read 可读取，write 还可修改 API Key。不接受推理 API Key。

````

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