API documentation
Integrate Vectorgram into your application. Jobs are asynchronous: you submit with one endpoint, poll with another and download with a third. Base URL https://api.vectorgram.ai, authentication is Authorization: Bearer <api_key>. Keys look like vectorgram_sk_live_…. The prefix is spelled out on purpose, so a key found in an old .env can be identified without being tried.
The API starts on Pro, and calls draw on the plan's monthly allowance. There is no trial: to see the result on your own image first, use the demo on the home page. There is no overage: once the allowance is used up, calls return 402 with the reset date. GET /v1/account reports every allowance and what is left of each.
Quick start
1. Get your API key
Loading…
2. Submit an image
curl -X POST https://api.vectorgram.ai/v1/vectorize \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: 8f1b0c2e-0a1d-4f77-9c3a-2b6e5d4c1a90" \
-F "file=@image.png" \
-F "detail=high" \
-F "gradients=smooth" \
-F "smoothing=strong" \
-F "retention=24h"The response is 202 Accepted with a queued job; the conversion hasn't happened yet. Sending the same request twice with one Idempotency-Key returns the first job instead of creating a second; changing the file or the settings under a key already used is a 409.
3. Poll, or use a webhook
GET /v1/jobs/job_abc123
{
"id": "job_abc123",
"status": "queued",
"progress": 0,
"queue_position": 3,
"mode": "logo",
"retention": "24h",
"megapixels": 2.1,
"created_at": "2026-08-03T10:30:00Z"
}status walks queued → processing → completed | failed | canceled | expired. While queued you get a real queue_position rather than an invented countdown; progress during processing is interpolated from the size estimate and caps at 95% until the file exists. Large images can take minutes, so poll at a sensible interval or, better, register a webhook.
4. Download
{
"id": "job_abc123",
"status": "completed",
"progress": 100,
"download_url": "https://api.vectorgram.ai/v1/jobs/job_abc123/download",
"completed_at": "2026-08-03T10:30:04Z",
"expires_at": "2026-08-04T10:30:04Z"
}download_url appears only once a result exists, needs the same bearer token, and streams the file as an attachment. With retention=none the file is deleted as it is served, so you can download it only once.
Conversion parameters
All fields are multipart form data on POST /v1/vectorize. The four marked manual are the trace controls, available on every plan with API access. Without a paid plan, any value other than the default answers 402 custom_params_not_included; leave the fields out (or send the defaults) and the conversion runs on the automatic settings.
Required. The image to convert. Its format is taken from the content, not the filename.
Optional; default svg. eps and pdf are included from Pro up and are real vector files, not an SVG in another wrapper. Below Pro, eps and pdf answer 402 output_format_not_included. PDF keeps transparency. EPS can't hold partial transparency, so alpha=keep with eps and no matte answers 400 export_incompatible, as does trace_style=centerline with either. Any other value is refused with 400 unsupported_output_format.
Only with eps or pdf; default false. Smooth color transitions are written as a gradient mesh, so a field that changes in two directions is one shape instead of several gradients that can show seams. Adobe Illustrator opens it as an editable mesh; other editors show the same picture, but without this mesh. A file that comes out with mesh counts against your plan's monthly mesh allowance (Pro 100, Studio 500, Agency 2000, individual plans by contract), shared with the browser; a file without mesh costs nothing. GET /v1/account shows what is left in mesh_quota.
How long the result is kept. Default 24h; none deletes it after the first download. A value above your plan's maximum is clamped to it, not rejected: asking for 10d on Pro still keeps the result for 3 days at most.
Your own grouping key, echoed back on the job and usable as a filter. Submit one request per image. Batch conversion starts on Pro (30 files, 50 on Studio, 100 on Agency); below it the group holds one file and a second answers 400 batch_limit_exceeded.
The name of the dashboard folder that holds the batch's files. Optional; requires batch_id (400 invalid_folder_name otherwise). Same limits as batch_id: 128 characters, no control characters. The first file admitted names the folder, and later files in the batch don't rename it. If omitted, the folder is named after its creation date.
How much fine detail is kept. Default high, which keeps the most. A 1–100 slider value is accepted and bucketed.
Gradient handling. Default smooth; stepped and auto give flat fills.
Corner rounding. Default strong. A 0–100 slider value is accepted and bucketed.
What the drawing is made of. Default fill: every shape is a filled outline. centerline draws one open stroke along the middle of each line (fill="none", with a stroke color and width), which is what plotters, laser engravers, CNC routers and vinyl cutters follow: one pass per line instead of two outlines around it. Parts too thick to be a line do not stay filled: each becomes one thick stroke along its middle, so artwork with solid areas is better traced with fill. detail, gradients and smoothing do not apply and are ignored. An unknown value answers 400.
Optional; default regular, which converts every kind of image as it is. drawing is for plans, technical drawings, schematics, line art and sketches with crisp lines, and their scans: the picture is redrawn in one black ink on white paper before it is traced, so yellowed paper comes back white, gray or faded lines come back black and even, and most scan dirt drops out. Color, pencil shading and gray fills are not kept. A blueprint (light lines on dark paper) is turned the usual way round. Every plan, at the price of any other conversion. Fill trace only: with trace_style=centerline the field is ignored. drawing applies to images up to about 2.6 megapixels; a larger one converts as regular. The job's picture_type says what was applied, so a delivered job that converted as regular says regular. GET /v1/account lists the values available to you in picture_types; a value not listed there converts as regular. An unknown value answers 400.
Optional; default stacked: shapes lie on each other, a large one running whole under those drawn on it, so a browser shows no light seams between colors. flat makes every visible area one shape with nothing underneath: letter holes are real holes, so deleting the white leaves them open, and print separations get no ink under ink. The price: each edge between two colors is in the file twice, once in each shape (a laser that cuts every path burns it twice), and thin light lines may show between colors in a browser. Any output format; with trace_style=centerline the field is ignored. The job's geometry says what was applied. An unknown value answers 400 unsupported_geometry.
Endpoints
The generated reference, with every field and response shape, is the Swagger UI the service serves at /docs/swagger, with the OpenAPI document at /v3/api-docs.
Webhooks
Jobs run asynchronously and can take minutes for large files, so subscribe to webhooks instead of polling. Register an endpoint with POST /v1/webhooks; the signing secret is returned once, at creation, and never again.
POST https://your-app.example/hooks/vectorgram
X-Vectorgram-Event: processing.completed
X-Vectorgram-Signature: sha256=<hmac of the raw body, hex>
{
"id": "evt_9f2c…",
"event": "processing.completed",
"created_at": "2026-08-03T10:30:04Z",
"data": { "job_id": "job_abc123", "status": "completed" }
}Verify the signature by computing HMAC-SHA256 of the raw request body with your endpoint secret and comparing it in constant time. Treat a mismatch as an unauthenticated request. Delivery is at least once: a non-2xx response is retried three times with exponential backoff, so make your handler idempotent on id. Endpoints must resolve to a public address. This is checked again at delivery time, not only at registration.
Errors
Failures are JSON: { "error": { "code": "…", "message": "…", "details": { … } } }. Read code, not the message. Messages get reworded.