Send a brief in plain English and receive a finished set of design files.
Looking for the generation and conversion API? View API Reference v1
Quick Navigation
The Design Agent works differently from the rest of the SVGMaker API. Instead of one call producing one image, you describe what you need and the agent plans the work, draws it, lays it out and exports it. You get back a single download holding every file it produced.
Because real design work takes minutes rather than milliseconds, the API is asynchronous. Every request returns immediately with a session id, and you collect the result by watching a stream or receiving a webhook.
https://agent.svgmaker.ioThis is a different host from the rest of the API, which lives at api.svgmaker.io.
Every request is authenticated with your API key in the x-api-key header. It is the same key you use for the rest of the SVGMaker API — create one in your account settings.
One endpoint starts everything. Send a brief and the turn begins immediately; omit the brief and you get an empty session you can post to later.
/v1/sessionsSend as multipart/form-data when attaching files, or JSON when not.
| Field | Type | Required | Description |
|---|---|---|---|
content | string | No | Your brief, in plain English. Omit it to create an idle session with no turn. |
files | file | No | A reference file. Repeat the field for each one, up to 20 per request. |
image | file | No | A reference image the agent should look at, up to 8. Images sent as files are picked up automatically, so this is rarely needed. |
callback_url | string | No | An HTTPS URL to receive the signed result when the turn finishes. |
title | string | No | A label for the session, for your own reference. |
The two URLs already carry a short-lived token, so they need no API key header. They expire, and every turn returns fresh ones.
Attach your own artwork and the agent designs around it — converting it, tracing it, resizing it, or matching its style in something new.
Three ways, all ending at the same download_url. Pick whichever fits your app.
Server-Sent Events, one message per stage. Best when a person is waiting.
Read stored events at your own pace. Pass ?afterSeq= to fetch only what is new.
/v1/sessions/{session_id}/eventsNothing to watch and nothing to poll. See below.
If you only want to know whether a session is still working, read the session rather than its events.
/v1/sessions/{session_id}Post to an existing session and the agent picks up where it left off, keeping everything it already made. Each turn is charged on its own.
/v1/sessions/{session_id}/eventsThe response carries a fresh stream_url and poll_url for the new turn. You can attach files and callback_url here too.
Send type: "user.interrupt" to stop work in flight. The reply tells you whether there was anything running to stop.
Removes the session and everything it produced, including the agent's working files.
/v1/sessions/{session_id}Add a callback_url to any request that starts a turn and the signed result is POSTed to your server when the work is done.
Generate a webhook secret in your account settings
Add callback_url when you start a turn
Verify the signature, then use the download_url
On a failed turn success is false, status is error and there is no download.
Every delivery carries webhook-id, webhook-timestamp and webhook-signature headers. Verify against the raw request body, before any JSON parsing.
callback_url must be HTTPS
A webhook secret is required, or nothing is delivered
Failed deliveries are retried a few times over about 95 seconds
A webhook covers one turn — send it again on each follow-up
Spending is usage based. A short job costs less than a long one, and every turn is capped, so a large brief can never run away with your balance.
Each completed event and webhook tells you what the turn cost and what is left:
You are not charged for the turn, and anything already taken during it is returned automatically. Your balance is checked before a session is created, so a request you cannot afford is refused with 402 rather than starting and stopping.
Buy credits on the pricing page. The same pack works across the whole SVGMaker API.
Errors carry a code and a sentence written for the person who will read it. A turn that fails after it has started reports the same pair on an error event rather than an HTTP status.
| Code | HTTP | Meaning |
|---|---|---|
UNAUTHORIZED | 401 | Invalid or missing API key |
PAID_ACCOUNT_REQUIRED | 403 | The account has no credit pack |
INSUFFICIENT_CREDITS | 402 | Balance too low to start a turn |
NOT_FOUND | 404 | No such session, or not yours |
INVALID_REQUEST | 400 | The request was not valid |
PAYLOAD_TOO_LARGE | 413 | The uploaded files are too large |
BUDGET_EXCEEDED | 400 | The design was too complex to finish in one turn |
TURN_LIMIT | 400 | The design needed more steps than one turn allows |
RATE_LIMIT_EXCEEDED | 429 | Too many requests |
CREDIT_SERVICE_UNAVAILABLE | 503 | Credits temporarily unavailable, retry shortly |
INTERNAL | 500 | Something went wrong on our side |
You can start 5 designs per minute per API key. Starting a new session and continuing an existing one share that budget, since both start a turn.
Going over returns 429 with a Retry-After header telling you how many seconds to wait.