Eden AI User Management API

The User Management API from Eden AI — 5 operation(s) for user management.

GitHub OpenAPI
Business capability
Developer Identity & Credential Management BC-4270.40

Operations 8

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /user/custom_token/ List my custom API tokens · List Tokens #
Ask an LLM
“Which custom API tokens have I created?”
“Can I see all my token names and their balances?”
Tell an agent
List all my custom tokens.
Show every token I own.
POST /user/custom_token/ Create a custom API token · Create new Token #
Ask an LLM
“How do I create a custom API token with a daily reset balance?”
“Can I cap a new token's balance and set it to expire?”
Tell an agent
Create a token named {name}.
Create token {name} of type {token_type} with a {balance} balance.
GET /user/custom_token/{name}/ Get a custom API token · Retrieve Token #
Ask an LLM
“What balance and expiry does a specific token have?”
“Can I look up one custom token by name?”
Tell an agent
Get token {name}.
Show the details of custom token {name}.
PATCH /user/custom_token/{name}/ Update a custom API token · Update Token #
Ask an LLM
“Can I change the expiry time of an existing token?”
“Is it possible to turn on balance tracking for a token I already created?”
Tell an agent
Set the expiry of token {name} to {expire_time}.
Turn balance tracking on for token {name} with a {balance} balance.
DELETE /user/custom_token/{name}/ Delete a custom API token · Delete Token #
Ask an LLM
“How do I delete a custom API token I no longer use?”
“Can I remove a token by its name?”
Tell an agent destructive · confirm first
Delete token {name}.
Remove custom token {name} permanently.
POST /user/custom_token/{name}/rotate/ Rotate a custom token's secret · Rotate a Token's secret #
Ask an LLM
“How do I rotate a token's secret so the old one stops working?”
“Does rotating a token keep the same name and budget?”
Tell an agent destructive · confirm first
Rotate the secret of token {name}.
Rotate token {name} in place and return the new secret.
POST /user/custom_token/legacy/{legacy_type}/regenerate/ Regenerate a legacy JWT key · Regenerate a legacy primary/sandbox key #
Ask an LLM
“How do I turn my old JWT primary key into a real custom token?”
“Can I regenerate a sandbox legacy key as a new sk-eden token?”
Tell an agent destructive · confirm first
Regenerate the {legacy_type} legacy key as a new token.
Convert my old {legacy_type} JWT key into a real custom token.
GET /user/custom_token/me/ Inspect the API key I'm calling with · Inspect the calling API key #
Ask an LLM
“What label, budget and remaining balance does my own API key have?”
“Can I introspect the key used to authenticate this request?”
Tell an agent
Show info about the API key I'm calling with.
Inspect my own key's label, budget and remaining balance.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/eden-ai:eden-ai-user-management-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

eden-ai-user-management-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: User Management API
  version: '2.0'
  description: Your project description
servers:
- url: https://api.edenai.run/v2
tags:
- name: User Management
paths:
  /user/custom_token/:
    get:
      operationId: user_root_list
      summary: List Tokens
      tags:
      - User Management
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomTokensList'
          description: ''
    post:
      operationId: user_root_create
      summary: Create new Token
      tags:
      - User Management
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomTokensCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomTokensCreate'
          description: ''
  /user/custom_token/{name}/:
    get:
      operationId: user_root_retrieve
      summary: Retrieve Token
      parameters:
      - in: path
        name: name
        schema:
          type: string
        required: true
      tags:
      - User Management
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomTokensList'
          description: ''
    patch:
      operationId: user_root_partial_update
      summary: Update Token
      parameters:
      - in: path
        name: name
        schema:
          type: string
        required: true
      tags:
      - User Management
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedCustomTokenUpdateRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomTokenUpdate'
          description: ''
    delete:
      operationId: user_root_destroy
      summary: Delete Token
      parameters:
      - in: path
        name: name
        schema:
          type: string
        required: true
      tags:
      - User Management
      responses:
        '204':
          description: No response body
  /user/custom_token/{name}/rotate/:
    post:
      operationId: user_rotate_create
      description: 'Rotate a key''s secret in place: same key (name, id, budget, guardrail),

        brand-new ``sk-eden`` value. The old value stops working immediately; the new

        one is returned exactly once. Operates on real ``Token`` rows only — a legacy

        primary/sandbox key (a JWT in a ``User`` column) is regenerated via

        MigrateLegacyKey instead. Mutating, so the session access token is required —

        no API key can rotate itself or others.'
      summary: Rotate a Token's secret
      parameters:
      - in: path
        name: name
        schema:
          type: string
        required: true
      tags:
      - User Management
      responses:
        '200':
          description: No response body
  /user/custom_token/legacy/{legacy_type}/regenerate/:
    post:
      operationId: user_legacy_regenerate_create
      description: 'Regenerate a legacy primary/sandbox key — a JWT stored in a ``User`` column,

        not a ``Token`` row — as a real hashed ``sk-eden`` custom key.


        Nulls the ``User`` column, which revokes the old JWT immediately in BOTH

        services (edenai-back matches the column in ``auth.py``; aifeatures re-checks

        it against the column on every request), and mints a new key returned exactly

        once. The new key''s name defaults to "Production"/"Sandbox" (auto-suffixed to

        "Production 2" etc. if that name is already taken) and may be overridden in the

        body. Session-only and NOT quota-gated — migrating an existing key is never

        blocked, even at the custom-key cap. The old key can''t authorize its own

        replacement.'
      summary: Regenerate a legacy primary/sandbox key
      parameters:
      - in: path
        name: legacy_type
        schema:
          type: string
        required: true
      tags:
      - User Management
      responses:
        '200':
          description: No response body
  /user/custom_token/me/:
    get:
      operationId: user_me_retrieve
      description: 'Return info about the API key used to authenticate *this* request — its

        label, masking, budget and remaining balance. The introspection counterpart

        to OpenRouter''s ``GET /key``: authenticated BY the key itself (FeatureAuth),

        never by a session, and it can only ever see its own row. Key management

        (list/create/rotate/delete) lives on the session-only endpoints.'
      summary: Inspect the calling API key
      tags:
      - User Management
      security:
      - FeatureApiAuth: []
      responses:
        '200':
          description: No response body
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
          - 'null'
          format: decimal
          pattern: ^-?\d{0,5}(?:\.\d{0,9})?$
          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
          - 'null'
          format: date-time
        active_balance:
          type: boolean
          description: Weither to use the balance field or not.
        balance_reset_amount:
          type:
          - string
          - 'null'
          format: decimal
          pattern: ^-?\d{0,5}(?:\.\d{0,9})?$
          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
          - 'null'
          format: decimal
          pattern: ^-?\d{0,5}(?:\.\d{0,9})?$
          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
          - 'null'
          format: date-time
        active_balance:
          type: boolean
          description: Weither to use the balance field or not.
        balance_reset_amount:
          type:
          - string
          - 'null'
          format: decimal
          pattern: ^-?\d{0,5}(?:\.\d{0,9})?$
          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
    PatchedCustomTokenUpdateRequest:
      type: object
      properties:
        balance:
          type:
          - number
          - 'null'
          format: double
          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
          exclusiveMinimum: -100000
          exclusiveMaximum: 100000
        expire_time:
          type:
          - string
          - 'null'
          format: date-time
        active_balance:
          type: boolean
          description: Weither to use the balance field or not.
        balance_reset_amount:
          type:
          - number
          - 'null'
          format: double
          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'.
          exclusiveMinimum: -100000
          exclusiveMaximum: 100000
        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'
    TokenTypeEnum:
      enum:
      - sandbox_api_token
      - api_token
      type: string
      description: '* `sandbox_api_token` - Sandbox

        * `api_token` - Back'
    CustomTokensList:
      type: object
      properties:
        name:
          type: string
          description: The token name
          maxLength: 200
        label:
          type: string
          readOnly: true
        masked:
          type: string
          description: 'Non-secret display value, e.g. ``sk-eden-live…c5d6``. Owns the

            legacy-JWT vs hash-row duality so every surface (API, admin, shell) masks

            the same way. Falls back to the last 4 of a legacy row''s stored token.'
          readOnly: true
        key_prefix:
          type:
          - string
          - 'null'
          maxLength: 32
        last4:
          type:
          - string
          - 'null'
          maxLength: 4
        revoked:
          type: boolean
          readOnly: true
        token_type:
          $ref: '#/components/schemas/TokenTypeEnum'
        balance:
          type:
          - number
          - 'null'
          format: double
          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
          exclusiveMinimum: -100000
          exclusiveMaximum: 100000
        active_balance:
          type: boolean
          description: Weither to use the balance field or not.
        expire_time:
          type:
          - string
          - 'null'
          format: date-time
        balance_reset_amount:
          type:
          - number
          - 'null'
          format: double
          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'.
          exclusiveMinimum: -100000
          exclusiveMaximum: 100000
        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'
        legacy:
          type: boolean
          readOnly: true
        synthesized:
          type: boolean
          readOnly: true
      required:
      - label
      - legacy
      - masked
      - name
      - revoked
      - synthesized
    CustomTokenUpdate:
      type: object
      properties:
        name:
          type: string
          readOnly: true
          description: The token name
        token_type:
          allOf:
          - $ref: '#/components/schemas/TokenTypeEnum'
          readOnly: true
        balance:
          type:
          - number
          - 'null'
          format: double
          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
          exclusiveMinimum: -100000
          exclusiveMaximum: 100000
        expire_time:
          type:
          - string
          - 'null'
          format: date-time
        active_balance:
          type: boolean
          description: Weither to use the balance field or not.
        balance_reset_amount:
          type:
          - number
          - 'null'
          format: double
          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'.
          exclusiveMinimum: -100000
          exclusiveMaximum: 100000
        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
      - token_type
    BalanceResetPeriodEnum:
      enum:
      - none
      - daily
      - weekly
      - monthly
      type: string
      description: '* `none` - None

        * `daily` - Daily

        * `weekly` - Weekly

        * `monthly` - Monthly'
  securitySchemes:
    FeatureApiAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT