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

# Create an API key



## OpenAPI

````yaml /api/openapi.json post /auth/keys
openapi: 3.1.0
info:
  title: Radion REST API
  description: Official REST API for Radion prediction market intelligence layer.
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://api.radion.app
    description: Production
security:
  - {}
  - ApiKey: []
tags:
  - name: Health
    description: Check whether the REST API is up and running.
  - name: Authentication
    description: Inspect the currently authenticated API key.
  - name: Events
    description: Events metadata.
  - name: Markets
    description: Markets metadata.
  - name: Orderbook
    description: CLOB orderbook midpoint passthrough.
  - name: Search
    description: Fuzzy search across markets, topics, and profiles.
  - name: Stats
    description: Public platform stats and indexer backfill progress.
paths:
  /auth/keys:
    post:
      tags:
        - Authentication
      summary: Create an API key
      operationId: create_api_key
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateKeyRequest'
        required: true
      responses:
        '201':
          description: API key created. The raw key is shown once.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateKeyData'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '409':
          $ref: '#/components/responses/ConflictResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
      security:
        - ClerkBearer: []
components:
  schemas:
    CreateKeyRequest:
      type: object
      required:
        - keyLabel
      properties:
        audience:
          type:
            - string
            - 'null'
        issuer:
          type:
            - string
            - 'null'
        jwksUrl:
          type:
            - string
            - 'null'
        keyLabel:
          type: string
          example: production_read
        keyType:
          $ref: '#/components/schemas/KeyType'
        perSessionLimit:
          type:
            - integer
            - 'null'
          format: int32
        publicKeyPem:
          type:
            - string
            - 'null'
    CreateKeyData:
      type: object
      required:
        - keyLabel
        - rawKey
      properties:
        keyLabel:
          type: string
        rawKey:
          type: string
    KeyType:
      type: string
      enum:
        - secret
        - public_jwt
    ErrorResponse:
      type: object
      required:
        - type
        - status
        - title
        - detail
        - requestId
      properties:
        detail:
          type: string
          example: Resource not found
        requestId:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        status:
          type: integer
          format: int32
          example: 404
          minimum: 0
        title:
          type: string
          example: Not Found
        type:
          type: string
          example: about:blank
  responses:
    UnauthorizedResponse:
      description: Missing or invalid API key.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            detail: Invalid API key
            requestId: 550e8400-e29b-41d4-a716-446655440000
            status: 401
            title: Unauthorized
            type: about:blank
    ForbiddenResponse:
      description: Access denied.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            detail: Access denied
            requestId: 550e8400-e29b-41d4-a716-446655440000
            status: 403
            title: Forbidden
            type: about:blank
    ConflictResponse:
      description: Resource already exists.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            detail: Resource already exists
            requestId: 550e8400-e29b-41d4-a716-446655440000
            status: 409
            title: Conflict
            type: about:blank
    UnprocessableEntityResponse:
      description: Validation failed.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            detail: Validation failed
            requestId: 550e8400-e29b-41d4-a716-446655440000
            status: 422
            title: Unprocessable Entity
            type: about:blank
    InternalServerErrorResponse:
      description: Unexpected server error.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            detail: Unexpected error
            requestId: 550e8400-e29b-41d4-a716-446655440000
            status: 500
            title: Internal Server Error
            type: about:blank
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
    ClerkBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````