Create SVGs

Generates one or more SVGs from a prompt and optional references.

post/v1/svgs/generations

Request

  • Base URL
    https://api.quiver.ai
  • Auth
    HTTP bearer

Headers

x-trace-idstring

Optional client-supplied trace identifier. The API echoes this value in X-Trace-ID and includes it in request logs for client-side correlation.

Example:trace_01J9AZ3XJ7D5S9ZV2Q5Z8E1A4N

Request body

max_output_tokensinteger

Upper bound for output token count.

modelstring required

Model identifier to use for generation or vectorization.

presence_penaltynumber nullable

Penalizes tokens already present in output. On native SVG conversion, Arrow 2 defaults to 0 when omitted. Arrow 2 Telos rejects any supplied value, including 0 or null, with HTTP 400; omit this field for Telos.

streamboolean

When true, emits a Server-Sent Events stream.

temperaturenumber nullable

Controls native SVG sampling randomness. Arrow 2 defaults to 1 when omitted. Arrow 2 Telos rejects any supplied value, including 1 or null, with HTTP 400; omit this field for Telos.

top_pnumber nullable

Controls native SVG nucleus sampling. Must be greater than 0 and at most 1. Arrow 2 defaults to 1 when omitted. Arrow 2 Telos rejects any supplied value, including 1 or null, with HTTP 400; omit this field for Telos.

instructionsstring

Additional style or formatting guidance.

ninteger

Requested number of outputs. For token-priced models, the planner may resolve a different output count from the prompt; the response data length is authoritative.

promptstring required

Primary text prompt that describes the desired SVG.

reasoning_effort'low' | 'medium' | 'high' | 'xhigh'

Reasoning effort applied to this generation. When omitted, Arrow uses its default.

Example request

{
  "attributes": {
    "viewBox": {
      "height": 512,
      "width": 512
    }
  },
  "max_output_tokens": 4096,
  "presence_penalty": 0.2,
  "temperature": 0.4,
  "top_p": 0.95,
  "instructions": "Use a flat monochrome style with clean geometry.",
  "n": 1,
  "prompt": "Generate an icon of a unicorn",
  "reasoning_effort": "medium",
  "references": [
    {
      "url": "https://example.com/uploads/reference1.png"
    }
  ]
}

Response

When stream is false, returns application/json with the full SVG response. When stream is true, returns text/event-stream with Server-Sent Events. Each SSE message contains an event: line (generating, reasoning, draft, or content) and a data: line with a JSON payload. Multi-output responses may interleave events across outputs, whether selected by the request count or resolved by a token-priced model; each output keeps a stable data.id, and data.index indicates the output position. Token-priced models report measured totals in usage and omit credits. Fixed-credit models retain compatibility token totals of 0 and report credits; for streaming, fixed credits are emitted on completed content events. The stream terminates with data: [DONE].

createdinteger required
creditsinteger

Credit cost for fixed-credit models. Omitted for token-priced models, whose measured totals are returned in usage.

idstring required

Example response

{
  "created": 1704067200,
  "credits": 1,
  "data": [
    {
      "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 2l8 20H4z\"/></svg>"
    }
  ],
  "id": "resp_01J9AZ3XJ7D5S9ZV2Q5Z8E1A4N"
}

Changes

    • breaking

      added subschema #2 subschema #3 subschema #4 subschema #5 to the response body oneOf list for the response status (media type: text/event-stream)

    • info

      removed subschema #2 subschema #3 subschema #4 subschema #5 from the response body oneOf list for the response status (media type: text/event-stream)

    • warning

      the request property's maxLength was set to 10000