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

# Create API Key



## OpenAPI

````yaml https://api.mynth.io/openapi.json post /api-key
openapi: 3.1.0
info:
  title: Mynth
  description: Mynth API
  version: 1.0.0
servers: []
security: []
paths:
  /api-key:
    post:
      tags:
        - API Keys
      summary: Create API Key
      operationId: postApiKey
      responses:
        '201':
          description: API key created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      apiKey:
                        type: object
                        properties:
                          id:
                            type: string
                          keyPreview:
                            type: string
                          spendingLimitPeriod:
                            anyOf:
                              - const: day
                              - const: month
                              - const: week
                              - type: 'null'
                          userId:
                            type: string
                          name:
                            type: string
                          spendingLimit:
                            type: string
                        required:
                          - id
                          - keyPreview
                          - spendingLimitPeriod
                          - userId
                      raw:
                        type: string
                    required:
                      - apiKey
                      - raw
                required:
                  - data
      security:
        - oauthAuth: []
components:
  securitySchemes:
    oauthAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'OAuth access token sent as `Authorization: Bearer <access-token>`.'

````