Docs
Generate
POST /v1/generate makes a new design from a prompt, an image, or both. It always answers 202 with a job.
curl https://api.vectormojo.com/api/v1/generate \
-H "Authorization: Bearer $BRUSH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "brush-1.0",
"prompt": "A funnel with four stages, top to bottom.",
"labels": ["Awareness", "Consideration", "Conversion", "Loyalty"],
"aspect": "16:10",
"sync": true
}' Fields
Send at least a prompt or an image. Fields not listed here are ignored.
| Field | Type and limits | What it does |
|---|---|---|
prompt | string, 1 to 8,000 characters | What the design should show, in plain words. Needed unless you send an image. |
labels | array of strings, up to 200 | Text that must appear exactly, letter for letter. Each label is 1 to 400 characters and cannot be blank. Runs of spaces count as one space. |
image | object | A picture to redraw as SVG: { "media_type", "data" }. See Image to SVG. |
size | { width, height }, whole numbers 200 to 4,000 | Canvas size in pixels. Wins over aspect. |
aspect | string | One of the aspects below. Default 16:10. |
title | string, up to 120 characters | Name of the design. Default: the start of the prompt. |
model | string | API name of a model: brush-1.0-lite or brush-1.0 or brush-1.0-pro. Default brush-1.0. |
sync | boolean | true waits for the finished design. Default false: you get the job and poll it. |
The whole request body can be up to 8 MB.
Aspects
aspect | Canvas (px) | |
|---|---|---|
16:10 | 1200 × 750 | default |
16:9 | 1200 × 675 | |
4:3 | 1200 × 900 | |
1:1 | 1080 × 1080 | |
3:4 | 1080 × 1440 | |
9:16 | 1080 × 1920 |
Headers
Idempotency-Key (optional): send the same key again and you get the first job back, never a second
charge. See Idempotency.
Sync or poll
Without sync (default)
The response comes at once with the job, usually pending:
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 }
}' HTTP/1.1 202 Accepted
{
"job": {
"id": "6745c0a1e4b0c2a9d1f3b7e2",
"type": "generate",
"status": "pending",
"model": "brush-1.0-pro",
"credits": 40,
"created_at": "2026-11-25T14:02:11.000Z"
}
} Then ask for the job every few seconds:
curl https://api.vectormojo.com/api/v1/jobs/6745c0a1e4b0c2a9d1f3b7e2 \
-H "Authorization: Bearer $BRUSH_API_KEY" {
"job": {
"id": "6745c0a1e4b0c2a9d1f3b7e2",
"type": "generate",
"status": "processing",
"step": "drawing",
"model": "brush-1.0-pro",
"credits": 40,
"created_at": "2026-11-25T14:02:11.000Z"
}
}
When status is completed, read the design with GET /v1/designs/:design_id.
When it is failed, read error; you were not charged.
With "sync": true
VectorMojo holds the request open until the job ends, for up to 170 seconds. If the job ends in time, the response holds
the job and the finished design. If not, you get the job as it is then (pending or
processing); poll it as above. The status code is 202 in both cases.
HTTP/1.1 202 Accepted
{
"job": {
"id": "6745c0a1e4b0c2a9d1f3b7e2",
"type": "generate",
"status": "completed",
"model": "brush-1.0",
"credits": 20,
"design_id": "6745c0a1e4b0c2a9d1f3b7e3",
"version": 1,
"created_at": "2026-11-25T14:02:11.000Z",
"finished_at": "2026-11-25T14:02:52.000Z"
},
"design": {
"id": "6745c0a1e4b0c2a9d1f3b7e3",
"title": "A funnel with four stages, top to bottom.",
"width": 1200,
"height": 750,
"current_version": 1,
"versions": [
{
"version": 1,
"prompt": "A funnel with four stages, top to bottom.",
"model": "brush-1.0",
"svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" ...><metadata id=\"brush-provenance\">...</metadata>...</svg>",
"png_url": "/api/v1/files/6745c0b8e4b0c2a9d1f3b7e4",
"checks": { "labels": "4/4", "text_checked": true, "looked": true },
"created_at": "2026-11-25T14:02:52.000Z"
}
],
"created_at": "2026-11-25T14:02:52.000Z",
"updated_at": "2026-11-25T14:02:52.000Z"
}
} The job object
| Field | What it is |
|---|---|
id | The job id. |
type | generate or edit. |
status | pending, processing, completed, failed or cancelled. |
step | Only while processing: drawing or checking. Progress, not a promise of time. |
model | API name of the model. |
credits | The price of this job. 0 when the job failed or was cancelled. |
design_id | The design it made or changed. Set when the job is done. |
version | The version it made. Set when the job is done. |
error | { code, message } when the job failed. See Errors. |
created_at, finished_at | ISO 8601 times, UTC. |
- A job that waits in the queue for more than about 7 minutes fails with
queue_timeout. One that runs for more than about 12 minutes fails withtimed_out. Neither is charged. - Up to 5 of your jobs run at the same time. More wait in the queue.
- There is no call to cancel a job yet.
The design object
| Field | What it is |
|---|---|
id, title | The design id and its name. |
width, height | Canvas size in pixels. |
current_version | The newest version number. |
versions[] | Every version, oldest first. |
versions[].prompt | The prompt (or, for an edit, the instruction) that made it. |
versions[].model | API name of the model that made it. |
versions[].svg | The SVG text, cleaned and marked as AI-generated (below). |
versions[].png_url | Path of a PNG preview on the API host. Needs your key. See PNG preview. |
versions[].checks | What VectorMojo checked (below). |
created_at, updated_at | ISO 8601 times, UTC. |
Checks
Before a design reaches you, VectorMojo checks it in code:
- the SVG is valid;
- it holds no scripts, no embedded web content and no outside links;
- every label you sent is there, letter for letter, as many times as you sent it (a label may be split over two or three lines);
- all text sits inside the canvas;
- the SVG renders to a picture.
VectorMojo also looks at the rendered picture. If a check or the look finds a problem, VectorMojo repairs the design once and
checks again. A design that still fails is not returned: the job fails with design_failed_checks and is
not charged.
checks field | Meaning |
|---|---|
labels | Labels found / labels sent, for example "4/4". "0/0" when you sent none. |
text_checked | true when the SVG is valid and safe, every label is there and all text is inside the canvas. |
looked | true when VectorMojo looked at the rendered picture and found no problem. |
The checks prove the text is there and fits. They cannot prove a fact is right: a label can be in the wrong place, and anything VectorMojo adds can be wrong. Review every design before you use it.
The AI-generated marker
Every SVG that leaves VectorMojo is cleaned and carries a machine-readable marker as the first child of the root element:
<metadata id="brush-provenance">
<brush:provenance xmlns:brush="urn:brush:provenance:1" generator="VectorMojo"
model="Brush 1.0" ai-generated="true"
digital-source-type="http://cv.iptc.org/newscodes/digitalsourcetype/trainedAlgorithmicMedia"/>
</metadata> Please keep it in files you publish.
Price
One generate costs the model's price per image: brush-1.0-lite 5 credits, brush-1.0 20 credits, brush-1.0-pro 40 credits. The credits are taken when the job is accepted and given back if it fails. If your balance is too low, the call
gets 402 insufficient_credits and no job is made. See Models and prices.
Designs are AI-generated. Outputs can contain factual mistakes, so review every design before you use it.