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

# Grok 3 Mini

> 通过 Anyfast API 调用 xAI Grok 3 Mini 模型。快速轻量。

Grok 3 Mini 是 xAI 推出的语言模型，通过 Anyfast 提供。快速轻量。

## 核心能力

* **OpenAI 兼容** — 可直接使用 OpenAI SDK
* **流式输出** — 支持 SSE 实时流式传输
* **强推理** — 适合复杂多步骤任务

## 快速示例

<CodeGroup>
  ```bash cURL theme={null}
  curl https://www.anyfast.ai/v1/chat/completions \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "grok-3-mini",
      "messages": [
        { "role": "user", "content": "用简单的话解释量子纠缠。" }
      ]
    }'
  ```

  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      api_key="YOUR_API_KEY",
      base_url="https://www.anyfast.ai/v1"
  )

  response = client.chat.completions.create(
      model="grok-3-mini",
      messages=[
          {"role": "user", "content": "用简单的话解释量子纠缠。"}
      ]
  )

  print(response.choices[0].message.content)
  ```
</CodeGroup>

## 参数说明

| 参数            | 类型      | 必填 | 说明                       |
| ------------- | ------- | -- | ------------------------ |
| `model`       | string  | 是  | 固定为 `grok-3-mini`        |
| `messages`    | array   | 是  | `{ role, content }` 对象列表 |
| `max_tokens`  | integer | 否  | 生成的最大 token 数            |
| `temperature` | float   | 否  | `0`–`2`，控制随机性，默认 `1`     |
| `stream`      | boolean | 否  | 启用 SSE 流式输出，默认 `false`   |
| `top_p`       | float   | 否  | 核采样阈值                    |

<Card title="API 参考" icon="code" href="/zh/api-reference/model-api/xai/grok-3-mini">
  查看 Grok 3 Mini 的交互式 API Playground。
</Card>

<script src="/feedback.js" />
