1. 创建 API Key
注册或登录 IteraCompute,然后在控制台创建 API Key。
读取会议记录,调用免费 Auto,保存有用的摘要。从完整 Python 项目开始,再将下方 SDK 配置用于自己的应用。
本次免费活动于 2026 年 11 月 24 日 00:00(美国太平洋时间)结束。截止前已完成充值且净充值大于 0 的用户继续保留原有免费档位。此后,共享免费 Auto 仅向这些老充值用户和当前有效套餐用户开放;新充值不再获得或升级免费权益。套餐内 Auto 额度与每月共享免费权益独立计算。
注册或登录 IteraCompute,然后在控制台创建 API Key。
Python 使用 base_url,JavaScript 使用 baseURL,然后调用 Chat Completions。
使用准确的 API Model ID,启用智能体或视觉功能前确认上下文与模型能力。
将 API Key 保存在服务端环境或工具凭据存储中;需要手动填写密钥的字段请使用自己的 API Key。
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.iteracompute.com/v1",
api_key=os.environ["ITERACOMPUTE_API_KEY"],
)
response = client.chat.completions.create(
model="Auto",
messages=[{"role": "user", "content": "Hello!"}],
max_tokens=512,
)
text = response.choices[0].message.content
if not text or not text.strip():
raise RuntimeError("Empty model reply: activation is incomplete.")
print(text)import OpenAI from "openai";
if (!process.env.ITERACOMPUTE_API_KEY) {
throw new Error("Set ITERACOMPUTE_API_KEY on the server.");
}
const client = new OpenAI({
baseURL: "https://api.iteracompute.com/v1",
apiKey: process.env.ITERACOMPUTE_API_KEY,
});
const response = await client.chat.completions.create({
model: "Auto",
messages: [{ role: "user", content: "Hello!" }],
max_tokens: 512,
});
const text = response.choices[0].message.content;
if (!text || !text.trim()) throw new Error("Empty model reply: activation is incomplete.");
console.log(text);读取一份简短的 UTF-8 会议记录,调用免费 Auto,将三条摘要保存到 summary.txt。完整 Python 命令行项目包含环境准备和错误处理。
一份包含发布日期、负责人、延期事项和阻塞条件的摘要文件。
退出码为 0,summary.txt 非空且与打印的摘要一致,并逐项核对原文事实。
On October 14, the team agreed to launch the customer feedback dashboard on October 21.
Maya owns the release checklist and will finish it by October 18.
Leo will add CSV export before the launch. A mobile layout is deferred to the next release.
The launch is blocked until the export tests pass and the support guide is reviewed.• Customer feedback dashboard launch decision: go live on October 21, but the launch is blocked until CSV export tests pass and the support guide is reviewed.
• Maya owns the release checklist and must finish it by October 18; Leo will add CSV export before launch.
• Mobile layout is deferred to the next release.
Saved: summary.txt以下为示例输出,实际措辞可能不同。API 回复为空时,不创建或覆盖输出文件。
# Bash / zsh / WSL; set ITERACOMPUTE_API_KEY in your environment first.
curl --fail-with-body https://api.iteracompute.com/v1/chat/completions \
-H "Authorization: Bearer $ITERACOMPUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"Auto","messages":[{"role":"user","content":"Reply with exactly: Hello!"}],"max_tokens":512}'确认 choices[0].message.content 包含可见文本;HTTP 200 本身不够。推理可能消耗输出预算。免费 Auto 可使用首次免费调用示例关闭思考,再在工具中发送提示。
能力表示 IteraCompute 接口的支持情况。工作流程中的可用性也取决于工具与配置,推理参数因模型而异。
Python 使用 base_url,JavaScript 使用 baseURL。显式传入 IteraCompute 密钥,SDK 默认读取的环境变量并非 ITERACOMPUTE_API_KEY。
上方纯文本示例调用 client.chat.completions.create,读取 choices[0].message.content。Responses 示例与 response.output_text 属于另一套 API。
content 为空不算文本验证成功。免费 Qwen 示例允许 512 输出 tokens,并关闭思考;该参数仅用于对应模型。
检查账户共享月用量与并发,遵循 Retry-After,避免并发重试。免费 Auto 不会自动付费超额调用;其他模型按公开价格计费。
401 / 403:检查密钥与模型权限。免费 Auto 无需余额或绑卡;使用付费模型时还需检查可用余额。