POST /v1/svgs/vectorizations.
Examples below use arrow-preview. To discover model IDs available to your organization, call
GET /v1/models.
Set stream: true to receive reasoning, draft, and content Server-Sent Events while the SVG
is being produced.
Example
- Node.js SDK
- cURL
Preparing the image
Cropping the input image tightly to the subject usually improves output quality. Useauto_crop as a fallback when you can’t crop manually.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
model | string | — | Required. Model identifier (for example, arrow-preview). |
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 131072). |