> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dimilinks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List models

> 查询当前 API Key 可用的模型。

查询当前密钥可以调用的模型列表。返回的 `data[]` 同时包含文本、图片、视频模型，可按 `id` 命名前缀区分。

## 请求

```bash theme={null}
curl "https://dimilinks.com/v1/models" \
  -H "Authorization: Bearer $DIMILINKS_API_KEY"
```

## 响应

```json theme={null}
{
  "object": "list",
  "data": [
    { "id": "claude-opus-4-7",       "object": "model", "created": 1777080000, "owned_by": "" },
    { "id": "claude-sonnet-4-6",     "object": "model", "created": 1777080000, "owned_by": "" },
    { "id": "claude-haiku-4-5-20251001", "object": "model", "created": 1777080000, "owned_by": "" },
    { "id": "gpt-5.5",               "object": "model", "created": 1777080000, "owned_by": "" },
    { "id": "gpt-5.4-mini",          "object": "model", "created": 1777080000, "owned_by": "" },
    { "id": "gpt-image-2",           "object": "model", "created": 1777080000, "owned_by": "" },
    { "id": "grok-imagine-video",    "object": "model", "created": 1777080000, "owned_by": "" }
  ]
}
```

## 推荐模型

| 用途            | 推荐模型                                                           |
| ------------- | -------------------------------------------------------------- |
| 通用对话、写作、长文档处理 | `claude-sonnet-4-6`、`claude-opus-4-7`、`gpt-5.5`                |
| 复杂推理 / 编码     | `claude-opus-4-7`、`gpt-5.3-codex`、`gpt-5.4`                    |
| 低成本批量任务       | `claude-haiku-4-5-20251001`、`gpt-5.4-mini`、`deepseek-v4-flash` |
| 图片生成 / 编辑     | `gpt-image-2`                                                  |
| 视频生成          | `grok-imagine-video`                                           |

## 使用建议

* 模型清单会随线上能力调整，请把 `/v1/models` 作为运行时来源，不要写死硬编码。
* 不同模型属于不同分组，分组直接决定计费倍率，详见 [Model groups & pricing](/api-reference/groups-and-pricing)。
* 如果返回 `403 model_not_allowed`，请检查这把密钥是否被授权调用该模型；多数情况是 API Key 可用分组与目标模型 `enable_groups` 没有交集。
* 文本模型默认走 `/v1/chat/completions` 或 `/v1/messages`；图片走 `/v1/images/*`；视频走 `/v1/videos/*`。


## OpenAPI

````yaml GET /models
openapi: 3.1.0
info:
  title: DimiLinks API
  description: >-
    DimiLinks unified API for chat (OpenAI-compatible and Anthropic native),
    image generation/editing, and video generation.
  version: 1.1.0
servers:
  - url: https://dimilinks.com/v1
    description: OpenAI 兼容入口：chat completions / images / videos / models / tasks
security:
  - bearerAuth: []
tags:
  - name: Models
  - name: Chat
  - name: Images
  - name: Videos
  - name: Tasks
paths:
  /models:
    get:
      tags:
        - Models
      summary: List models
      operationId: listModels
      responses:
        '200':
          description: Available models
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelList'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    ModelList:
      type: object
      properties:
        object:
          type: string
          example: list
        data:
          type: array
          items:
            $ref: '#/components/schemas/Model'
      required:
        - object
        - data
    Model:
      type: object
      properties:
        id:
          type: string
          example: claude-sonnet-4-6
        object:
          type: string
          example: model
        created:
          type: integer
          example: 1777080000
        owned_by:
          type: string
          example: ''
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
    ErrorObject:
      type: object
      properties:
        message:
          type: string
        type:
          type: string
          example: invalid_request_error
        code:
          oneOf:
            - type: string
            - type: integer
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````