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

# Create new Token



## OpenAPI

````yaml https://api.edenai.run/v2/info/splitted-schema/user/openapi.json post /user/custom_token/
openapi: 3.0.3
info:
  title: User Management
  version: '2.0'
  description: Your project description
servers:
  - url: https://api.edenai.run/v2
security: []
paths:
  /user/custom_token/:
    post:
      tags:
        - User Management
      summary: Create new Token
      operationId: user_root_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomTokensCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomTokensCreate'
          description: ''
components:
  schemas:
    CustomTokensCreateRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          description: The token name
          maxLength: 200
        token_type:
          $ref: '#/components/schemas/TokenTypeEnum'
        balance:
          type: string
          format: decimal
          pattern: ^-?\d{0,5}(?:\.\d{0,9})?$
          nullable: true
          description: >-
            Optional remaining credits balance for this Token, if
            `active_balance` is set to True and the balance reaches 0, this
            token will become unusable
        expire_time:
          type: string
          format: date-time
          nullable: true
        active_balance:
          type: boolean
          description: Weither to use the balance field or not.
        balance_reset_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,5}(?:\.\d{0,9})?$
          nullable: true
          description: >-
            The amount this token's balance is reset to at the start of each
            balance_reset_period. Null when balance_reset_period is 'none'.
        balance_reset_period:
          allOf:
            - $ref: '#/components/schemas/BalanceResetPeriodEnum'
          description: >-
            How often this token's balance is reinitialized to
            balance_reset_amount. 'none' = one-time balance (default, current
            behaviour).


            * `none` - None

            * `daily` - Daily

            * `weekly` - Weekly

            * `monthly` - Monthly
      required:
        - name
    CustomTokensCreate:
      type: object
      properties:
        name:
          type: string
          description: The token name
          maxLength: 200
        token_type:
          $ref: '#/components/schemas/TokenTypeEnum'
        balance:
          type: string
          format: decimal
          pattern: ^-?\d{0,5}(?:\.\d{0,9})?$
          nullable: true
          description: >-
            Optional remaining credits balance for this Token, if
            `active_balance` is set to True and the balance reaches 0, this
            token will become unusable
        expire_time:
          type: string
          format: date-time
          nullable: true
        active_balance:
          type: boolean
          description: Weither to use the balance field or not.
        balance_reset_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,5}(?:\.\d{0,9})?$
          nullable: true
          description: >-
            The amount this token's balance is reset to at the start of each
            balance_reset_period. Null when balance_reset_period is 'none'.
        balance_reset_period:
          allOf:
            - $ref: '#/components/schemas/BalanceResetPeriodEnum'
          description: >-
            How often this token's balance is reinitialized to
            balance_reset_amount. 'none' = one-time balance (default, current
            behaviour).


            * `none` - None

            * `daily` - Daily

            * `weekly` - Weekly

            * `monthly` - Monthly
      required:
        - name
    TokenTypeEnum:
      enum:
        - sandbox_api_token
        - api_token
      type: string
      description: |-
        * `sandbox_api_token` - Sandbox
        * `api_token` - Back
    BalanceResetPeriodEnum:
      enum:
        - none
        - daily
        - weekly
        - monthly
      type: string
      description: |-
        * `none` - None
        * `daily` - Daily
        * `weekly` - Weekly
        * `monthly` - Monthly

````