> ## 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.