# 取得模型

**API:** Model API

**Endpoint:** `GET /api/v1/models/{model_id}`

依 Felo 模型 ID 傳回單一已設定的模型。

## Base URL

- `https://openapi.felo.ai` — 正式環境

## Authentication

- `FeloBearerAuth` (http bearer) — 以 `Authorization: Bearer <key>` 形式傳送的 Felo API 金鑰。
- `FeloApiKey` (apiKey in header `X-API-Key`) — 以 `X-API-Key: <key>` 形式傳送的 Felo API 金鑰。

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `model_id` | path | yes | string | 由模型清單端點傳回的 Felo 模型 ID。 |

## Responses

### 200 — 模型中繼資料

**application/json**

Schema: `Model` (`#/components/schemas/Model`)

### 401 — Felo API 金鑰無效或未提供

**application/json**

Schema: `OpenAIErrorResponse` (`#/components/schemas/OpenAIErrorResponse`)

### 404 — 找不到模型

**application/json**

Schema: `OpenAIErrorResponse` (`#/components/schemas/OpenAIErrorResponse`)

### 503 — 模型目錄暫時無法使用

**application/json**

Schema: `OpenAIErrorResponse` (`#/components/schemas/OpenAIErrorResponse`)

## Schema definitions

### Model

`#/components/schemas/Model`

```json
{
  "type": "object",
  "required": [
    "id",
    "object",
    "created",
    "owned_by"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Felo 模型 ID。"
    },
    "object": {
      "type": "string",
      "const": "model"
    },
    "created": {
      "type": "integer",
      "format": "int64",
      "description": "模型目錄建立時間戳記，單位為 Unix 秒。"
    },
    "owned_by": {
      "type": "string"
    },
    "model_kind": {
      "type": "string",
      "description": "套用已啟用的供應商對應覆寫後，實際生效的模型能力類別：chat、image_generation、video_generation 或 decisions。請使用與此類別相符的呼叫端點。"
    }
  },
  "additionalProperties": true
}
```

### OpenAIErrorResponse

`#/components/schemas/OpenAIErrorResponse`

```json
{
  "type": "object",
  "description": "相容於 OpenAI 的錯誤封裝。Router 可能只包含 code 與 message，而不含所有選用的上游欄位。",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "required": [
        "message"
      ],
      "properties": {
        "message": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "description": "相容於 OpenAI 的錯誤類型（若有提供）。"
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "code": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": true
    }
  },
  "additionalProperties": true
}
```
