All API endpoints use the prefix
https://api.tennda.ai. Use HTTPS in production to protect authentication tokens; HTTP is recommended for development only.A complete management system for user API tokens, supporting create, update, delete, batch operations, and quota & permission control.Note: API keys are tokens you generate under Personal Center → Access Tokens for accessing
/api routes.User Authentication
The following endpoints require user login authentication. IncludeAuthorization in the request headers.
string
required
User login token, format:
Bearer your_user_tokenCommon Response Structure
All endpoints return a unified JSON envelope:Token Object Fields
Token objects returned by list, search, detail, and update endpoints include the following fields (key is masked in list/detail/update responses):
List All Tokens
- HTTP Method: GET
- Path:
/api/token/ - Description: Paginated list of all tokens for the current user
integer
default:"1"
Page number
integer
default:"20"
Page size
Search Tokens
- HTTP Method: GET
- Path:
/api/token/search - Description: Search the user’s tokens by keyword and token value
string
Search keyword; matches token name
string
Token value search; supports partial match (
sk- prefix optional); supports % wildcards, up to 2integer
default:"1"
Page number
integer
default:"20"
Page size; max 100
Get Single Token
- HTTP Method: GET
- Path:
/api/token/:id - Description: Get detailed information for a specific token
integer
required
Token ID
Create Token
- HTTP Method: POST
- Path:
/api/token/ - Description: Create a new API token; batch creation is supported
string
required
Token name; max length 30 characters
integer
Expiration timestamp; -1 means never expires
integer
Remaining quota
boolean
Whether quota is unlimited
boolean
Whether model limits are enabled
array
Allowed model list
string
Allowed IP addresses, comma-separated
string
Billing group
On success, the response body does not include a
data field and does not return the full key. Use Get Token Key to retrieve the full key when needed.Update Token
- HTTP Method: PUT
- Path:
/api/token/ - Description: Update token configuration; supports status-only updates and full updates
integer
required
Token ID
boolean
Whether to update status only
Delete Token
- HTTP Method: DELETE
- Path:
/api/token/:id - Description: Delete a specific token
integer
required
Token ID
Batch Delete Tokens
- HTTP Method: POST
- Path:
/api/token/batch - Description: Batch delete multiple tokens
array
required
List of Token IDs to delete; required and must not be empty
Get Token Key
- HTTP Method: POST
- Path:
/api/token/:id/key - Description: On-demand retrieval of the full (unmasked) key for a specific token; rate-limited
integer
required
Token ID
This endpoint returns the full key. Store it securely and avoid displaying it in plaintext in logs or frontend pages.
Batch Get Token Keys
- HTTP Method: POST
- Path:
/api/token/batch/keys - Description: Batch retrieve full keys for multiple tokens; max 100 per request
array
required
List of Token IDs to retrieve keys for; required and must not be empty; max 100
