The API
Two endpoints, four ways to pay, one response shape.
Endpoints
POST /api/v1/svg/generate prompt to SVG
POST /api/v1/svg/vectorize image to SVGBase URL: https://www.amnt.io
Auth: Authorization: Bearer amnt_sk_...
The four doors
The same two endpoints, four ways in. Same engine, same price, same output.
| Door | Who | How it pays |
|---|---|---|
| API key | Developers | Balance, billed per call |
| x402 | Machines | USDC per call, no account |
| MCP | Assistants | Balance, via svg_generate / svg_vectorize |
| Studio | People | Balance, with a try box that is free to test |
x402
Three fixed-price endpoints, because an x402 route carries one price and a Bazaar listing shows one number:
| Endpoint | Price |
|---|---|
svg-vectorize | $0.01 |
svg-generate | $0.03 |
svg-generate-hd | $0.08 |
Object layers and wide HD are API-key only. A per-call add-on cannot ride a fixed-price route, and a call that asks for them here is refused before settlement, so it costs nothing.
MCP
Two tools, visible to every key regardless of its agent scope:
svg_generatesvg_vectorize
The tools return the link, the extra files, the size and the score, not the
markup itself. A trace runs 100 to 500 KB and would fill a chat window. Pass
include_svg: true if you really want it inline.
Response
{
"svg": "<svg ...>",
"url": "https://www.amnt.io/s/abc123.svg",
"files": { "png": "https://www.amnt.io/s/abc123.png" },
"width": 1024,
"height": 1024,
"paths": 812,
"colors": 24,
"bytes": 231904,
"layers": [{ "id": "hat", "fill": ["#181615"] }],
"score": 0.97,
"cost_usd": 0.03,
"ms": 14200
}Headers: X-RateLimit-Remaining on success, Retry-After on 429.
Timeouts
Generation draws for 15 to 60 seconds. The route allows 300. If your client
cannot hold a connection that long, treat a timeout as "still running" and poll
url rather than retrying, because a retry is a second paid call.
Rate limits
Per key, set when the key is created. A 429 carries Retry-After in seconds.
Errors
| Status | Meaning |
|---|---|
| 400 | Bad field. The message names it and lists the allowed values |
| 401 | Missing or invalid key |
| 402 | Not enough Balance |
| 422 | Image unreadable, or the URL was refused by the outbound guard |
| 429 | Rate limited, or the image model is busy |
| 5xx | Upstream failure. Refunded |
SDKs
There is no package yet. The three snippets in the quickstart cover curl, JavaScript and Python, and that is genuinely all the client code this API needs.
Security notes
- An
imageURL is resolved server-side and checked against a private-address guard before it is fetched. - SVG is a document, not an image. Every file is served with a restrictive content security policy.
- Your key is not logged, and prompts are not retained beyond the call.