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

# Создать ключ

> Создаёт новый ключ



## OpenAPI

````yaml https://service-docs.qudata.ai/api/openapi.en.json post /v0/secrets
openapi: 3.1.0
info:
  title: QuData Public API
  version: v0
servers:
  - url: https://api.qudata.ai
security: []
paths:
  /v0/secrets:
    post:
      tags:
        - secrets
      summary: Создать ключ
      description: Создаёт новый ключ
      operationId: create_secret_v0_secrets_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSecret'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OkResponse_SecretResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - AuthApiKey: []
components:
  schemas:
    CreateSecret:
      properties:
        secret_type:
          $ref: '#/components/schemas/SecretType'
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        value:
          type: string
          title: Value
      type: object
      required:
        - secret_type
        - value
      title: CreateSecret
    OkResponse_SecretResponse_:
      properties:
        ok:
          type: boolean
          title: Ok
          default: true
        data:
          anyOf:
            - $ref: '#/components/schemas/SecretResponse'
            - type: 'null'
      type: object
      title: OkResponse[SecretResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SecretType:
      type: string
      enum:
        - ssh
      title: SecretType
    SecretResponse:
      properties:
        id:
          type: string
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        user_id:
          type: string
          title: User Id
        secret_type:
          $ref: '#/components/schemas/SecretType'
          default: ssh
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        value:
          type: string
          title: Value
        renter_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Renter Id
      type: object
      required:
        - id
        - user_id
        - name
        - value
      title: SecretResponse
    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:
    AuthApiKey:
      type: apiKey
      in: header
      name: X-Api-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.