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

# Validate API key

> This endpoint validates the API key provided in the header. If the request succeeds, the API key is valid. Rate limited to 1000 requests per minute.



## OpenAPI

````yaml get /api/v2/api-key/validate
openapi: 3.0.0
info:
  version: 1.0.0
  title: Octave API
  description: API for Octave workspace management and AI-powered content generation
servers:
  - url: https://app.octavehq.com
security:
  - ApiKeyAuth: []
paths:
  /api/v2/api-key/validate:
    get:
      tags:
        - API Key
      summary: Validate API key
      description: >-
        This endpoint validates the API key provided in the header. If the
        request succeeds, the API key is valid. Rate limited to 1000 requests
        per minute.
      operationId: validateApiKey
      responses:
        '200':
          description: API key is valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  status:
                    type: string
                    enum:
                      - ok
                    description: Status of the API key validation
                    example: ok
                  valid:
                    type: boolean
                    description: Whether the API key is valid
                    example: true
                  workspaceOId:
                    type: string
                    description: The unique identifier for the workspace
                    example: wks_abc123
                  workspaceName:
                    type: string
                    description: The name of the workspace
                    example: My Workspace
                  workspaceDomain:
                    type: string
                    nullable: true
                    description: The domain associated with the workspace
                    example: example.com
                  organizationOId:
                    type: string
                    description: The unique identifier for the organization
                    example: org_xyz789
                  organizationName:
                    type: string
                    description: The name of the organization
                    example: Acme Corp
                  organizationDomain:
                    type: string
                    description: The domain associated with the organization
                    example: acme.com
                  organizationSlug:
                    type: string
                    description: The URL-friendly slug for the organization
                    example: acme-corp
                  mcpUrl:
                    type: string
                    description: >-
                      The MCP server URL with encoded workspace context for
                      connecting AI tools
                    example: >-
                      https://mcp.octavehq.com/mcp?ctx=eyJvcmdhbml6YXRpb25fc2x1ZyI6ImFjbWUtY29ycCIsIndvcmtzcGFjZV9vX2lkIjoid2tzX2FiYzEyMyJ9
                  credits:
                    type: object
                    properties:
                      totalUsed:
                        type: number
                        description: Total credits used (quota + subscription credits)
                        example: 175
                      totalRemaining:
                        type: number
                        description: Total credits remaining (quota + subscription credits)
                        example: 425
                      totalMax:
                        type: number
                        description: >-
                          Total maximum credits available (quota + subscription
                          credits)
                        example: 575
                      quotaUsed:
                        type: number
                        description: Number of credits used in the current period
                        example: 150
                      quotaAvailable:
                        type: number
                        description: Number of credits available in the current period
                        example: 350
                      quotaMax:
                        type: number
                        description: Maximum credits allowed in the current period
                        example: 500
                      period:
                        type: string
                        description: >-
                          The tracking period for the credits (month, life,
                          etc.)
                        example: month
                      creditsUsed:
                        type: number
                        description: Credits used from subscription credit pool
                        example: 25
                      creditsAvailable:
                        type: number
                        description: Credits available from subscription credit pool
                        example: 75
                    required:
                      - totalUsed
                      - totalRemaining
                      - totalMax
                      - quotaUsed
                      - quotaAvailable
                      - quotaMax
                      - period
                      - creditsUsed
                      - creditsAvailable
                    description: Credit usage information for the API key
                required:
                  - _metadata
                  - status
                  - valid
                  - workspaceOId
                  - workspaceName
                  - workspaceDomain
                  - organizationOId
                  - organizationName
                  - organizationDomain
                  - organizationSlug
                  - mcpUrl
                  - credits
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  message:
                    type: string
                required:
                  - _metadata
                  - message
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  message:
                    type: string
                required:
                  - _metadata
                  - message
        '403':
          description: Forbidden - API key validation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  message:
                    type: string
                required:
                  - _metadata
                  - message
      deprecated: false
components:
  schemas:
    Metadata:
      type: object
      properties:
        usage:
          type: number
          default: 0
          example: 0
          description: API usage
        requestId:
          type: string
          example: requestId
          description: Request ID
        message:
          type: string
          example: message
          description: Message
        timestamp:
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: Timestamp
      required:
        - requestId
        - timestamp
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key

````