> ## 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.

# Generate PQC Keys

> Generate public and private keys for post-quantum cryptography

## Generate Post-Quantum Cryptographic Keys

This endpoint allows you to generate a public and private key pair for post-quantum cryptographic schemes like Kyber, ML-KEM, etc.

### Request Body

You must specify the cryptographic scheme and language to use.

```json theme={null}
{
  "language": "python",
  "cryptographic_scheme": "kyber"
}
```


## OpenAPI

````yaml POST /api/post-quantum/key/generate
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/post-quantum/key/generate:
    post:
      tags:
        - PQC
      summary: Generate PQC Keys
      description: Generate public and private keys for post-quantum cryptography
      operationId: generatePQCKeys
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EncryptionConfig'
      responses:
        '201':
          description: Returns generated public and private keys
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyPair'
        '400':
          description: Invalid input data
        '422':
          description: Invalid input data
        '500':
          description: Internal server error
      security:
        - bearerAuth: []
components:
  schemas:
    EncryptionConfig:
      type: object
      required:
        - language
        - cryptographic_scheme
      properties:
        language:
          type: string
          enum:
            - python
        cryptographic_scheme:
          type: string
          enum:
            - kyber
            - mlkem
    KeyPair:
      type: object
      properties:
        public_key:
          type: string
          format: byte
        private_key:
          type: string
          format: byte
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````