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

# Create an Admin API key with a subset of your permissions (`value` is returned once)



## OpenAPI

````yaml https://api.antarah.dev/openapi.json post /v1/organization/admin_api_keys
openapi: 3.1.0
info:
  title: Antara API
  version: 1.0.0
  description: OpenAI- and Anthropic-compatible inference plus organization management.
servers:
  - url: https://api.antarah.dev
security: []
paths:
  /v1/organization/admin_api_keys:
    post:
      summary: >-
        Create an Admin API key with a subset of your permissions (`value` is
        returned once)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAdminApiKey'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminApiKeyWithValue'
        '403':
          description: '`permission_denied`'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        default:
          description: RFC 9457 problem details
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - adminKey: []
        - session: []
components:
  schemas:
    CreateAdminApiKey:
      type: object
      properties:
        name:
          type: string
          maxLength: 120
          description: 1–120 Unicode code points, trimmed
        permissions:
          type: array
          items:
            type: string
            enum:
              - organization:read
              - projects:read
              - projects:create
              - project_api_keys:read
              - project_api_keys:create
              - project_api_keys:revoke
              - admin_api_keys:read
              - admin_api_keys:create
              - admin_api_keys:revoke
              - billing:read
              - spend_limits:read
              - spend_limits:write
              - policies:read
              - policies:write
          minItems: 1
          maxItems: 20
          description: A subset of the caller's own permissions (02 §6)
        expires_at:
          type: string
          format: date-time
          description: RFC 3339, in the future. Omit for a key that never expires
      required:
        - name
        - permissions
      additionalProperties: false
    AdminApiKeyWithValue:
      allOf:
        - $ref: '#/components/schemas/AdminApiKey'
        - type: object
          properties:
            value:
              type: string
              description: '`ak_admin_` + 43 base64url chars. Returned only by create'
              example: ak_admin_Jd3…x9Qe
          required:
            - value
    Problem:
      type: object
      properties:
        type:
          type: string
        title:
          type: string
        status:
          type: integer
        detail:
          type:
            - string
            - 'null'
        instance:
          type: string
        code:
          type: string
        request_id:
          type: string
        param:
          type:
            - string
            - 'null'
        errors:
          type: array
          items:
            type: object
            properties:
              pointer:
                type: string
              detail:
                type: string
            required:
              - pointer
              - detail
      required:
        - type
        - title
        - status
        - detail
        - instance
        - code
        - request_id
        - param
    AdminApiKey:
      type: object
      properties:
        id:
          type: string
          pattern: ^key_[0-9a-f]{32}$
          example: key_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f
        object:
          type: string
          enum:
            - organization.admin_api_key
        name:
          type: string
        redacted_value:
          type: string
          description: Prefix + `…` + last 4
          example: ak_admin_…x9Qe
        owner:
          type: object
          properties:
            type:
              type: string
              enum:
                - organization
            id:
              type: string
              pattern: ^org_[0-9a-f]{32}$
              example: org_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f
          required:
            - type
            - id
        status:
          type: string
          enum:
            - active
            - revoked
            - expired
            - suspended
        permissions:
          type: array
          items:
            type: string
            enum:
              - organization:read
              - projects:read
              - projects:create
              - project_api_keys:read
              - project_api_keys:create
              - project_api_keys:revoke
              - admin_api_keys:read
              - admin_api_keys:create
              - admin_api_keys:revoke
              - billing:read
              - spend_limits:read
              - spend_limits:write
              - policies:read
              - policies:write
        created_at:
          type: integer
          description: Unix seconds
          example: 1793750400
        last_used_at:
          type:
            - integer
            - 'null'
          description: Unix seconds
          example: 1793750400
        expires_at:
          type:
            - integer
            - 'null'
          description: Unix seconds
          example: 1793750400
      required:
        - id
        - object
        - name
        - redacted_value
        - owner
        - status
        - permissions
        - created_at
        - last_used_at
        - expires_at
  securitySchemes:
    adminKey:
      type: http
      scheme: bearer
      description: '`ak_admin_…` Admin API key'
    session:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Supabase access token + `Antara-Organization` (management) or
        `Antara-Project` (inference)

````

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