POST /v1/svgs/generations.
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.
Examples
Calligraphy
Prompt: “Elegant calligraphic script in a flowing hand-lettered style, single continuous stroke”- Node.js SDK
- cURL
Illustration
Prompt: “Japanese crane in traditional woodblock illustration style with warm earth tones”Logo
Prompt: “Heraldic lion crest with ornate medieval style details and gold gradient accents”Writing prompts
Include these elements for the best results:- Subject: What is in the image? Be specific. For example, “a logo for an eco-friendly coffee company”.
- Style: What is the overall aesthetic? For example, “line art”, “hand drawn”, “duotone”, or “flat monochrome icon”.
- Color palette: Which colors should be used? For example, “background: #e9edc9 and logo in #fb8500”.
- Composition: Include framing details like “centered icon” or “wide horizontal logo”.
- Text integration: Clearly state what text should appear and how. For example, “The headline ‘URBAN EXPLORER’ in bold white sans-serif at the top”.
instructions parameter to provide separate style or formatting guidance without mixing it into the prompt.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
model | string | — | Required. Model identifier (for example, arrow-preview). |
prompt | string | — | Required. Text description of the desired SVG. |
instructions | string | — | Additional style or formatting guidance, separate from the prompt. |
references | array | — | Up to 4 reference images, provided by URL or base64, to guide generation. |
n | integer | 1 | Number of outputs to generate (1 to 16). |
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). |