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

# 成本優化

> 在保證質量的同時降低 API 成本的技巧。

## 使用合適的模式

| 模式 | 成本 | 適用場景 |
| - | - | - |
| `fast` | 最低 | 簡單問答、分類、短回覆 |
| `auto` | 可變 | 交給 Theo 決定——通常會選擇足夠用且最便宜的模型 |
| `think` | 較高 | 複雜推理、多步分析 |
| `code` | 較高 | 代碼生成、架構設計 |

## 技巧

1. **為簡單任務設置 `mode: "fast"`** —— 會路由到 Theo Flash（最便宜的選項）
2. **使用語義緩存** —— 相同請求在首次調用之後即為免費
3. **監控用量** —— `GET /api/v1/usage` 可顯示按模式和模型劃分的成本明細
4. **設置每日上限** —— 在計費儀表盤中配置支出限額
5. **按請求使用技能**，而不是一次性安裝全部技能——技能越少，提示詞令牌消耗越少
6. **降低 `max_iterations`** —— 如果你知道任務只需要 1-2 次工具調用，可將其設置為 `max_iterations: 3`


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