Models List

Get a list of all AI models accessible to the current user, including model IDs, names, providers, and detailed information.

About Models List and Token Groups

The models returned in the list depend on the token group that your API KEY belongs to. You can select the token group when creating or editing tokens in Console → API Tokens.

Endpoint

GET https://aiberm.com/v1/models

Request Example

1curl -X GET "https://aiberm.com/v1/models" \
2-H "Authorization: Bearer sk-your-api-token-here" \
3-H "Content-Type: application/json"

Response Format

Success Response (200 OK)

1{
2"success": true,
3"data": [
4 {
5 "id": "gpt-4",
6 "object": "model",
7 "created": 1626777600,
8 "owned_by": "openai",
9 "supported_endpoint_types": [
10 "chat",
11 "completion"
12 ]
13 },
14 {
15 "id": "gpt-3.5-turbo",
16 "object": "model",
17 "created": 1626777600,
18 "owned_by": "openai",
19 "supported_endpoint_types": [
20 "chat",
21 "completion"
22 ]
23 },
24 {
25 "id": "claude-3-sonnet-20240229",
26 "object": "model",
27 "created": 1626777600,
28 "owned_by": "anthropic",
29 "supported_endpoint_types": [
30 "chat"
31 ]
32 }
33]
34}

Response Fields

Top-level Fields:

  • success - Boolean, indicates whether the request was successful
  • data - Array of model objects (returned only on success)
  • message - Error message (returned only on failure)

Model Object Fields:

  • id - Unique identifier for the model
  • object - Object type, fixed as “model”
  • created - Model creation timestamp
  • owned_by - Model provider (e.g., openai, anthropic)
  • supported_endpoint_types - Array of supported API endpoint types

Supported Endpoint Types

  • chat - Chat Completion
  • completion - Text Completion
  • embedding - Text Embedding
  • image - Image Generation
  • audio - Audio Processing
  • rerank - Rerank

Important Notes

Authentication Required

A valid API token must be provided. The token determines which models the user can access.

Permission Control

The returned model list is filtered based on user groups and token groups, showing only models the user has permission to access.

Common Errors

  • 401 Unauthorized - API token is invalid or expired
  • 403 Forbidden - User does not have access permission
  • 500 Internal Server Error - Internal server error