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

# Create Api Key

> Create a new API key for the current user.

The raw key is returned ONCE in the response. It cannot be retrieved again.



## OpenAPI

````yaml /openapi.json post /v1/users/me/api-keys
openapi: 3.1.0
info:
  title: Universal Document AI API
  description: AI-powered document editing with multi-tenant organization support
  version: 2.0.0
servers: []
security: []
paths:
  /v1/users/me/api-keys:
    post:
      tags:
        - users
      summary: Create Api Key
      description: >-
        Create a new API key for the current user.


        The raw key is returned ONCE in the response. It cannot be retrieved
        again.
      operationId: create_api_key_v1_users_me_api_keys_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateApiKeyRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateApiKeyResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    CreateApiKeyRequest:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
          description: A label for this key (e.g., 'My App', 'CI Pipeline').
      type: object
      required:
        - name
      title: CreateApiKeyRequest
      description: Create a new API key.
    CreateApiKeyResponse:
      properties:
        id:
          type: string
          title: Id
          description: Key identifier (UUID). Use this to revoke the key later.
        name:
          type: string
          title: Name
          description: Label you assigned to this key.
        key:
          type: string
          title: Key
          description: >-
            The full API key (sk_... format). Copy this now — it cannot be
            retrieved again.
        key_prefix:
          type: string
          title: Key Prefix
          description: First 7 characters of the key (e.g., 'sk_a1b2') for identification.
        created_at:
          type: string
          title: Created At
          description: ISO 8601 timestamp when the key was created.
      type: object
      required:
        - id
        - name
        - key
        - key_prefix
        - created_at
      title: CreateApiKeyResponse
      description: >-
        Newly created API key. The raw key is shown only once — save it
        immediately.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````