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

# Create a new API key



## OpenAPI

````yaml /openapi.json post /v1/keys/create
openapi: 3.1.0
info:
  title: urltodata.ai
  description: >-
    API for extracting transcripts, metadata, and structured data from YouTube,
    TikTok, Instagram, X (Twitter), Facebook, and the web.
  version: 0.1.0
servers:
  - url: https://api.urltodata.ai
    description: Production API
security:
  - bearerAuth: []
paths:
  /v1/keys/create:
    post:
      summary: Create a new API key
      operationId: createApiKey
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Custom key name
                scopes:
                  type: array
                  items:
                    type: string
                    enum:
                      - account:read
                      - usage:read
                      - content:run
                      - jobs:read
                      - crawl:run
                      - keys:read
                      - keys:write
                      - credits:purchase
                  minItems: 1
                  description: Optional API scopes for the new key. Omit for full access.
      responses:
        '201':
          description: API key created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyCreateResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          description: Maximum API keys reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - bearerAuth: []
components:
  schemas:
    ApiKeyCreateResponse:
      type: object
      properties:
        apiKey:
          type: string
        key:
          type: object
          properties:
            keyId:
              type: string
            name:
              type:
                - string
                - 'null'
            scopes:
              type: array
              items:
                type: string
                enum:
                  - account:read
                  - usage:read
                  - content:run
                  - jobs:read
                  - crawl:run
                  - keys:read
                  - keys:write
                  - credits:purchase
    ApiError:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        details:
          type: string
        documentationUrl:
          type: string
  responses:
    Unauthorized:
      description: Authentication required or invalid credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      x-default: your-api-key
      description: API key as Bearer token (e.g. Bearer mp_abc123_secret)

````