Error codes & rate limits
All Manina AI API endpoints (POST /v1/locate and POST /v1/act) return errors in a uniform JSON envelope with Cache-Control: no-store. No non-200 response is ever billed.
{ "error": { "code": "busy", "message": "The model is busy. Retry after 1 second." }}Error codes
Section titled “Error codes”| HTTP Status | error.code |
Meaning | Recommended action |
|---|---|---|---|
400 |
invalid_request |
Malformed JSON, wrong Content-Type, unknown or missing field, text / goal empty or over limit, malformed plan, min_present outside [0, 1], or request body over 12 MB. |
Fix the request payload before retrying. |
400 |
invalid_image |
image is not valid base64, is not a PNG, JPEG, or WebP file, cannot be decoded, or exceeds the pixel safety ceiling (~89 MP). |
Re-encode the screenshot as PNG, JPEG, or WebP. |
401 |
unauthorized |
Missing Authorization: Bearer … header or unrecognized token format. |
Pass Authorization: Bearer hsk_live_… (or hsk_test_…). |
401 |
key_invalid |
API key was revoked, rotated, malformed, or belongs to the other environment (Live vs Sandbox). | Mint a fresh key in your account (API keys →). |
402 |
insufficient_balance |
Your prepaid balance cannot cover the call ($0.0003). | Add credit or enable Auto Top-up in your account (Billing →). |
402 |
key_limit |
This API key reached its configured per-key spending cap. | Raise the key’s spend cap or switch to another key in your account (API keys →). |
404 |
not_found |
Wrong URL path, or the endpoint is disabled in this environment. | Verify POST https://llm.manina.ai/v1/locate or /v1/act. |
413 |
request_too_large |
Request body exceeded the 12 MB gateway ingress limit. | Downscale the screenshot (540 px wide JPEG is optimal). |
503 |
busy |
All inference GPU slots stayed occupied for the 2-second queue window, or too many concurrent requests arrived from one address. Includes header Retry-After: 1. |
Wait Retry-After seconds (default 1 s) and retry with jitter. |
503 |
model_unavailable |
Model backend timed out or returned an unparseable upstream payload. | Retry with exponential backoff (1 s, 2 s, 4 s). |
503 |
billing_unavailable |
Billing service could not be reached to authorize the key. | Retry with exponential backoff. |
Concurrency, queuing & Retry-After
Section titled “Concurrency, queuing & Retry-After”- Short server queue, fast fail: Rather than holding HTTP connections open for tens of seconds during traffic spikes, the gateway queues each
/v1/locateor/v1/actcall for up to 2 seconds waiting for a GPU slot. If a slot does not free up in time, it returns503 busywithRetry-After: 1and charges $0. - Recommended retry loop: Retry
503 busy,503 model_unavailable,503 billing_unavailable, and network502/504up to 3 times, honoring theRetry-Afterheader (or1 s,2 s,4 swith small random jitter). Do not blindly retry400,401, or402.
Payload & field limits
Section titled “Payload & field limits”| Limit | Value |
|---|---|
| Maximum HTTP request body | 12 MB |
text (/v1/locate) |
1 to 1,000 characters (trimmed) |
goal (/v1/act) |
1 to 1,000 characters (trimmed) |
plan (/v1/act) |
Up to 4,000 characters (numbered lines) |
history (/v1/act) |
Up to 8,000 characters |
| Maximum decoded image area | ~89 megapixels (540 px wide JPEG recommended) |
Live vs Sandbox isolation
Section titled “Live vs Sandbox isolation”- Live keys (
hsk_live_…): Authenticated against your production account balance onmanina.ai. - Sandbox keys (
hsk_test_…): Isolated to the Sandbox test environment so automated integration tests never touch production credit. Mixing a Sandbox key against the Live billing environment (or vice versa) returns401 key_invalid.
