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

# Create Token

> Generate a new token by providing a username and password

## Create Token

This endpoint generates a new token by providing your username and password.

### Request Body

You must provide your username and password to obtain the token.

```json theme={null}
{
  "username": "string",
  "password": "string"
}
```


## OpenAPI

````yaml POST /api/token/
openapi: 3.0.1
info:
  title: Post-Quantum Cryptography API
  description: >-
    API for post-quantum cryptographic operations, including key generation and
    encryption
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: http://localhost:8000
security:
  - bearerAuth: []
paths:
  /api/token/:
    post:
      tags:
        - Authentication
      summary: Create token
      description: Generate a new token by providing a username and password
      operationId: createToken
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                password:
                  type: string
                  format: password
              required:
                - username
                - password
      responses:
        '200':
          description: Token generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  access:
                    type: string
                  refresh:
                    type: string
        '400':
          description: Invalid credentials or input
        '500':
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````