快速开始
1. 创建组织与 API Key
- 访问 app.ttttt.ai 完成注册并自动创建你的第一个组织。
- 控制台 → API 密钥 → “创建密钥”,填写一个有意义的名称(例如
cursor-personal、backend-prod)。 - 密钥以
owo-开头,生成后只完整展示一次,请立即复制保存到密码管理器或服务器密文。
2. 发一条请求
OpenAI 格式
curl https://api.ttttt.ai/v1/chat/completions \
-H "Authorization: Bearer owo-..." \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"messages": [{"role": "user", "content": "你好"}]
}'Anthropic 格式
curl https://api.ttttt.ai/v1/messages \
-H "x-api-key: owo-..." \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "你好"}]
}'流式 (SSE)
把 "stream": true 加进请求体,连接保持长连,按 data: 行解析即可。
ttttt.ai 全链路透传,不做 buffer 聚合 —— 首 token 延迟接近原厂。详见 流式响应。
3. 接入 SDK
只需改两项配置:
| 配置项 | 值 |
|---|---|
base_url / baseURL | https://api.ttttt.ai/v1 |
api_key | owo-... |
Python (openai)
from openai import OpenAI
client = OpenAI(
api_key="owo-...",
base_url="https://api.ttttt.ai/v1",
)
resp = client.chat.completions.create(
model="gpt-5.5",
messages=[{"role": "user", "content": "你好"}],
)
print(resp.choices[0].message.content)Node.js (openai)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "owo-...",
baseURL: "https://api.ttttt.ai/v1",
});
const resp = await client.chat.completions.create({
model: "gpt-5.5",
messages: [{ role: "user", content: "你好" }],
});
console.log(resp.choices[0].message.content);Python (anthropic)
import anthropic
client = anthropic.Anthropic(
api_key="owo-...",
base_url="https://api.ttttt.ai",
)
msg = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=1024,
messages=[{"role": "user", "content": "你好"}],
)
print(msg.content[0].text)Node.js (anthropic)
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: "owo-...",
baseURL: "https://api.ttttt.ai",
});
const msg = await client.messages.create({
model: "claude-sonnet-4-6",
max_tokens: 1024,
messages: [{ role: "user", content: "你好" }],
});
console.log(msg.content[0].type === "text" ? msg.content[0].text : "");更多语言、更完整的 SDK 示例见 SDK 与 Fetch。
4. 查看用量
在控制台:
- 用量 页 — 按天 / 模型 / 成员 / 客户端的调用趋势与消耗明细。
- 账单 页 — 余额流水、充值与发票。
- 审计日志 — 每一次请求的上下文、耗时与失败原因。
详见 用量分析。
5. 接你的工具
| 工具 | 文档 |
|---|---|
| Claude Code | /clients/claude-code |
| Codex CLI | /clients/codex |
| Cursor | /clients/cursor |
| Cline | /clients/cline |
| Continue | /clients/continue |
| Aider | /clients/aider |
| Cherry Studio | /clients/cherry-studio |
| 自建应用 / SDK | /clients/sdk |
下一步
Last updated on