Eden AI User Management API

Create, list, update, rotate and delete custom API tokens, including sandbox tokens, and introspect the calling key. 8 operations. Eden AI documents v2 as supported for token management through end of 2026.

Operations 8

GET /user/custom_token/ List Tokens #
POST /user/custom_token/ Create new Token #
GET /user/custom_token/{name}/ Retrieve Token #
PATCH /user/custom_token/{name}/ Update Token #
DELETE /user/custom_token/{name}/ Delete Token #
POST /user/custom_token/{name}/rotate/ Rotate a Token's secret #
POST /user/custom_token/legacy/{legacy_type}/regenerate/ Regenerate a legacy primary/sandbox key #
GET /user/custom_token/me/ Inspect the calling API key #

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-user-management-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. 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-openapi.json Raw ↑
{
    "openapi": "3.0.3",
    "info": {
        "title": "User Management",
        "version": "2.0",
        "description": "Your project description"
    },
    "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),\nbrand-new ``sk-eden`` value. The old value stops working immediately; the new\none is returned exactly once. Operates on real ``Token`` rows only — a legacy\nprimary/sandbox key (a JWT in a ``User`` column) is regenerated via\nMigrateLegacyKey instead. Mutating, so the session access token is required —\nno 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,\nnot a ``Token`` row — as a real hashed ``sk-eden`` custom key.\n\nNulls the ``User`` column, which revokes the old JWT immediately in BOTH\nservices (edenai-back matches the column in ``auth.py``; aifeatures re-checks\nit against the column on every request), and mints a new key returned exactly\nonce. The new key's name defaults to \"Production\"/\"Sandbox\" (auto-suffixed to\n\"Production 2\" etc. if that name is already taken) and may be overridden in the\nbody. Session-only and NOT quota-gated — migrating an existing key is never\nblocked, even at the custom-key cap. The old key can't authorize its own\nreplacement.",
                "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\nlabel, masking, budget and remaining balance. The introspection counterpart\nto OpenRouter's ``GET /key``: authenticated BY the key itself (FeatureAuth),\nnever by a session, and it can only ever see its own row. Key management\n(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": {
            "BalanceResetPeriodEnum": {
                "enum": [
                    "none",
                    "daily",
                    "weekly",
                    "monthly"
                ],
                "type": "string",
                "description": "* `none` - None\n* `daily` - Daily\n* `weekly` - Weekly\n* `monthly` - Monthly"
            },
            "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",
                        "format": "double",
                        "maximum": 100000,
                        "minimum": -100000,
                        "exclusiveMaximum": true,
                        "exclusiveMinimum": true,
                        "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": "number",
                        "format": "double",
                        "maximum": 100000,
                        "minimum": -100000,
                        "exclusiveMaximum": true,
                        "exclusiveMinimum": true,
                        "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).\n\n* `none` - None\n* `daily` - Daily\n* `weekly` - Weekly\n* `monthly` - Monthly"
                    }
                },
                "required": [
                    "name",
                    "token_type"
                ]
            },
            "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).\n\n* `none` - None\n* `daily` - Daily\n* `weekly` - Weekly\n* `monthly` - Monthly"
                    }
                },
                "required": [
                    "name"
                ]
            },
            "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).\n\n* `none` - None\n* `daily` - Daily\n* `weekly` - Weekly\n* `monthly` - Monthly"
                    }
                },
                "required": [
                    "name"
                ]
            },
            "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\nlegacy-JWT vs hash-row duality so every surface (API, admin, shell) masks\nthe same way. Falls back to the last 4 of a legacy row's stored token.",
                        "readOnly": true
                    },
                    "key_prefix": {
                        "type": "string",
                        "nullable": true,
                        "maxLength": 32
                    },
                    "last4": {
                        "type": "string",
                        "nullable": true,
                        "maxLength": 4
                    },
                    "revoked": {
                        "type": "boolean",
                        "readOnly": true
                    },
                    "token_type": {
                        "$ref": "#/components/schemas/TokenTypeEnum"
                    },
                    "balance": {
                        "type": "number",
                        "format": "double",
                        "maximum": 100000,
                        "minimum": -100000,
                        "exclusiveMaximum": true,
                        "exclusiveMinimum": true,
                        "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"
                    },
                    "active_balance": {
                        "type": "boolean",
                        "description": "Weither to use the balance field or not."
                    },
                    "expire_time": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    },
                    "balance_reset_amount": {
                        "type": "number",
                        "format": "double",
                        "maximum": 100000,
                        "minimum": -100000,
                        "exclusiveMaximum": true,
                        "exclusiveMinimum": true,
                        "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).\n\n* `none` - None\n* `daily` - Daily\n* `weekly` - Weekly\n* `monthly` - Monthly"
                    },
                    "legacy": {
                        "type": "boolean",
                        "readOnly": true
                    },
                    "synthesized": {
                        "type": "boolean",
                        "readOnly": true
                    }
                },
                "required": [
                    "label",
                    "legacy",
                    "masked",
                    "name",
                    "revoked",
                    "synthesized"
                ]
            },
            "PatchedCustomTokenUpdateRequest": {
                "type": "object",
                "properties": {
                    "balance": {
                        "type": "number",
                        "format": "double",
                        "maximum": 100000,
                        "minimum": -100000,
                        "exclusiveMaximum": true,
                        "exclusiveMinimum": true,
                        "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": "number",
                        "format": "double",
                        "maximum": 100000,
                        "minimum": -100000,
                        "exclusiveMaximum": true,
                        "exclusiveMinimum": true,
                        "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).\n\n* `none` - None\n* `daily` - Daily\n* `weekly` - Weekly\n* `monthly` - Monthly"
                    }
                }
            },
            "TokenTypeEnum": {
                "enum": [
                    "sandbox_api_token",
                    "api_token"
                ],
                "type": "string",
                "description": "* `sandbox_api_token` - Sandbox\n* `api_token` - Back"
            }
        },
        "securitySchemes": {
            "FeatureApiAuth": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "JWT"
            }
        }
    },
    "servers": [
        {
            "url": "https://api.edenai.run/v2"
        }
    ]
}