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

# Create Token

> Reference for merged 0.6.0 source. The latest verified binary release is 0.5.5; use your Engine’s /api/openapi.json for its installed contract.



## OpenAPI

````yaml /engine/openapi.json post /api/tokens
openapi: 3.1.0
info:
  title: nerditd
  version: 0.6.0
  description: >-
    Current source interface (0.6.0); verify your installed Engine version. This
    is not a claim that 0.6.0 is released.
servers:
  - url: http://127.0.0.1:9321
    description: Default local Engine; use your configured endpoint.
security: []
paths:
  /api/tokens:
    post:
      tags:
        - Tokens
      summary: Create Token
      description: >-
        Reference for merged 0.6.0 source. The latest verified binary release is
        0.5.5; use your Engine’s /api/openapi.json for its installed contract.
      operationId: create_token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenCreateRequest'
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenCreateResponse'
          description: HTTP 201 response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: HTTP 422 response
components:
  schemas:
    TokenCreateRequest:
      properties:
        name:
          type: string
          title: Name
        role:
          $ref: '#/components/schemas/TokenRole'
          default: submitter
        max_gpus:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Max Gpus
        max_concurrent_jobs:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Max Concurrent Jobs
        expires_in_s:
          anyOf:
            - type: integer
              maximum: 31536000
              minimum: 60
            - type: 'null'
          title: Expires In S
        scope_services:
          anyOf:
            - items:
                type: string
              type: array
              maxItems: 32
            - type: 'null'
          title: Scope Services
      additionalProperties: false
      type: object
      required:
        - name
      title: TokenCreateRequest
    TokenCreateResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        role:
          $ref: '#/components/schemas/TokenRole'
        max_gpus:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Gpus
        max_concurrent_jobs:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Concurrent Jobs
        created_at:
          type: string
          format: date-time
          title: Created At
        last_used_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Used At
        revoked:
          type: boolean
          title: Revoked
          default: false
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
        scope_services:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Scope Services
        token:
          type: string
          title: Token
      type: object
      required:
        - id
        - name
        - role
        - created_at
        - token
      title: TokenCreateResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TokenRole:
      type: string
      enum:
        - admin
        - submitter
        - readonly
      title: TokenRole
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````