跳转到主要内容

Documentation Index

Fetch the complete documentation index at: https://docs.topify.ai/llms.txt

Use this file to discover all available pages before exploring further.

公共 API 使用 API 密钥认证。每个请求都必须在 X-API-Key 请求头中携带您的密钥。

请求头

X-API-Key: tk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

获取 API 密钥

您可以从 Topify.ai 仪表盘的 Management > Members 中生成 API 密钥,或通过 智能体化设置 端点以编程方式生成。每个密钥的作用域为您的团队,并可访问该团队拥有的所有项目。仅团队管理员可以创建 API 密钥。
您可以随时在 Members 页面查看并复制完整的 API 密钥。在 2026 年 3 月之前创建的密钥仅显示前缀 —— 如果您需要完整值,请创建新的密钥。

速率限制

请求按 API 密钥进行速率限制。限额取决于您的套餐等级:
等级每分钟请求数突发额度每窗口总数
Standard601070
Premium30050350

响应请求头

每个响应都会包含速率限制信息:
请求头类型描述
X-RateLimit-Limitinteger当前窗口内允许的最大请求数
X-RateLimit-Remaininginteger触发限流前剩余的请求数
Retry-Afterinteger距窗口重置的秒数(仅在 429 时返回)

超出速率限制

当您超出限额时,API 会返回 HTTP 429
{
  "detail": "Rate limit exceeded. Retry after 42 seconds."
}

密钥生命周期

状态行为
Active密钥有效且接受请求
Inactive密钥已被管理员禁用,返回 401
Expired密钥已超过过期日期,返回 401
您可以随时从仪表盘停用或删除密钥。

示例请求

curl -X GET "https://topify-customer-api-production.up.railway.app/api/public/v1/projects" \
  -H "X-API-Key: tk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

错误响应

状态详情原因
401Missing X-API-Key header未提供 X-API-Key 请求头
401Invalid API key数据库中未找到密钥哈希
401API key is inactive密钥已被管理员禁用
401API key has expired密钥已超过 expires_at 日期
429Rate limit exceeded. Retry after N seconds.当前窗口内请求过多