Docs
Errors
An error has an HTTP status and a body with a code and a message. Read the code; the message is for people and may change.
The shape
{
"error": {
"code": "invalid_request",
"message": "prompt: Too big: expected string to have <=8000 characters"
}
}
A few errors come from the web server before VectorMojo reads the request: a body that is not valid JSON (400), a body
over 8 MB (413), a path that does not exist (404), and an unexpected fault (500). Those bodies hold
statusCode and message instead of error.code. Check the HTTP status first.
HTTP errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | A field is missing, has the wrong type or is out of range. The message names each field. |
| 400 | unknown_model | The model name is not one on sale. See GET /v1/models. |
| 400 | invalid_image | The image is not a PNG, JPEG or WebP, or does not match its media_type. |
| 400 | invalid_svg | Edit: the SVG you sent is unsafe beyond repair, has no size between 16 and 4,000, or does not render. Export: the version could not be exported. |
| 400 | target_not_found | Edit: no element with that id in the version you edit. |
| 400 | too_many_versions | Edit: the design already holds 100 versions. |
| 400 | export_too_large | Export: the PNG or WebP would pass 40 million pixels or 16,383 pixels on a side. |
| 401 | unauthorized | No key, a wrong key or a revoked key. |
| 402 | insufficient_credits | Your balance is lower than the job's price. No job is made. Extra fields: required, available. |
| 403 | forbidden | API key routes called with an API key. Manage keys in the studio. |
| 404 | not_found | No such job, design, version, file or brand in your account. |
| 409 | api_key_limit | The account already holds the most API keys it can. |
| 409 | brand_limit | The account already holds 50 brands. |
| 413 | (none) | The request body is larger than 8 MB. |
| 429 | rate_limited | Too many requests in this minute. Has a Retry-After header and a retry_after field. See Rate limits. |
| 429 | too_many_failed_jobs | Many of your recent jobs failed. Wait a while, or change the request. No Retry-After header. |
| 429 | account_paused | The account sent several requests that VectorMojo does not answer (see identity_question below) within 24 hours. It is paused for 24 hours. Extra field: retry_at. |
| 502 | checkout_failed | Buying credits: the payment page could not be opened. Try again in a moment. |
| 503 | billing_not_configured | Buying credits is not available yet. |
402: not enough credits
HTTP/1.1 402 Payment Required
{
"error": {
"code": "insufficient_credits",
"message": "Not enough credits: this job needs 20, the balance is 4.",
"required": 20,
"available": 4
}
} 429: too many requests
HTTP/1.1 429 Too Many Requests
Retry-After: 23
{
"error": {
"code": "rate_limited",
"message": "Too many requests. Try again in 23 s.",
"retry_after": 23
}
} too_many_failed_jobs is also a 429. Jobs that fail are free for you, so an account whose jobs keep failing
is paused for a while: by default, more than 12 failed jobs in the past hour. It has no Retry-After
header. Wait, or change what you send.
When a job fails
A job that was accepted (202) can still fail later. GET /v1/jobs/:id then answers 200 with
"status": "failed" and an error. A failed job is never charged: its credits come back, and its
credits field reads 0.
job.error.code | When |
|---|---|
design_failed_checks | VectorMojo could not make a design that passes its own checks, even after one repair. |
model_refused | VectorMojo could not make this design or edit. |
identity_question | The request asks what is behind VectorMojo, or tries to change how VectorMojo works. VectorMojo does not answer that. Nothing is drawn and nothing is charged. |
generation_failed | Something went wrong while making the design. |
edit_failed | Something went wrong while editing the design. |
design_not_found | Edit: the design was gone when the job ran. |
queue_unavailable | VectorMojo could not queue the job. Try again in a moment. |
queue_timeout | The job waited in the queue for too long (about 7 minutes). |
timed_out | The job ran for too long (about 12 minutes) and was stopped. |
Designs are AI-generated. Outputs can contain factual mistakes, so review every design before you use it.