API 文档

详细的API接口说明和使用指南

Account Status

GET

描述

Check your account service status, current credit balance, plan, monthly usage, and live rate-limit counters. Authenticate with X-API-Key or a Bearer token.

接口地址

https://api.twtapi.com/myapi/status

返回示例

{
  "success": true,
  "data": {
    "service": "ok",
    "account_status": "active",
    "credits": 2400.5,
    "plan": "Ultra",
    "plan_key": "ultra",
    "active_until": "2026-08-01T00:00:00+00:00",
    "rate_limit_per_second": 100,
    "rate_limit_per_hour": null,
    "rps_current": 2,
    "rph_current": 12,
    "monthly_limit": 50000,
    "month_calls": 1234,
    "monthly_remaining": 48766,
    "quota_period_start": "2026-07-01T00:00:00+00:00"
  }
}

返回字段

字段类型说明
codenumberBusiness status code. 200 means the request succeeded.
msgstringResponse message.
dataobjectResponse data object.
servicestringService availability flag inside the data object. ok means the API service is healthy.
account_statusstringAccount status inside the data object, for example active.
creditsnumberCurrent credit balance inside the data object.
planstringDisplay name of the current plan inside the data object.
plan_keystring | nullStable plan key inside the data object, for example ultra; may be null when no plan is active.
active_untilstring | nullPlan expiration time inside the data object in ISO 8601 format; null when not applicable.
rate_limit_per_secondnumber | nullAllowed requests per second inside the data object; null when not configured.
rate_limit_per_hournumber | nullAllowed requests per hour inside the data object; null when not configured.
rps_currentnumberRequests used in the current per-second window inside the data object.
rph_currentnumberRequests used in the current per-hour window inside the data object.
monthly_limitnumberMonthly request quota for the current plan inside the data object.
month_callsnumberRequests used in the current quota period inside the data object.
monthly_remainingnumber | nullRequests remaining in the current quota period inside the data object; null when there is no fixed monthly cap.
quota_period_startstringStart time of the current quota period inside the data object in ISO 8601 format.

错误码说明

后端常见业务错误码说明。所有接口统一返回格式:{ code, msg, data }。

说明:`code` 是响应体中的业务状态码,可能与 HTTP 状态码不同。

错误码名称含义建议处理
200成功请求处理成功。读取 `data` 获取业务数据。
400请求参数错误参数不合法或业务校验未通过。检查必填参数、取值范围与请求格式。
401未授权鉴权失败(未登录、缺少或无效 API Key)。重新登录或传入有效的 `X-API-Key`。
402余额不足余额不足或调用次数已用完,无法完成本次调用。请充值或升级套餐后重试。
403无权限没有访问权限或账户状态受限。检查账户状态和接口访问权限。
404资源不存在请求的资源不存在。检查 ID/订单号是否正确、数据是否存在。
429请求过于频繁触发每秒/每小时/月度限流。降低请求频率,并使用退避重试。
500服务器内部错误服务端处理异常。稍后重试;持续失败请联系支持。
502服务暂时不可用服务请求处理失败。请稍后重试。
503服务繁忙系统繁忙或触发全局保护限制。等待短时间后重试。

From docs to a live request

Check fields, quota, and limits before scaling search or monitoring jobs.

Account Status shows credits, plan, monthly usage, and live rate-limit counters. Response Fields help you see what n8n, Sheets, alerts, or AI workflows will receive before you wire the endpoint into production.

代码生成器

curl -X GET "https://api.twtapi.com/myapi/status?lang=ja" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "X-Lang: ja"

测试 API

If you do not have an API key yet, start by creating an account or opening the API dashboard to check your current plan, quota, and key-management entry points.