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

# Create API key

> Creates an API key for the owner after verified workspace activation. Otherwise returns 403 activation_required without creating a key. The key is returned once. Maximum 20 active API keys per owner. Amounts are integer micro-USD.



## OpenAPI

````yaml /openapi.json post /v1/manage/keys
openapi: 3.1.0
info:
  title: OmniRelay API
  version: 1.0.0
  description: >-
    OpenAI-compatible gateway for reviewed real text models. Access is
    workspace-specific; query your own model list for capabilities and customer
    prices.
servers:
  - url: https://api.omnirelay.ai
security:
  - bearerAuth: []
tags:
  - name: Service
  - name: Models
  - name: Chat
  - name: Management
  - name: Responses
  - name: Embeddings
  - name: Images
  - name: Videos
paths:
  /v1/manage/keys:
    post:
      tags:
        - Management
      summary: Create API key
      description: >-
        Creates an API key for the owner after verified workspace activation.
        Otherwise returns 403 activation_required without creating a key. The
        key is returned once. Maximum 20 active API keys per owner. Amounts are
        integer micro-USD.
      operationId: managementCreateApiKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ManagementKeyCreate'
            example:
              name: Acme production
              allowedModels:
                - gpt-6-luna
              budget: 50000000
              resetPeriod: monthly
      responses:
        '201':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementCreatedKey'
              example:
                id: example-key-id
                key: or-live-…
                expiresAt: null
        '400':
          description: Invalid JSON, input, tags, model rules, expiry or budget policy.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: unauthorized or management_key_required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            insufficient_scope, forbidden or activation_required: key creation
            requires verified workspace activation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: 'not_found: unknown route or key not owned by the caller.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: 'payload_too_large: HTTP body exceeds 16000 characters.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            rate_limited: 120 requests per management key per minute; additional
            owner limits may apply.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - managementAuth: []
components:
  schemas:
    ManagementKeyCreate:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 60
        memberName:
          type: string
          nullable: true
          maxLength: 80
        memberEmail:
          type: string
          nullable: true
          maxLength: 200
        expiresAt:
          type: integer
          nullable: true
          format: int64
          description: Future Unix timestamp in milliseconds; null clears expiry.
        defaultTags:
          type: object
          properties: {}
        allowedModels:
          type: array
          nullable: true
          minItems: 1
          maxItems: 50
          items:
            type: string
          description: >-
            Exact model IDs or provider/* rules; null allows all enabled
            workspace models. An empty array is invalid.
        budget:
          type: integer
          nullable: true
          minimum: 0
          maximum: 1000000000000
        remaining:
          type: integer
          nullable: true
          minimum: 0
          maximum: 1000000000000
        resetPeriod:
          type: string
          enum:
            - none
            - daily
            - weekly
            - monthly
      required:
        - name
    ManagementCreatedKey:
      type: object
      properties:
        id:
          type: string
        key:
          type: string
        expiresAt:
          type: integer
          nullable: true
      required:
        - id
        - key
    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: >-
                Short English description for logs and SDK exceptions. Its
                wording can change; branch on code.
            type:
              type: string
              example: not_found_error
              description: >-
                Error family by HTTP status: invalid_request_error,
                authentication_error, insufficient_quota, permission_error,
                not_found_error, conflict_error, rate_limit_error,
                service_unavailable or api_error.
            param:
              type: string
              maxLength: 200
              description: >-
                Rejected request field path when identifiable; never a parameter
                value. Responses uses native field names.
        request_id:
          type: string
          description: Present on chat completion, Responses and embeddings errors.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key created in the OmniRelay console. The owner can view it again
        in the console after confirming their identity.
    managementAuth:
      type: http
      scheme: bearer
      description: >-
        Management key created in the console. read scope reads; write scope
        also changes API keys. Inference API keys are not accepted.

````

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