详细的API接口说明和使用指南
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.
{
"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"
}
}| 字段 | 类型 | 说明 |
|---|---|---|
| code | number | Business status code. 200 means the request succeeded. |
| msg | string | Response message. |
| data | object | Response data object. |
| service | string | Service availability flag inside the data object. ok means the API service is healthy. |
| account_status | string | Account status inside the data object, for example active. |
| credits | number | Current credit balance inside the data object. |
| plan | string | Display name of the current plan inside the data object. |
| plan_key | string | null | Stable plan key inside the data object, for example ultra; may be null when no plan is active. |
| active_until | string | null | Plan expiration time inside the data object in ISO 8601 format; null when not applicable. |
| rate_limit_per_second | number | null | Allowed requests per second inside the data object; null when not configured. |
| rate_limit_per_hour | number | null | Allowed requests per hour inside the data object; null when not configured. |
| rps_current | number | Requests used in the current per-second window inside the data object. |
| rph_current | number | Requests used in the current per-hour window inside the data object. |
| monthly_limit | number | Monthly request quota for the current plan inside the data object. |
| month_calls | number | Requests used in the current quota period inside the data object. |
| monthly_remaining | number | null | Requests remaining in the current quota period inside the data object; null when there is no fixed monthly cap. |
| quota_period_start | string | Start 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
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"
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.