---
title: "SVG edit"
method: POST
path: "/v1/svgs/edits"
tags: ["Edit SVG"]
---

# SVG edit

`POST /v1/svgs/edits`

## Request

- Base URL: `https://api.quiver.ai`
- URL: `https://api.quiver.ai/v1/svgs/edits`
- Auth: HTTP bearer

Edits an input SVG from inline SVG markup or a remote/base64 SVG source.

## Headers

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

## Request body

- union: SVG edit request with exactly one non-null source.
  - object
    - `max_review_steps` integer: Maximum edit review and redo steps after the initial edit.
    - `model` string, required: Model identifier to use for editing.
    - `prompt` string, required: Instruction describing how to edit the source SVG.
    - `reasoning_effort` 'low' | 'medium' | 'high' | 'xhigh': Reasoning effort applied to this editing. When omitted, Arrow uses its default.
    - `reference_images` ImageInputReferenceInput[], nullable: Optional image references for the edit.
      - union: Image input reference. Accepts `{ url }`, `{ base64 }`, or URL string shorthand. The same URL safety and decoded image limits apply to every form.
        - ImageInputReferenceUrl
          - `url` string, uri, required: Network image URL. Only http/https URLs are allowed. The API fetches the URL, follows up to 3 redirects, blocks private or reserved network targets, requires an image response content type, and applies the same decoded image limits as base64 inputs.
        - ImageInputReferenceBase64
          - `base64` string, required: Base64-encoded image payload. Decoded images must be no larger than 12582912 bytes, 4096x4096 pixels, or 16777216 total pixels. Accepted direct media types: image/png, image/jpeg, image/webp, image/gif, image/svg+xml.
        - string, uri: String shorthand for a network image URL. Equivalent to `{ "url": "..." }`. The same URL safety and decoded image limits apply.
    - `settings` EditSettings, nullable
      - `max_output_tokens` integer, nullable: Upper bound for final edit output token count.
      - `orchestrator_max_output_tokens` integer, nullable: Optional provider orchestrator token budget.
      - `shallow_max_output_tokens` integer, nullable: Optional provider shallow edit token budget.
      - `temperature` number, nullable: Edit sampling temperature.
    - `stream` boolean: When true, emits a Server-Sent Events stream.
    - `svg` string, required: Inline SVG markup to edit.
    - `svg_source` unknown
  - object
    - `max_review_steps` integer: Maximum edit review and redo steps after the initial edit.
    - `model` string, required: Model identifier to use for editing.
    - `prompt` string, required: Instruction describing how to edit the source SVG.
    - `reasoning_effort` 'low' | 'medium' | 'high' | 'xhigh': Reasoning effort applied to this editing. When omitted, Arrow uses its default.
    - `reference_images` ImageInputReferenceInput[], nullable: Optional image references for the edit.
      - union: Image input reference. Accepts `{ url }`, `{ base64 }`, or URL string shorthand. The same URL safety and decoded image limits apply to every form.
        - ImageInputReferenceUrl
          - `url` string, uri, required: Network image URL. Only http/https URLs are allowed. The API fetches the URL, follows up to 3 redirects, blocks private or reserved network targets, requires an image response content type, and applies the same decoded image limits as base64 inputs.
        - ImageInputReferenceBase64
          - `base64` string, required: Base64-encoded image payload. Decoded images must be no larger than 12582912 bytes, 4096x4096 pixels, or 16777216 total pixels. Accepted direct media types: image/png, image/jpeg, image/webp, image/gif, image/svg+xml.
        - string, uri: String shorthand for a network image URL. Equivalent to `{ "url": "..." }`. The same URL safety and decoded image limits apply.
    - `settings` EditSettings, nullable
      - `max_output_tokens` integer, nullable: Upper bound for final edit output token count.
      - `orchestrator_max_output_tokens` integer, nullable: Optional provider orchestrator token budget.
      - `shallow_max_output_tokens` integer, nullable: Optional provider shallow edit token budget.
      - `temperature` number, nullable: Edit sampling temperature.
    - `stream` boolean: When true, emits a Server-Sent Events stream.
    - `svg` unknown
    - `svg_source` union, required
      - object: Remote or base64-encoded SVG source to edit.
        - `url` string, uri, required: Network SVG URL. Only http/https URLs are allowed.
      - object: Remote or base64-encoded SVG source to edit.
        - `base64` string, required: Base64-encoded SVG payload.

## Response `200`

When `stream` is false, returns `application/json` with the edited SVG. When `stream` is true, returns Server-Sent Events ending with `data: [DONE]`. Token-priced models report measured totals in `usage` and omit `credits`. Fixed-credit models retain compatibility token totals of `0` and report `credits`.

- SvgResponse
  - `created` integer, required
  - `credits` integer: Credit cost for fixed-credit models. Omitted for token-priced models, whose measured totals are returned in `usage`.
  - `data` SvgDocument[], required: The complete returned SVG documents. The array length is the authoritative output count.
    - `mime_type` 'image/svg+xml', required
    - `svg` string, required: Raw SVG markup.
  - `id` string, required
  - `usage` SvgUsage: Token totals for token-priced models. Fixed-credit models use `credits` for billing and may report compatibility zeros here.
    - `input_tokens` integer, required: Measured token count for token-priced models. Fixed-credit models retain this field for compatibility and may report zero.
    - `output_tokens` integer, required: Measured token count for token-priced models. Fixed-credit models retain this field for compatibility and may report zero.
    - `total_tokens` integer, required: Measured token count for token-priced models. Fixed-credit models retain this field for compatibility and may report zero.

## Other responses

- `400`: Bad request – malformed body, missing required fields, or invalid parameter values.
- `401`: Unauthorized – missing, malformed, revoked, otherwise invalid API credentials, or an organization that could not be resolved for billing.
- `402`: Payment required – the organization has insufficient credits, or a funding payment has not settled.
- `403`: Forbidden – the account is frozen, the request is not allowed, or content policy rejected the request.
- `404`: Not found – the requested model does not exist, or the endpoint path and method are not served.
- `408`: Request timeout – the request exceeded an allowed client-facing deadline.
- `413`: Payload too large – the submitted prompt, image, or SVG input is too large.
- `415`: Unsupported media type – the request body arrived without a JSON `Content-Type`, so it could not be read.
- `429`: Rate limit exceeded – request throughput or measured input/output token usage exhausted a binding ceiling. `operation_rate_limit_exceeded` identifies operation throughput; `rate_limit_exceeded` covers overall request and token rates. `X-RateLimit-Dimension` names the exact dimension. When `Retry-After` is present, retry after the indicated period.
- `500`: The request could not be completed. Please retry.
- `502`: Bad gateway – model execution returned an invalid or failed response.
- `503`: Service unavailable – model execution is temporarily unavailable.
- `504`: Gateway timeout – model execution exceeded the server deadline.

## Changes

- **2026-10-25** `7733c6a9d212`: 1 breaking, 1 info
  - added `subschema #2, subschema #3, subschema #4, subschema #5` to the response body `oneOf` list for the response status `200` (media type: text/event-stream)
  - removed `subschema #2, subschema #3, subschema #4, subschema #5` from the response body `oneOf` list for the response status `200` (media type: text/event-stream)
- **2026-10-16** `150a31df1adb`: 1 breaking, 1 info
  - removed `subschema #1, subschema #2` from the request body `oneOf` list
  - added `subschema #1, subschema #2` to the request body `oneOf` list
- **2026-09-30** `b2283e5339fe`: 14 warning
  - the optional response header `x-quiver-zero-data-retention` removed for the status `200`
  - the optional response header `x-quiver-zero-data-retention` removed for the status `400`
  - the optional response header `x-quiver-zero-data-retention` removed for the status `401`
  - the optional response header `x-quiver-zero-data-retention` removed for the status `402`
  - …10 more
- **2026-09-25** `4d02d06a13b8`: 1 breaking, 2 info
  - removed `subschema #1, subschema #2` from the request body `oneOf` list
  - added `subschema #1, subschema #2` to the request body `oneOf` list
  - added the non-success response with the status `415`
- …earlier changes not shown

[Operation history](https://skmtc.dev/quiver/apis/quiverai-api/changes/v1/svgs/edits/post.md)

---

[API](https://skmtc.dev/quiver/apis/quiverai-api.md) - [All operations](https://skmtc.dev/quiver/apis/quiverai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/quiver/apis/quiverai-api/revisions/5db9b140be5c?raw)
