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

# 验证 API 密钥

> Checks that the API key is valid and returns the account and key it belongs to. It does not grant or reveal proxy access.

用此接口确认你的程序配置了有效的密钥，例如在启动时或健康检查中调用。它返回本次请求认证所用的账户和密钥。

`proxy_enabled` 始终为 `false`：API 密钥不会授予代理访问权限。代理连接信息请在控制台获取。

`401` 响应表示密钥缺失、格式错误或已撤销，或者所属账户已停用或尚未验证。不要用同一个密钥重试 `401`。


## OpenAPI

````yaml GET /api/v1/access
openapi: 3.1.0
info:
  title: ipcrazy API
  version: 1.0.0
  description: >-
    Customer API authenticated with an ipcrazy API key. API keys are separate
    from proxy credentials and never grant proxy access.
servers:
  - url: https://ipcrazy.com
security:
  - bearerKey: []
paths:
  /api/v1/access:
    get:
      summary: Verify an API key
      description: >-
        Checks that the API key is valid and returns the account and key it
        belongs to. It does not grant or reveal proxy access.
      operationId: verifyApiAccess
      responses:
        '200':
          description: The key is valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Access'
              example:
                data:
                  customer_id: example-customer-id
                  credential_id: 00000000-0000-4000-8000-000000000000
                  capabilities:
                    - access:read
                  proxy_enabled: false
                trace_id: 9f2c7a8e-0000-4000-8000-000000000000
        '401':
          description: >-
            The key is missing, malformed or revoked, or its account is
            suspended or not yet verified.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: UNAUTHORIZED
                  message: Valid API key required
                  retryable: false
                trace_id: 9f2c7a8e-0000-4000-8000-000000000000
components:
  schemas:
    Access:
      type: object
      required:
        - data
        - trace_id
      properties:
        data:
          type: object
          required:
            - customer_id
            - credential_id
            - capabilities
            - proxy_enabled
          properties:
            customer_id:
              type: string
              description: Identifier of the account that owns the key.
            credential_id:
              type: string
              format: uuid
              description: Identifier of the API key that was used.
            capabilities:
              type: array
              items:
                type: string
                enum:
                  - access:read
              description: What the key may do. Currently only `access:read`.
            proxy_enabled:
              type: boolean
              const: false
              description: 'Always `false`: an API key is never a proxy credential.'
        trace_id:
          type: string
    Error:
      type: object
      required:
        - error
        - trace_id
      properties:
        error:
          type: object
          required:
            - code
            - message
            - retryable
          properties:
            code:
              type: string
              description: Stable machine-readable error code, for example `UNAUTHORIZED`.
              example: UNAUTHORIZED
            message:
              type: string
              description: Human-readable description. Do not parse it.
              example: Valid API key required
            retryable:
              type: boolean
              description: Whether repeating the same request later may succeed.
        trace_id:
          type: string
          description: Request identifier. Include it when you contact support.
  securitySchemes:
    bearerKey:
      type: http
      scheme: bearer
      description: >-
        An ipcrazy API key in the form `ipc_live_…`, created under Console → API
        Keys. Never send a proxy password here.

````

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