Docs
Idempotency
Networks drop. Send an Idempotency-Key with each generate, and a retry gets the first job back instead of a second charge.
How it works
curl https://api.vectormojo.com/api/v1/generate \
-H "Authorization: Bearer $BRUSH_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042-funnel" \
-d '{
"model": "brush-1.0-pro",
"prompt": "A timeline from 2020 to 2026, one milestone per year.",
"size": { "width": 1600, "height": 900 }
}' - Send
Idempotency-KeyonPOST /v1/generate. Use a new key for each new design, such as a UUID. - If VectorMojo already has a job with that key in your account, it returns that job: same id, no new job, no second charge.
- With
"sync": trueon the retry, VectorMojo waits for that first job as usual. - Keys belong to your account. Another account using the same key does not affect you.
Rules for the key
- 8 to 200 characters, printable ASCII, no spaces.
- A key that breaks these rules is ignored: the call runs as if you sent no key.
- VectorMojo does not compare request bodies. A used key with a different body still returns the first job.
- A used key stays used: it returns its job for as long as the job exists.
- A call refused before a job is made (for example
400,402or429) does not use up its key. Fix the cause and send it again with the same key.
Edit and export
POST /v1/edit honours Idempotency-Key the same way: the same key returns the first job
and is never charged twice.
POST /v1/export makes no job and costs nothing, so a retry is always safe.
Designs are AI-generated. Outputs can contain factual mistakes, so review every design before you use it.