Skip to content
Esc
navigateopen⌘Jpreview
On this page

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-1.1. To discover model IDs available to your organization, call GET /v1/models. Arrow 1.1 is the default choice for most vectorization tasks; Arrow 1.1 Max 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({
  model: "arrow-1.1",
  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-1.1",
    "auto_crop": true,
    "image": {
      "url": "https://example.com/logo.png"
    }
  }'

Preparing the image

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: "..." } or { base64: "..." }. 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-1.1 is the right starting point. For complex illustrations, technical drawings, and other dense inputs where smaller details need to stay stable, use arrow-1.1-max.

Parameters

Parameter Type Default Description
model string Required. Model identifier (for example, arrow-1.1 or arrow-1.1-max).
image object Required. Input image as { url: "..." } or { base64: "..." }.
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 Controls randomness (0 to 2). Lower values produce more deterministic output; higher values increase variety.
top_p number 1 Nucleus sampling (0 to 1). Limits token selection to the smallest set whose cumulative probability exceeds this value. Lower values make output more focused.
presence_penalty number 0 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).

Was this page helpful?