# 原生 OpenAI 格式

來源: https://docs.aicentos.com/zh-TW/api/models/openai

Language: zh-TW

模型（Models）

`GET /models`

## 驗證

將 API Key 存入環境變數 `AICENTOS_API_KEY`；shell 範例會將其值展開至 `Authorization: Bearer` 標頭。

在控制台「權杖管理」取得的 API 金鑰

位置：`header`

## 回應主體

###

`application/json`

###

`application/json`

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

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

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

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