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

# 第一次补全请求

> 使用 curl 发起你的第一次 API 调用，并查看完整的响应结果。

## 发送请求

```bash theme={null}
curl -X POST https://www.hitheo.ai/api/v1/completions \
  -H "Authorization: Bearer $THEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "What are the three laws of thermodynamics? Explain each in one sentence.",
    "mode": "auto"
  }'
```

## 响应

```json theme={null}
{
  "id": "comp_abc123",
  "object": "completion",
  "created": "2026-04-10T12:00:00Z",
  "content": "1. **Zeroth Law**: If two systems are each in thermal equilibrium with a third, they are in equilibrium with each other...",
  "mode": "auto",
  "resolved_mode": "fast",
  "model": {
    "id": "theo-1-flash",
    "label": "Theo Flash",
    "engine": "theo-core"
  },
  "tools_used": [],
  "artifacts": [],
  "follow_ups": [
    { "label": "Explain entropy", "prompt": "Explain entropy in simple terms" },
    { "label": "Real-world examples", "prompt": "Give real-world examples of each law" }
  ],
  "usage": {
    "cost_cents": 0.02
  }
}
```

## 刚刚发生了什么

1. Theo 将你的提示词判定为简单的问答任务（`resolved_mode: "fast"`）
2. 为了追求速度，请求被路由到 `theo-1-flash`
3. 由于不需要调用任何工具，代理循环被跳过
4. 响应结果被缓存、计费（0.02 美分）并记录审计日志

## 尝试不同的模式

```bash theme={null}
# Code generation — routes to Theo Code
curl -X POST https://www.hitheo.ai/api/v1/completions \
  -H "Authorization: Bearer $THEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Write a TypeScript function that debounces any callback", "mode": "code"}'

# Deep reasoning — routes to Theo Reason
curl -X POST https://www.hitheo.ai/api/v1/completions \
  -H "Authorization: Bearer $THEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Compare microservices vs monolith architecture for a 10-person startup", "mode": "think"}'
```

## 结合技能使用

通过传入技能 slug 来激活相应的领域专业能力：

```bash theme={null}
curl -X POST https://www.hitheo.ai/api/v1/completions \
  -H "Authorization: Bearer $THEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Check current inventory for SKU-1234 across all warehouses",
    "skills": ["inventory-check"]
  }'
```

该技能的系统提示扩展和工具定义会被自动注入到处理管道中。


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