API de plataforma
Model Management API
This API documentation provides a detailed description of the model management interface, including the features, request examples, parameter descriptions, and response formats for both the new and legacy API versions.
GET
Model Management API
Documentation Index
Fetch the complete documentation index at: https://docs.aihubmix.com/llms.txt
Use this file to discover all available pages before exploring further.
New API Version
Get Informações dos Modelos
Endpoint:GET https://aihubmix.com/api/v1/models
Description: Fetches detailed information for all available models.
Model Object Field Descriptions
An array of model information objects.
The unique identifier for the model.
A description of the model’s functionality (in English).
Model type. Supported values:
llm (Large Language Model), image_generation, video, tts (Text-to-Speech), stt (Speech-to-Text), embedding, rerank.Supported features. Supported values:
thinking (reasoning), tools (tool use), function_calling, web (web search), deepsearch, long_context, structured_outputs.Supported input modalities. Supported values:
text, image, audio, video, pdf.Maximum number of output tokens.
Context window size (maximum number of input tokens).
Pricing information object.
Input token price (per 1K tokens, in USD).
Output token price (per 1K tokens, in USD).
Cache read price (per 1K tokens, in USD, optional field).
Cache write price (per 1K tokens, in USD, optional field).
Request Examples
Request Parameter Descriptions (for Filtering)
Model type. Supported values:
llm (Large Language Model), image_generation, video, tts (Text-to-Speech), stt (Speech-to-Text), embedding, rerank.Input modalities. Supported values:
text, image, audio, video, pdf. Suporta multi-modality queries (comma-separated).Fuzzy search for model name (suporta partial matching).
Model features. Supported values:
thinking (reasoning), tools (tool use), function_calling, web (web search), deepsearch, long_context, structured_outputs. Suporta multi-feature queries (comma-separated).Sort by field. Supported values:
model_ratio: Sort by cost-effectiveness.context_length: Sort by context length.coding: Prioritize coding models.order: Sort by default order.
Sort order. Supported values:
asc(ascending)desc(descending)
Successful Response Example
Usage Scenario Examples
Note: When using smart sort for coding models, the system will prioritize models tagged with coding, and other models will be listed no default order.
Performance Optimization
Caching Mechanism
- Cache Policy: HTTP caching, cache duration 300 seconds (5 minutes).
- Cache Control:
Cache-Control: public, max-age=300, stale-while-revalidate=300 - Content Validation: Suporta ETag content hash validation.
Cache Usage Example
If the content has not been updated, the server returns a 304 Not Modified status code.
Error Handling
Observações Importantes
- Data Integrity: This endpoint returns all models that meet the criteria, without pagination.
- Type Compatibility: Suporta automatic mapping between new and old type identifiers:
t2t↔llmt2i↔image_generationt2v↔videoreranking↔rerank
- Filtering Logic: Multiple filter conditions are combined with a logical AND.
- Sorting Rule: When no sorting method is specified, models are arranged no system’s default order.
Legacy API Version
⚠️ Note: O seguinte are legacy API endpoints. Recomenda-se to use the new API version for better performance and features.
Get Model List
Endpoint:GET /v1/models
- If a user is logged in, it retrieves the list of available models for the user’s group. If no user is logged in, it retrieves the list for the
defaultgroup. - If the header contains an
Authorizationfield, it queries the list of models configured for the corresponding token.
Response
| Código de Status | Meaning | Description | Modelo de Dados |
|---|---|---|---|
| 200 | OK | none | Inline |
Response Data Structure
Código de Status 200| Name | Type | Required | Description |
|---|---|---|---|
| » data | [object] | true | none |
| »» id | string | true | Model ID |
| »» object | string | true | model |
| »» created | integer | true | Timestamp of creation |
| »» owned_by | string | true | Developer |
| »» permission | [object]¦null | true | none |
| »»» id | string | true | none |
| »»» object | string | true | none |
| »»» created | integer | true | none |
| »»» allow_create_engine | boolean | true | none |
| »»» allow_sampling | boolean | true | none |
| »»» allow_logprobs | boolean | true | none |
| »»» allow_search_indices | boolean | true | none |
| »»» allow_view | boolean | true | none |
| »»» allow_fine_tuning | boolean | true | none |
| »»» organization | string | true | none |
| »»» group | null | true | none |
| »»» is_blocking | boolean | true | none |
| »» root | string | true | Root model name |
| »» parent | null | true | Parent model |
Get Informações dos Modelos
Endpoint:GET /v1/models/:model
Parâmetros da Requisição
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| model | path | string | true | Model ID |
Response
| Código de Status | Meaning | Description | Modelo de Dados |
|---|---|---|---|
| 200 | OK | none | Inline |
Response Data Structure
Código de Status 200| Name | Type | Required | Description |
|---|---|---|---|
| id | string | true | Model ID |
| object | string | true | model |
| created | integer | true | Timestamp of creation |
| owned_by | string | true | Developer |
| permission | [object] | true | none |
| » id | string | false | none |
| » object | string | false | none |
| » created | integer | false | none |
| » allow_create_engine | boolean | false | none |
| » allow_sampling | boolean | false | none |
| » allow_logprobs | boolean | false | none |
| » allow_search_indices | boolean | false | none |
| » allow_view | boolean | false | none |
| » allow_fine_tuning | boolean | false | none |
| » organization | string | false | none |
| » group | null | false | none |
| » is_blocking | boolean | false | none |
| root | string | true | Root model name |
| parent | null | true | Parent model |
Última atualização: 2026-06-01
Model Management API