SVG edit
Edits an input SVG from inline SVG markup or a remote/base64 SVG source.
POST
/v1/svgs/editsAuthorization
AuthorizationBearer token · headerrequiredAuthentication via Bearer token API key
Header parameters
x-trace-idstringOptional client-supplied trace identifier. The API echoes this value in `X-Trace-ID` and includes it in request logs for client-side correlation.
min length 1 · max length 256
Request body
requiredapplication/jsonOne of:
object
max_review_stepsintegerMaximum edit review and redo steps after the initial edit.
min 0 · max 5 · default: 0
modelstringrequiredModel identifier to use for editing.
min length 1
promptstringrequiredInstruction describing how to edit the source SVG.
min length 1 · max length 4000
reasoning_effortstringReasoning effort applied to this editing. When omitted, Arrow uses its default.
Allowed:
lowmediumhighxhighreference_imagesImageInputReference[] | nullOptional image references for the edit.
max items 4
Show propertiesHide properties
Array of
ImageInputReferenceAny of:
ImageInputReferenceUrl
urlstring<uri>requiredNetwork 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
base64stringrequiredBase64-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.
min length 1 · max length 16777216
settingsEditSettings | nullShow propertiesHide properties
max_output_tokensinteger | nullUpper bound for final edit output token count.
min 1 · max 65536
orchestrator_max_output_tokensinteger | nullOptional provider orchestrator token budget.
min 1 · max 65536
shallow_max_output_tokensinteger | nullOptional provider shallow edit token budget.
min 1 · max 65536
temperaturenumber | nullEdit sampling temperature.
min 0 · max 2
streambooleanWhen true, emits a Server-Sent Events stream.
default: false
svgstringrequiredInline SVG markup to edit.
min length 1 · max length 200000
svg_sourceanyobject
max_review_stepsintegerMaximum edit review and redo steps after the initial edit.
min 0 · max 5 · default: 0
modelstringrequiredModel identifier to use for editing.
min length 1
promptstringrequiredInstruction describing how to edit the source SVG.
min length 1 · max length 4000
reasoning_effortstringReasoning effort applied to this editing. When omitted, Arrow uses its default.
Allowed:
lowmediumhighxhighreference_imagesImageInputReference[] | nullOptional image references for the edit.
max items 4
Show propertiesHide properties
Array of
ImageInputReferenceAny of:
ImageInputReferenceUrl
urlstring<uri>requiredNetwork 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
base64stringrequiredBase64-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.
min length 1 · max length 16777216
settingsEditSettings | nullShow propertiesHide properties
max_output_tokensinteger | nullUpper bound for final edit output token count.
min 1 · max 65536
orchestrator_max_output_tokensinteger | nullOptional provider orchestrator token budget.
min 1 · max 65536
shallow_max_output_tokensinteger | nullOptional provider shallow edit token budget.
min 1 · max 65536
temperaturenumber | nullEdit sampling temperature.
min 0 · max 2
streambooleanWhen true, emits a Server-Sent Events stream.
default: false
svganysvg_sourceobjectrequiredShow propertiesHide properties
objectResponses
200When `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`.
createdintegerrequiredmin 0
creditsintegerCredit cost for fixed-credit models. Omitted for token-priced models, whose measured totals are returned in `usage`.
min 0
dataSvgDocument[]requiredmin items 1
Show propertiesHide properties
Array of
SvgDocumentmime_typestringrequiredAllowed:
image/svg+xmlsvgstringrequiredRaw SVG markup.
min length 1
idstringrequiredmin length 1
usageSvgUsageToken totals for token-priced models. Fixed-credit models use `credits` for billing and may report compatibility zeros here.
Show propertiesHide properties
input_tokensintegerrequiredMeasured token count for token-priced models. Fixed-credit models retain this field for compatibility and may report zero.
min 0
output_tokensintegerrequiredMeasured token count for token-priced models. Fixed-credit models retain this field for compatibility and may report zero.
min 0
total_tokensintegerrequiredMeasured token count for token-priced models. Fixed-credit models retain this field for compatibility and may report zero.
min 0
400Bad request – malformed body, missing required fields, or invalid parameter values.
codestringrequiredAllowed:
invalid_requestinvalid_api_keyunauthorizedfunding_payment_failedfunding_payment_method_requiredfunding_payment_action_requiredfunding_pendinginsufficient_creditsaccount_frozencontent_policy_violationmodel_not_foundpayload_too_largerequest_timeoutrate_limit_exceededoperation_rate_limit_exceededweekly_limit_exceededserver_errormodel_errormodel_unavailablemessagestringrequiredmin length 1
request_idstringrequiredmin length 1
retry_afterintegermin 0 · max 86400
statusintegerrequiredmin 400 · max 599
401Unauthorized – missing, malformed, revoked, otherwise invalid API credentials, or an organization that could not be resolved for billing.
codestringrequiredAllowed:
invalid_requestinvalid_api_keyunauthorizedfunding_payment_failedfunding_payment_method_requiredfunding_payment_action_requiredfunding_pendinginsufficient_creditsaccount_frozencontent_policy_violationmodel_not_foundpayload_too_largerequest_timeoutrate_limit_exceededoperation_rate_limit_exceededweekly_limit_exceededserver_errormodel_errormodel_unavailablemessagestringrequiredmin length 1
request_idstringrequiredmin length 1
retry_afterintegermin 0 · max 86400
statusintegerrequiredmin 400 · max 599
402Payment required – the organization has insufficient credits.
codestringrequiredAllowed:
invalid_requestinvalid_api_keyunauthorizedfunding_payment_failedfunding_payment_method_requiredfunding_payment_action_requiredfunding_pendinginsufficient_creditsaccount_frozencontent_policy_violationmodel_not_foundpayload_too_largerequest_timeoutrate_limit_exceededoperation_rate_limit_exceededweekly_limit_exceededserver_errormodel_errormodel_unavailablemessagestringrequiredmin length 1
request_idstringrequiredmin length 1
retry_afterintegermin 0 · max 86400
statusintegerrequiredmin 400 · max 599
403Forbidden – the account is frozen, the request is not allowed, or content policy rejected the request.
codestringrequiredAllowed:
invalid_requestinvalid_api_keyunauthorizedfunding_payment_failedfunding_payment_method_requiredfunding_payment_action_requiredfunding_pendinginsufficient_creditsaccount_frozencontent_policy_violationmodel_not_foundpayload_too_largerequest_timeoutrate_limit_exceededoperation_rate_limit_exceededweekly_limit_exceededserver_errormodel_errormodel_unavailablemessagestringrequiredmin length 1
request_idstringrequiredmin length 1
retry_afterintegermin 0 · max 86400
statusintegerrequiredmin 400 · max 599
404Not found – the requested model does not exist.
codestringrequiredAllowed:
invalid_requestinvalid_api_keyunauthorizedfunding_payment_failedfunding_payment_method_requiredfunding_payment_action_requiredfunding_pendinginsufficient_creditsaccount_frozencontent_policy_violationmodel_not_foundpayload_too_largerequest_timeoutrate_limit_exceededoperation_rate_limit_exceededweekly_limit_exceededserver_errormodel_errormodel_unavailablemessagestringrequiredmin length 1
request_idstringrequiredmin length 1
retry_afterintegermin 0 · max 86400
statusintegerrequiredmin 400 · max 599
408Request timeout – the request exceeded an allowed client-facing deadline.
codestringrequiredAllowed:
invalid_requestinvalid_api_keyunauthorizedfunding_payment_failedfunding_payment_method_requiredfunding_payment_action_requiredfunding_pendinginsufficient_creditsaccount_frozencontent_policy_violationmodel_not_foundpayload_too_largerequest_timeoutrate_limit_exceededoperation_rate_limit_exceededweekly_limit_exceededserver_errormodel_errormodel_unavailablemessagestringrequiredmin length 1
request_idstringrequiredmin length 1
retry_afterintegermin 0 · max 86400
statusintegerrequiredmin 400 · max 599
413Payload too large – the submitted prompt, image, or SVG input is too large.
codestringrequiredAllowed:
invalid_requestinvalid_api_keyunauthorizedfunding_payment_failedfunding_payment_method_requiredfunding_payment_action_requiredfunding_pendinginsufficient_creditsaccount_frozencontent_policy_violationmodel_not_foundpayload_too_largerequest_timeoutrate_limit_exceededoperation_rate_limit_exceededweekly_limit_exceededserver_errormodel_errormodel_unavailablemessagestringrequiredmin length 1
request_idstringrequiredmin length 1
retry_afterintegermin 0 · max 86400
statusintegerrequiredmin 400 · max 599
429Rate 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.
codestringrequiredAllowed:
invalid_requestinvalid_api_keyunauthorizedfunding_payment_failedfunding_payment_method_requiredfunding_payment_action_requiredfunding_pendinginsufficient_creditsaccount_frozencontent_policy_violationmodel_not_foundpayload_too_largerequest_timeoutrate_limit_exceededoperation_rate_limit_exceededweekly_limit_exceededserver_errormodel_errormodel_unavailablemessagestringrequiredmin length 1
request_idstringrequiredmin length 1
retry_afterintegermin 0 · max 86400
statusintegerrequiredmin 400 · max 599
500The request could not be completed. Please retry.
codestringrequiredAllowed:
invalid_requestinvalid_api_keyunauthorizedfunding_payment_failedfunding_payment_method_requiredfunding_payment_action_requiredfunding_pendinginsufficient_creditsaccount_frozencontent_policy_violationmodel_not_foundpayload_too_largerequest_timeoutrate_limit_exceededoperation_rate_limit_exceededweekly_limit_exceededserver_errormodel_errormodel_unavailablemessagestringrequiredmin length 1
request_idstringrequiredmin length 1
retry_afterintegermin 0 · max 86400
statusintegerrequiredmin 400 · max 599
502Bad gateway – model execution returned an invalid or failed response.
codestringrequiredAllowed:
invalid_requestinvalid_api_keyunauthorizedfunding_payment_failedfunding_payment_method_requiredfunding_payment_action_requiredfunding_pendinginsufficient_creditsaccount_frozencontent_policy_violationmodel_not_foundpayload_too_largerequest_timeoutrate_limit_exceededoperation_rate_limit_exceededweekly_limit_exceededserver_errormodel_errormodel_unavailablemessagestringrequiredmin length 1
request_idstringrequiredmin length 1
retry_afterintegermin 0 · max 86400
statusintegerrequiredmin 400 · max 599
503Service unavailable – model execution is temporarily unavailable.
codestringrequiredAllowed:
invalid_requestinvalid_api_keyunauthorizedfunding_payment_failedfunding_payment_method_requiredfunding_payment_action_requiredfunding_pendinginsufficient_creditsaccount_frozencontent_policy_violationmodel_not_foundpayload_too_largerequest_timeoutrate_limit_exceededoperation_rate_limit_exceededweekly_limit_exceededserver_errormodel_errormodel_unavailablemessagestringrequiredmin length 1
request_idstringrequiredmin length 1
retry_afterintegermin 0 · max 86400
statusintegerrequiredmin 400 · max 599
504Gateway timeout – model execution exceeded the server deadline.
codestringrequiredAllowed:
invalid_requestinvalid_api_keyunauthorizedfunding_payment_failedfunding_payment_method_requiredfunding_payment_action_requiredfunding_pendinginsufficient_creditsaccount_frozencontent_policy_violationmodel_not_foundpayload_too_largerequest_timeoutrate_limit_exceededoperation_rate_limit_exceededweekly_limit_exceededserver_errormodel_errormodel_unavailablemessagestringrequiredmin length 1
request_idstringrequiredmin length 1
retry_afterintegermin 0 · max 86400
statusintegerrequiredmin 400 · max 599
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "https://api.quiver.ai/v1/svgs/edits" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"max_review_steps": 2,
"model": "arrow-2",
"prompt": "Make the mark bolder and simplify the star points.",
"reasoning_effort": "medium",
"reference_images": [
{
"url": "https://example.com/uploads/reference1.png"
}
],
"settings": {
"max_output_tokens": 4096,
"orchestrator_max_output_tokens": 4096,
"shallow_max_output_tokens": 2048,
"temperature": 0.4
},
"stream": false,
"svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 2l8 20H4z\"/></svg>",
"svg_source": null
}'const response = await fetch("https://api.quiver.ai/v1/svgs/edits", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"max_review_steps": 2,
"model": "arrow-2",
"prompt": "Make the mark bolder and simplify the star points.",
"reasoning_effort": "medium",
"reference_images": [
{
"url": "https://example.com/uploads/reference1.png"
}
],
"settings": {
"max_output_tokens": 4096,
"orchestrator_max_output_tokens": 4096,
"shallow_max_output_tokens": 2048,
"temperature": 0.4
},
"stream": false,
"svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 2l8 20H4z\"/></svg>",
"svg_source": null
})
});import requests
response = requests.post(
"https://api.quiver.ai/v1/svgs/edits",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"max_review_steps": 2,
"model": "arrow-2",
"prompt": "Make the mark bolder and simplify the star points.",
"reasoning_effort": "medium",
"reference_images": [
{
"url": "https://example.com/uploads/reference1.png"
}
],
"settings": {
"max_output_tokens": 4096,
"orchestrator_max_output_tokens": 4096,
"shallow_max_output_tokens": 2048,
"temperature": 0.4
},
"stream": False,
"svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 2l8 20H4z\"/></svg>",
"svg_source": None
},
)Response
{
"created": 1704067200,
"credits": 1,
"data": [
{
"mime_type": "image/svg+xml",
"svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 2l8 20H4z\"/></svg>"
}
],
"id": "resp_01J9AZ3XJ7D5S9ZV2Q5Z8E1A4N",
"usage": {
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0
}
}{
"code": "invalid_request",
"message": "Invalid request parameters",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"status": 400
}{
"code": "unauthorized",
"message": "Unauthorized",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"status": 401
}{
"code": "insufficient_credits",
"message": "Insufficient credits",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"status": 402
}{
"code": "account_frozen",
"message": "Account is frozen",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"status": 403
}{
"code": "model_not_found",
"message": "Model not found",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"status": 404
}{
"code": "request_timeout",
"message": "Request timed out",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"status": 408
}{
"code": "payload_too_large",
"message": "Payload too large",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"status": 413
}{
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Please try again later.",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"status": 429
}{
"code": "server_error",
"message": "The request could not be completed. Please retry.",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"status": 500
}{
"code": "model_error",
"message": "The request could not be completed. Please retry.",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"status": 502
}{
"code": "model_unavailable",
"message": "The request could not be completed. Please retry.",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"status": 503
}{
"code": "request_timeout",
"message": "The request could not be completed. Please retry.",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"status": 504
}