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

# मौजूदा API कुंजी प्राप्त करें

> वर्तमान में प्रमाणित मानक Gateway API कुंजी का निरीक्षण करता है।

जिस API कुंजी का निरीक्षण करना है, उससे प्रमाणित करें। यह एंडपॉइंट मौजूदा अनुरोध से जुड़ी कुंजी का मेटाडेटा लौटाता है।


## OpenAPI

````yaml hi/openapi/v1/openapi.localized.yaml GET /key
openapi: 3.0.3
info:
  title: Phaseo Gateway API
  description: >-
    OpenAI-संगत एंडपॉइंट के माध्यम से विभिन्न AI मॉडल तक पहुँचने के लिए एक गेटवे
    API।
  version: 1.0.0
  contact:
    name: Phaseo
    url: https://phaseo.app
    email: danielbutler500@gmail.com
servers:
  - url: https://api.phaseo.app/v1
    description: वैश्विक रूटिंग
security:
  - BearerAuth: []
tags:
  - name: Gateway
    description: Core Phaseo Gateway operations.
paths:
  /key:
    get:
      tags:
        - Gateway
      summary: वर्तमान API कुंजी पाएँ
      description: वर्तमान में प्रमाणित मानक Gateway API कुंजी का मेटाडेटा लौटाता है।
      operationId: getCurrentApiKey
      responses:
        '200':
          description: वर्तमान API कुंजी का मेटाडेटा
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyResponse'
        '401':
          description: अनधिकृत
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: API कुंजी नहीं मिली
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: सर्वर त्रुटि
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ApiKeyResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/ApiKey'
      additionalProperties: false
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        ok:
          type: boolean
          example: false
        error:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
          example: error_type
        message:
          type: string
          example: Human-readable error message
        description:
          type: string
          example: Additional error details.
        generation_id:
          type: string
          example: G-abc123
        status_code:
          type: integer
          example: 502
        error_type:
          type: string
          enum:
            - user
            - system
          example: system
        error_origin:
          type: string
          enum:
            - user
            - gateway
            - upstream
          example: upstream
        reason:
          type: string
          example: all_candidates_failed
        attempt_count:
          type: integer
          example: 2
        failed_providers:
          type: array
          items:
            type: string
          example:
            - google-ai-studio
            - openai
        failed_statuses:
          type: array
          items:
            type: integer
          example:
            - 403
            - 429
        upstream_error:
          $ref: '#/components/schemas/ErrorUpstreamError'
        failure_sample:
          type: array
          items:
            $ref: '#/components/schemas/ErrorFailureSampleItem'
        provider_failure_diagnostics:
          $ref: '#/components/schemas/ErrorProviderFailureDiagnostics'
        routing_diagnostics:
          $ref: '#/components/schemas/ErrorRoutingDiagnostics'
        provider_candidate_diagnostics:
          $ref: '#/components/schemas/ErrorProviderCandidateDiagnostics'
        provider_enablement:
          $ref: '#/components/schemas/ErrorProviderEnablementDiagnostics'
        missing_pricing_providers:
          type: array
          items:
            type: string
        provider_payment_required_provider:
          type: string
          example: openai
        provider_payment_required_support_notice:
          type: string
          example: >-
            Our upstream provider billing appears to be unavailable. If this
            persists, contact support.
        details:
          type: array
          items:
            type: object
            additionalProperties: true
      additionalProperties: true
    ApiKey:
      type: object
      required:
        - id
        - hash
        - workspace_id
        - name
        - label
        - prefix
        - status
        - disabled
        - soft_blocked
        - scopes
        - creator_user_id
        - include_byok_in_limit
        - limit
        - limit_reset
        - limit_remaining
        - usage
        - usage_daily
        - usage_weekly
        - usage_monthly
        - limits
        - usage_details
        - created_by
        - created_at
        - updated_at
        - last_used_at
        - expires_at
      properties:
        id:
          type: string
          format: uuid
          example: 11111111-1111-4111-8111-111111111111
        hash:
          type: string
          example: a3f5b7c9d8e1f23456789abcdeffedcba9876543210fedcba1234567890abcdef
        workspace_id:
          type: string
          format: uuid
          example: 22222222-2222-4222-8222-222222222222
        name:
          type: string
          nullable: true
          example: Analytics Service Key
        label:
          type: string
          nullable: true
          example: Analytics Service Key
        prefix:
          type: string
          nullable: true
          example: phaseo_v1_sk_abcd1234
        status:
          type: string
          nullable: true
          example: active
        disabled:
          type: boolean
          example: false
        soft_blocked:
          type: boolean
          example: false
        scopes:
          $ref: '#/components/schemas/ApiKeyScopeValue'
        creator_user_id:
          type: string
          nullable: true
        created_by:
          type: string
          nullable: true
          example: user_abc123
        created_at:
          type: string
          format: date-time
          nullable: true
          example: '2026-04-28T12:00:00.000Z'
        updated_at:
          type: string
          format: date-time
          nullable: true
          example: '2026-04-28T12:15:00.000Z'
        last_used_at:
          type: string
          format: date-time
          nullable: true
          example: '2026-04-28T12:30:00.000Z'
        expires_at:
          type: string
          format: date-time
          nullable: true
          example: '2027-12-31T23:59:59.000Z'
        include_byok_in_limit:
          type: boolean
          description: >-
            बताता है कि प्रदाता क्रेडेंशियल कुंजी की खर्च सीमा में गिने जाते हैं
            या नहीं। वर्तमान में यह हमेशा false होता है।
        limit:
          type: number
          nullable: true
          description: USD में सक्रिय खर्च सीमा।
        limit_reset:
          type: string
          nullable: true
          enum:
            - daily
            - weekly
            - monthly
        limit_remaining:
          type: number
          nullable: true
        usage:
          type: number
        usage_daily:
          type: number
        usage_weekly:
          type: number
        usage_monthly:
          type: number
        limits:
          $ref: '#/components/schemas/ApiKeyLimitWindows'
        usage_details:
          $ref: '#/components/schemas/ApiKeyUsageWindows'
      additionalProperties: false
    ErrorUpstreamError:
      type: object
      properties:
        code:
          type: string
          nullable: true
          example: PERMISSION_DENIED
        message:
          type: string
          nullable: true
          example: The caller does not have permission.
        description:
          type: string
          nullable: true
        param:
          type: string
          nullable: true
    ErrorFailureSampleItem:
      type: object
      properties:
        provider:
          type: string
          nullable: true
        type:
          type: string
          nullable: true
        status:
          type: integer
          nullable: true
        upstream_error_code:
          type: string
          nullable: true
        upstream_error_message:
          type: string
          nullable: true
        upstream_error_description:
          type: string
          nullable: true
        upstream_error_param:
          type: string
          nullable: true
        upstream_payload_preview:
          type: string
          nullable: true
        retryable:
          type: boolean
          nullable: true
      additionalProperties: true
    ErrorProviderFailureDiagnostics:
      type: object
      properties:
        category:
          type: string
          enum:
            - credentials_not_configured
            - credentials_invalid_or_forbidden
            - provider_access_missing
            - region_or_project_restriction
            - model_unavailable_for_endpoint
            - rate_limited
            - server_error
        hint:
          type: string
        provider:
          type: string
          nullable: true
    ErrorRoutingDiagnostics:
      type: object
      properties:
        filterStages:
          type: array
          items:
            type: object
            properties:
              stage:
                type: string
              beforeCount:
                type: integer
              afterCount:
                type: integer
              droppedProviders:
                type: array
                items:
                  type: object
                  properties:
                    providerId:
                      type: string
                      nullable: true
                    reason:
                      type: string
                      nullable: true
                  additionalProperties: true
            additionalProperties: true
      additionalProperties: true
    ErrorProviderCandidateDiagnostics:
      type: object
      properties:
        totalProviders:
          type: integer
        supportsEndpointCount:
          type: integer
        candidateCount:
          type: integer
        droppedUnsupportedEndpoint:
          type: array
          items:
            type: string
        droppedMissingAdapter:
          type: array
          items:
            type: object
            properties:
              providerId:
                type: string
                nullable: true
              endpoint:
                type: string
                nullable: true
            additionalProperties: true
      additionalProperties: true
    ErrorProviderEnablementDiagnostics:
      type: object
      properties:
        capability:
          type: string
        providersBefore:
          type: array
          items:
            type: string
        providersAfter:
          type: array
          items:
            type: string
        dropped:
          type: array
          items:
            type: object
            properties:
              providerId:
                type: string
                nullable: true
              reason:
                type: string
                nullable: true
            additionalProperties: true
      additionalProperties: true
    ApiKeyScopeValue:
      oneOf:
        - type: string
          example: '["chat.completions","responses"]'
        - type: array
          items:
            type: string
          example:
            - chat.completions
            - responses
    ApiKeyLimitWindows:
      type: object
      required:
        - daily
        - weekly
        - monthly
      properties:
        daily:
          $ref: '#/components/schemas/ApiKeyLimitBucket'
        weekly:
          $ref: '#/components/schemas/ApiKeyLimitBucket'
        monthly:
          $ref: '#/components/schemas/ApiKeyLimitBucket'
      additionalProperties: false
    ApiKeyUsageWindows:
      type: object
      required:
        - total
        - daily
        - weekly
        - monthly
      properties:
        total:
          $ref: '#/components/schemas/ApiKeyUsageBucket'
        daily:
          $ref: '#/components/schemas/ApiKeyUsageBucket'
        weekly:
          $ref: '#/components/schemas/ApiKeyUsageBucket'
        monthly:
          $ref: '#/components/schemas/ApiKeyUsageBucket'
      additionalProperties: false
    ApiKeyLimitBucket:
      type: object
      required:
        - requests
        - cost
      properties:
        requests:
          type: integer
          nullable: true
          minimum: 0
        cost:
          type: number
          nullable: true
          minimum: 0
          description: USD में खर्च सीमा।
      additionalProperties: false
    ApiKeyUsageBucket:
      type: object
      required:
        - requests
        - cost
      properties:
        requests:
          type: integer
          minimum: 0
        cost:
          type: number
          minimum: 0
          description: USD में खर्च।
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer टोकन से प्रमाणीकरण

````

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