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

# Post managekeys

> ``GET /v3/manage/keys`` (list, ``manage:read``) and ``POST /v3/manage/keys`` (mint an inference
key, ``manage:write``). Org-scoped through ``principals_in_org``. Balance is pending-adjusted per
page on the list; the created secret is returned ONCE in the 201 and never by a read.



## OpenAPI

````yaml https://api.edenai.run/v2/info/splitted-schema/management_api/openapi.json post /manage/keys/
openapi: 3.0.3
info:
  title: Organization Management
  version: '2.0'
  description: Your project description
servers:
  - url: https://api.edenai.run/v3
security: []
paths:
  /manage/keys/:
    post:
      tags:
        - keys
      description: >-
        ``GET /v3/manage/keys`` (list, ``manage:read``) and ``POST
        /v3/manage/keys`` (mint an inference

        key, ``manage:write``). Org-scoped through ``principals_in_org``.
        Balance is pending-adjusted per

        page on the list; the created secret is returned ONCE in the 201 and
        never by a read.
      operationId: manage_keys_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ManagementKeyRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ManagementKeyRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ManagementKeyRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementKey'
          description: ''
components:
  schemas:
    ManagementKeyRequest:
      type: object
      description: >-
        An org's inference key as the management plane exposes it. Never the
        secret or

        its hash — only non-secret metadata, addressed by the stable ``key_id``
        (``id``).


        ``balance`` is the pending-adjusted LIVE sub-limit, not the raw settled
        column.

        For a credit-ledger-enrolled org the stored ``Token.balance`` lags by
        whatever the

        batched rollup has not settled, so a management admin must be shown
        available, not

        settled (the shipped display-vs-accounting doctrine, mirrored from

        ``utils/check_credits.py`` and ``manage_user_account_serializers``). The
        un-settled

        deltas (≤ 0, so they ADD) are batch-fetched once per page by the view
        and passed in

        ``context["pending"]``; a non-ledger org simply has none, so the add is
        a no-op.


        ``id`` is null for an un-migrated legacy key (one still stored as a JWT,
        no

        ``key_id`` yet); such a key is listed but not addressable via
        ``/keys/{id}`` until

        it is regenerated onto the hashed scheme.
      properties:
        name:
          type: string
          minLength: 1
          description: The token name
          maxLength: 200
        token_type:
          $ref: '#/components/schemas/TokenTypeEnum'
        active_balance:
          type: boolean
          description: Weither to use the balance field or not.
        expire_time:
          type: string
          format: date-time
          nullable: true
        revoked_at:
          type: string
          format: date-time
          nullable: true
      required:
        - name
    ManagementKey:
      type: object
      description: >-
        An org's inference key as the management plane exposes it. Never the
        secret or

        its hash — only non-secret metadata, addressed by the stable ``key_id``
        (``id``).


        ``balance`` is the pending-adjusted LIVE sub-limit, not the raw settled
        column.

        For a credit-ledger-enrolled org the stored ``Token.balance`` lags by
        whatever the

        batched rollup has not settled, so a management admin must be shown
        available, not

        settled (the shipped display-vs-accounting doctrine, mirrored from

        ``utils/check_credits.py`` and ``manage_user_account_serializers``). The
        un-settled

        deltas (≤ 0, so they ADD) are batch-fetched once per page by the view
        and passed in

        ``context["pending"]``; a non-ledger org simply has none, so the add is
        a no-op.


        ``id`` is null for an un-migrated legacy key (one still stored as a JWT,
        no

        ``key_id`` yet); such a key is listed but not addressable via
        ``/keys/{id}`` until

        it is regenerated onto the hashed scheme.
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          description: The token name
          maxLength: 200
        token_type:
          $ref: '#/components/schemas/TokenTypeEnum'
        member:
          type: string
          format: email
          readOnly: true
        masked:
          type: string
          readOnly: true
        active_balance:
          type: boolean
          description: Weither to use the balance field or not.
        balance:
          type: string
          readOnly: true
        expire_time:
          type: string
          format: date-time
          nullable: true
        revoked:
          type: boolean
          readOnly: true
        revoked_at:
          type: string
          format: date-time
          nullable: true
      required:
        - balance
        - id
        - masked
        - member
        - name
        - revoked
    TokenTypeEnum:
      enum:
        - sandbox_api_token
        - api_token
      type: string
      description: |-
        * `sandbox_api_token` - Sandbox
        * `api_token` - Back

````