Image to SVG
Convert image inputs into production-ready SVG outputs.
Convert an image input into SVG via POST /v1/svgs/vectorizations.
Examples below use arrow-2. To discover model IDs available to your organization, call GET /v1/models. Arrow 2 handles most vectorization work; Arrow 2 Telos is better for detailed images where color, alignment, and fine structure need more fidelity.
Set stream: true to receive reasoning, draft, and content Server-Sent Events while the SVG is being produced.
Example
import { QuiverAI } from "@quiverai/sdk";
const client = new QuiverAI({
bearerAuth: process.env["QUIVERAI_API_KEY"],
});
const result = await client.vectorizeSVG.vectorizeSVG({
vectorizeSVGRequest: {
model: "arrow-2",
autoCrop: true,
image: {
url: "https://example.com/logo.png",
},
},
});curl --request POST \
--url https://api.quiver.ai/v1/svgs/vectorizations \
--header 'Authorization: Bearer <QUIVERAI_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"model": "arrow-2",
"auto_crop": true,
"image": {
"url": "https://example.com/logo.png"
}
}'Preparing the image
The App Prompt guide explains how vectorization differs from generating a new design with a reference image and what to inspect in the result.
Cropping the input image tightly to the subject usually improves output quality. Use auto_crop as a fallback when you can’t crop manually.
Image inputs can be provided as { url: "..." }, { base64: "..." }, or URL string shorthand. Direct base64 image payloads can be PNG, JPEG, WebP, GIF, or SVG. Decoded image inputs must be no larger than 12,582,912 bytes, 4096 x 4096 pixels, or 16,777,216 total pixels.
Image URLs must use HTTP or HTTPS, resolve to a public network target, and return an image content type. The API follows up to 3 redirects and applies the same decoded image limits after fetching.
For logos, icons, and most source images, arrow-2 is the right starting point. For complex illustrations, technical drawings, and other dense inputs where smaller details need to stay stable, use arrow-2-telos.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
model |
string | – | Required. Model identifier (for example, arrow-2 or arrow-2-telos). |
image |
object | string | – | Required. Input image as { url: "..." }, { base64: "..." }, or URL string shorthand. |
auto_crop |
boolean | false |
Automatically crop the image to the dominant subject before vectorization. |
target_size |
integer | – | Square resize target in pixels (128 to 4096). |
stream |
boolean | false |
When true, returns a Server-Sent Events stream with progressive rendering phases (reasoning, draft, content). |
temperature |
number | 1 for Arrow 2 |
Controls randomness (0 to 2). Lower values produce more deterministic output; higher values increase variety. |
top_p |
number | 1 for Arrow 2 |
Nucleus sampling (greater than 0 and at most 1). Lower values make output more focused. |
presence_penalty |
number | 0 for Arrow 2 |
Penalizes tokens already present in prior output (-2 to 2). Positive values encourage the model to explore new patterns. |
max_output_tokens |
integer | – | Upper bound for output token count (1 to 65536). |
For native SVG vectorization, Arrow 2 supports temperature, top_p, and presence_penalty. Arrow 2 Telos does not support any of them. Omit all three keys when using arrow-2-telos; an explicit default value or null is rejected with HTTP 400. Check supported_sampling_parameters in GET /v1/models for the selected model. Responses requests have their own sampling rules.