Errors & Rate Limits
Platform API v1 returns structured JSON errors. Business API keys are rate-limited; execute routes support optional idempotency for safe retries. Probe GET /capabilities (manifest v19) for the live operations block.
Error envelope
Most /api/v1 routes return:
{
"error": {
"code": "INVALID_API_KEY",
"message": "Human-readable explanation.",
"details": { "optional": "context" }
}
}| Code | When |
|---|---|
| UNAUTHORIZED | Missing or malformed Authorization header |
| INVALID_API_KEY | Unknown or revoked business API key |
| INVALID_TOKEN | Invalid or expired smart wallet JWT |
| FORBIDDEN | Wallet mismatch or inactive business |
| VALIDATION_ERROR | Invalid query or JSON body |
| RATE_LIMIT_EXCEEDED | Business key exceeded 100 requests in rolling minute |
| COOLDOWN | Intelligence force reroll within cooldown window |
| CONFIG_ERROR | Deployment missing required configuration |
| NOT_FOUND | Resource not available for current query |
| ENSO_ERROR / JUPITER_ERROR / BUILD_FAILED | Execute route build failures |
Business API key rate limits
Routes using Authorization: Bearer sk_live_… enforce 100 requests per rolling minute per key (Intelligence READ, datasets, markets, programmatic assistant chat, GET /accounts/business, etc.).
HTTP/1.1 429 Too Many Requests
Retry-After: 42
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "API rate limit exceeded (100 requests per minute). Retry shortly.",
"details": { "retryAfterSeconds": 42 }
}
}- Honor the
Retry-Afterheader (seconds). - Limits are per API key, not per IP.
- Smart wallet JWT execute routes (Actions) are not counted against this business-key bucket.
COOLDOWN vs rate limit quota
Intelligence views with force=1 may return 429 with error.code: "COOLDOWN" and error.details.retryAfterMs — angle reroll cooldown, not the per-key 100/min quota. See Intelligence API.
Execute idempotency
POST /api/v1/execute/** (aliases /actions/**) accept an optional header:
Idempotency-Key: <client-generated-uuid>When present, Torque stores the JSON response for 24 hours. Retries with the same key and same authenticated wallet return the cached status and body without rebuilding the route. Scope: wallet email + route + key. Use a fresh key for intentionally new operations.
Discovery via capabilities
curl -sS "https://app.torque.fi/api/v1/capabilities" | jq '.manifestVersion, .operations.rateLimits, .operations.idempotency'Manifest v19 includes operations.rateLimits, operations.idempotency, operations.aliasHeaders, and assistantTurnTensor (8 write verbs + 8 read families). SDK clients should retry on RATE_LIMIT_EXCEEDED using Retry-After or error.details.retryAfterSeconds.