# Định dạng OpenAI gốc

Nguồn: https://docs.aicentos.com/vi/api/models/openai

Language: vi

Mô hình (Models)

`GET /models`

## Xác thực

Lưu API Key vào biến môi trường `AICENTOS_API_KEY`; các ví dụ shell dùng giá trị của biến trong header `Authorization: Bearer`.

API Key lấy từ mục "Quản lý token" trong Console

Vị trí: `header`

## Nội dung phản hồi

###

`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"
  }
}
```