API
Make SVGs from your own code. Two endpoints, one answer shape.
Endpoints
POST https://amnt.io/api/v1/svg/generate words to SVG
POST https://amnt.io/api/v1/svg/vectorize picture to SVGSend your API key in the header: Authorization: Bearer amnt_sk_.... Make a key in Settings → API keys after you sign in.
Words to SVG
curl -X POST https://amnt.io/api/v1/svg/generate \
-H "Authorization: Bearer amnt_sk_..." \
-H "Content-Type: application/json" \
-d '{ "prompt": "a fox head logo, flat colours", "style": "flat", "formats": ["png", "pdf"] }'Picture to SVG
curl -X POST https://amnt.io/api/v1/svg/vectorize \
-H "Authorization: Bearer amnt_sk_..." \
-H "Content-Type: application/json" \
-d '{ "image": "https://example.com/logo.png", "colors": 2 }'image takes an https link, a data URI or plain base64, up to 10 MB.
Fields
| Field | Values |
|---|---|
prompt | 3 to 2000 characters (generate) |
image | Link, data URI or base64 (vectorize) |
style | auto, flat, icon, logo, illustration |
quality | standard, hd |
aspect | 1:1, 3:2, 2:3, 16:9, 9:16 |
background | transparent, keep |
detail | low, medium, high |
colors | 2 to 64 |
palette | Up to 64 hex colours, like #1a2b3c |
formats | svg, png, pdf, eps, dxf, icons, small |
png_width | 16 to 8192 |
The answer
{
"svg": "<svg ...>",
"url": "https://amnt.io/s/abc123.svg",
"files": { "png": "https://amnt.io/s/abc123.png" },
"width": 1024,
"height": 1024,
"price_usd": 0.03
}Errors
| Status | Meaning |
|---|---|
| 400 | A field is wrong. The message names it |
| 401 | Missing or wrong API key |
| 402 | Not enough Balance |
| 422 | The picture could not be read |
| 429 | Too many calls. Wait for Retry-After seconds |
| 5xx | Our side failed. You are refunded |
A failed call is never charged. Generating takes 15 to 60 seconds, so give your client a long timeout and do not retry on a timeout: a retry is a second call.