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

# GPT-4o Mini (2024-07-18)

> GPT-4o Mini (2024-07-18) | 文本生成

文本生成 · `gpt-4o-mini-2024-07-18`

使用带日期的完整 ID 固定版本，不会跟随滚动别名更新。

`POST /v1/chat/completions`

请在 [MixRoute 模型市场](https://console.mixroute.ai/models) 核对密钥分组的可用性。列入目录不代表渠道已开放。

## 快速示例

运行前请设置 `MIXROUTE_API_KEY`。

```bash theme={null}
curl --fail-with-body --request POST 'https://api.mixroute.ai/v1/chat/completions' \
  --header "Authorization: Bearer $MIXROUTE_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-4o-mini-2024-07-18",
  "messages": [
    {
      "role": "user",
      "content": "Reply with OK only."
    }
  ],
  "max_tokens": 64
}'
```

从 `choices[0].message.content` 读取文本。

## 参数

| 字段 | 说明 |
| - | - |
| `model` | `gpt-4o-mini-2024-07-18`. 使用上面列出的完整模型 ID。 |
| `messages` | 示例中的输入对话。 |

## API 参考

* [Chat Completions](https://mixroute.ai/docs/zh-Hans/api-reference/endpoint/chat-openai.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.