01 / authentication
用 API Key 调用
在控制台创建密钥。完整密钥只显示一次,服务端只保存哈希摘要。每次请求都使用 Bearer 认证。
Authorization: Bearer tera_live_xxxxxxxxxxxxx所有接口使用预付费 Compute Units。请求开始时预扣,成功后按真实结果结算,远程失败会自动释放额度。
在控制台创建密钥。完整密钥只显示一次,服务端只保存哈希摘要。每次请求都使用 Bearer 认证。
Authorization: Bearer tera_live_xxxxxxxxxxxxxPOST /api/v1/extract 支持 JSON 或 Markdown 输出,自动过滤脚本、导航和样式内容。
curl -X POST https://app.teradynamic.net/api/v1/extract \
-H "Authorization: Bearer tera_live_..." \
-H "Content-Type: application/json" \
-H "Idempotency-Key: req_123" \
-d '{"url":"https://example.com","output":"markdown"}'POST /api/v1/documents 当前支持 PDF 转 Markdown,也支持直接把网页转换为 Markdown。
curl -X POST https://app.teradynamic.net/api/v1/documents \
-H "Authorization: Bearer tera_live_..." \
-H "Content-Type: application/json" \
-d '{"operation":"pdf_to_markdown","url":"https://example.com/file.pdf"}'网页接口按基础处理量和输出长度计费;PDF 接口包含解析基础成本。返回体中的 usage.credits 是本次实际扣减。
{
"usage": {
"request_id": "req_123",
"credits": 18
}
}