Skip to content
VectorMojo

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.

FieldType and limitsWhat it does
promptstring, 1 to 8,000 charactersWhat the design should show, in plain words. Needed unless you send an image.
labelsarray of strings, up to 200Text 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.
imageobjectA picture to redraw as SVG: { "media_type", "data" }. See Image to SVG.
size{ width, height }, whole numbers 200 to 4,000Canvas size in pixels. Wins over aspect.
aspectstringOne of the aspects below. Default 16:10.
titlestring, up to 120 charactersName of the design. Default: the start of the prompt.
modelstringAPI name of a model: brush-1.0-lite or brush-1.0 or brush-1.0-pro. Default brush-1.0.
syncbooleantrue 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

aspectCanvas (px)
16:101200 × 750default
16:91200 × 675
4:31200 × 900
1:11080 × 1080
3:41080 × 1440
9:161080 × 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

FieldWhat it is
idThe job id.
typegenerate or edit.
statuspending, processing, completed, failed or cancelled.
stepOnly while processing: drawing or checking. Progress, not a promise of time.
modelAPI name of the model.
creditsThe price of this job. 0 when the job failed or was cancelled.
design_idThe design it made or changed. Set when the job is done.
versionThe version it made. Set when the job is done.
error{ code, message } when the job failed. See Errors.
created_at, finished_atISO 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 with timed_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

FieldWhat it is
id, titleThe design id and its name.
width, heightCanvas size in pixels.
current_versionThe newest version number.
versions[]Every version, oldest first.
versions[].promptThe prompt (or, for an edit, the instruction) that made it.
versions[].modelAPI name of the model that made it.
versions[].svgThe SVG text, cleaned and marked as AI-generated (below).
versions[].png_urlPath of a PNG preview on the API host. Needs your key. See PNG preview.
versions[].checksWhat VectorMojo checked (below).
created_at, updated_atISO 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 fieldMeaning
labelsLabels found / labels sent, for example "4/4". "0/0" when you sent none.
text_checkedtrue when the SVG is valid and safe, every label is there and all text is inside the canvas.
lookedtrue 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.