# 模型列表（OpenAI 兼容）

来源: https://docs.aicentos.com/api/models/openai

Language: zh-CN

> OpenAI 兼容的模型列表接口：查询当前可用的模型

OpenAI 兼容格式的模型列表接口。

`GET /v1/models`

## 鉴权

Bearer Token：API Key 在控制台「令牌管理」获取，放在请求头 `Authorization`。

## 请求

```bash
export AICENTOS_API_KEY="sk-your-aicentos-api-key"

curl "https://aicentos.com/v1/models" \
  -H "Authorization: Bearer $AICENTOS_API_KEY"
```

## 响应

```json
{
  "object": "list",
  "data": [
    {
      "id": "gpt-4o-mini",
      "object": "model",
      "created": 1715000000,
      "owned_by": "openai"
    }
  ]
}
```

鉴权失败时返回 `invalid_api_key` 错误，排查方法见[错误处理](https://docs.aicentos.com/billing/errors)：

```json
{
  "error": {
    "message": "Incorrect API key provided",
    "type": "authentication_error",
    "code": "invalid_api_key"
  }
}
```