> ## 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.

# 列出 API Key

> 仅返回管理密钥所有者的 API Key，包含已撤销项，不返回完整密钥。



## OpenAPI

````yaml /openapi.cn.json get /v1/manage/keys
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/keys:
    get:
      tags:
        - 管理 API
      summary: 列出 API Key
      description: 仅返回管理密钥所有者的 API Key，包含已撤销项，不返回完整密钥。
      operationId: managementListApiKeys
      responses:
        '200':
          description: 请求成功。
          content:
            application/json:
              schema:
                type: object
                properties:
                  keys:
                    type: array
                    items:
                      $ref: '#/components/schemas/ManagementKeyRecord'
              example:
                keys: []
        '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:
    ManagementKeyRecord:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        prefix:
          type: string
        status:
          type: string
          enum:
            - active
            - revoked
        created:
          type: string
        expires_at:
          type: integer
          nullable: true
        member_name:
          type: string
          nullable: true
        member_email:
          type: string
          nullable: true
        default_tags:
          type: object
          properties: {}
        allowed_models:
          type: array
          nullable: true
          items:
            type: string
        sealed:
          type: boolean
    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.