VECTRA / API REFERENCE

API documentation

From the first request to stable online. Access instructions consistent with the current v1 interface.

01 / QUICKSTART

Quick start

Use the website account to activate the API service and create a key. The API uses the asynchronous task protocol:Submit image → Check status → Download SVG. received 202 only means that it has been received, but does not mean that the conversion is completed.

01 POST /tasksSave taskId→02 GET /tasks/{id}Waiting for succeeded→03 GET /…/resultSave SVG file
BASE URLhttps://svgo-api.com/openapi/v1Bearer v1

Prepare environment variables

Shell access configuration
export API_BASE_URL='https://svgo-api.com/openapi/v1'
export API_KEY='YOUR_API_KEY'
# Use one key per business task. Keep it for retries; use a new key for a new image.
export IDEMPOTENCY_KEY='your-business-request-0001'

The keys in the example are placeholders. Each new business task generates a unique idempotent key, and the original key and original image are retained when the original task is retried. Use first GET /capabilities Check acceptsTasks, do not submit images before it is open.

Submit and save the task

cURL creation task
curl --fail-with-body -sS "$API_BASE_URL/tasks" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -F 'image=@image.png' \
  -o task.json

# Requires jq. Save the taskId from task.json.
TASK_ID=$(jq -r '.taskId // empty' task.json)
cat task.json
Sample response 202 application/json
{
  "taskId": "6dd39862-bec8-44e4-b72e-50a40618ba6e",
  "status": "queued",
  "errorCode": null,
  "createdAt": "2026-10-28T02:00:00.000Z",
  "finishedAt": null,
  "expiresAt": null,
  "billing": {
    "source": "package",
    "state": "reserved",
    "reservedCents": 0,
    "chargedCents": null,
    "successOrdinal": null
  }
}

Save the response taskId。status=queued means it has entered the queue and do not create the task again. new task responsive Location is the query address, Retry-After It is recommended to wait 3 seconds for the first query; the latest task status shall prevail when querying.

Query and receive results

cURL query and download
curl --fail-with-body -sS "$API_BASE_URL/tasks/$TASK_ID" \
  -H "Authorization: Bearer $API_KEY"

# Download only after status=succeeded. The response below is a file, not JSON.
curl --fail -sS "$API_BASE_URL/tasks/$TASK_ID/result" \
  -H "Authorization: Bearer $API_KEY" \
  -o result.svg

It is recommended to query at an interval of 3 seconds (10 seconds in queue). only succeeded can be downloaded;failed、cancelled、expired is an unsuccessful final state.

02 / AUTHENTICATION

Authentication and Security

All /openapi/v1 All interfaces are required Authorization: Bearer YOUR_API_KEY. Website cookies, membership status, and URL query parameters are not substitutes for the API Key. Production requests use HTTPS.

ScopeAllow operation
tasks:writeSubmit and apply to cancel tasks
tasks:readQuery tasks and download results
account:readCheck the account limit
usage:readView the successful settlement record of this account

The query capability only requires a valid Key. The key created by the console currently contains the above four permissions; subdivided permissions can be configured by the management side. The complete Key is only displayed once when it is created, and a maximum of 20 valid Keys are retained.

  • Keys are only stored on your own server or key management system and are not embedded in web pages, extensions, Git repositories or logs.
  • Immediately revoke the old Key after leakage, create a replacement Key and update the server configuration; revocation will not revoke the submitted task.
  • Multiple Keys in the same account share quota, historical times, queues and dual concurrency, and can query the tasks of the same account.
  • Tasks to access other accounts uniformly return 404. Don't try to use the account ID parameter to switch task ownership.
03 / FILE CONTRACT

Input and output

Upload methodmultipart/form-data, with exactly one binary file field named image .
URL inputapplication/json Request body:{"imageUrl":"https://example.com/image.png"}. Supports direct HTTPS and signed COS/OSS URLs on port 443 only. Redirects, sign-in cookies and custom authentication headers are not supported.
FormatPNG, JPEG/JPG and WebP, validated by decoding rather than extension alone. Multi-frame images are not supported.
Input limits10 MiB (10,485,760 bytes) per file; up to 20,000,000 input pixels
Processing dimensionsResized proportionally to a maximum edge of 1,200 pixels; small images are not enlarged
OutputSVG file,Content-Type: image/svg+xml; no other output format parameter is currently supported
Collection window24 hours after success by default, subject to expiresAt and the capabilities configuration

Let the client library generate the multipart boundary; do not hardcode Content-Type: multipart/form-data. Choose either file upload or JSON URL input. Extra fields, Base64 input, custom colors, backgrounds and output parameters are not supported.

URL downloads are limited to 10 MiB, with up to 5 seconds for DNS and 25 seconds for connection and download. Downloads do not consume conversion concurrency; failures do not reserve or charge credits. Signed URLs must remain valid throughout the download. The same idempotency key retains the original URL, including signature parameters; a saved image copy is reused for up to 1 hour. Once created, the original task is always returned without another download.

cURL HTTPS Image / COS / OSS Signature Link
curl --fail-with-body -sS 'https://svgo-api.com/openapi/v1/tasks' -H 'Authorization: Bearer YOUR_API_KEY' -H 'Idempotency-Key: your-url-task-0001' -H 'Content-Type: application/json' --data '{"imageUrl":"https://your-image-host.com/image.png"}'
04 / WORKING EXAMPLES

Complete code examples

The Node.js and Python examples include capabilities checks, uploads, polling, saving results and bounded backoff. Retries after network interruptions keep the original idempotency key and image. A polling timeout is not treated as conversion failure.

cURL submission, query and download
export API_BASE_URL='https://svgo-api.com/openapi/v1'
export API_KEY='YOUR_API_KEY'
# Use one key per business task. Keep it for retries; use a new key for a new image.
export IDEMPOTENCY_KEY='your-business-request-0001'

# Confirm acceptsTasks=true first. Capabilities queries are free.
curl --fail-with-body -sS "$API_BASE_URL/capabilities" \
  -H "Authorization: Bearer $API_KEY"

curl --fail-with-body -sS "$API_BASE_URL/tasks" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -F 'image=@image.png' \
  -o task.json

# Requires jq. Save the taskId from task.json.
TASK_ID=$(jq -r '.taskId // empty' task.json)
cat task.json

# If not successful yet, poll again after 3 seconds (10 when queued). Do not download or recreate the task.
curl --fail-with-body -sS "$API_BASE_URL/tasks/$TASK_ID" \
  -H "Authorization: Bearer $API_KEY"

# Download only after status=succeeded. The response below is a file, not JSON.
curl --fail -sS "$API_BASE_URL/tasks/$TASK_ID/result" \
  -H "Authorization: Bearer $API_KEY" \
  -o result.svg

Example using curl and jq. If the query is still unsuccessful, continue to wait. Do not regard the last download command as automatic polling.

These are HTTP access examples, not the official released SDK. When accessing for the first time, it is recommended to first call the free account and capability query. There is currently no free conversion test mode.

05 / ENDPOINTS

Interface Reference

The following paths are relative to https://svgo-api.com/openapi/v1. All interfaces are subject to permission verification based on the account to which the Key belongs. Only the download results are returned as files, the rest of the successful responses are JSON.

POST/tasksSubmit a conversion task

Upload an image or submit imageUrl using JSON, create an asynchronous conversion task and reserve a quota. Different Keys in the same account use the same idempotent key and still correspond to the same task.

Required permissions tasks:write
Parameter/PositionDescription
Authorizationheader RequiredBearer YOUR_API_KEY
Idempotency-Keyheader Required1–80 ASCII characters: [A-Za-z0-9:_-]. Each logical task is unique, and the original key is retained when the original task is retried.
imagemultipart binary OptionalOnly one PNG/JPEG/WebP file, max 10 MiB, 20 Megapixels, no support for animated multiple frames or extra form fields.
imageUrlJSON string OptionalChoose one from image; HTTPS image direct link with maximum 8192 characters or COS/OSS temporary signature link. Redirection or custom authentication headers are not supported.

Successful response:202 Accepts new tasks and returns taskId and current status (queued means queued); Attached is the Location query address and Retry-After suggested query interval. 200 Returns the original task corresponding to the idempotent key. Both return Task JSON.

Choose between file upload and JSON imageUrl. The URL is only HTTPS 443, has no login credentials, and does not follow jumps; it supports COS/OSS temporary signature links. The same idempotent key must maintain the original link (including signature parameters), and the saved image copy will be reused. Do not manually set the Content-Type or boundary of multipart, it is generated by the HTTP client. Each account has a maximum of 6 unfinished tasks, and the API has a maximum of 18 on the entire platform; 429 and Retry-After will be returned when the amount is full, and no tasks will be created and no quota will be reserved. Only status information such as taskId is returned, and SVG is not returned directly. Save the original task ID query and do not create it again.

POST /tasks response example
{
  "taskId": "6dd39862-bec8-44e4-b72e-50a40618ba6e",
  "status": "queued",
  "errorCode": null,
  "createdAt": "2026-10-28T02:00:00.000Z",
  "finishedAt": null,
  "expiresAt": null,
  "billing": {
    "source": "package",
    "state": "reserved",
    "reservedCents": 0,
    "chargedCents": null,
    "successOrdinal": null
  }
}
GET/tasks/{taskId}Get task status

Get the latest status of the original task, result collection deadline and reservation/settlement information.

Required permissions tasks:read
Parameter/PositionDescription
taskIdpath UUID RequiredSubmit the taskId returned by the interface.

Successful response:200 Task JSON

It is recommended to poll every 3 seconds (10 seconds is recommended in queue) and stop when reaching the final state. During reconciling, the original task will continue to be checked, and a replacement task cannot be created accordingly.

GET /tasks/{taskId} response example
{
  "taskId": "6dd39862-bec8-44e4-b72e-50a40618ba6e",
  "status": "succeeded",
  "errorCode": null,
  "createdAt": "2026-10-28T02:00:00.000Z",
  "finishedAt": "2026-10-28T02:01:00.000Z",
  "expiresAt": "2026-10-29T02:01:00.000Z",
  "billing": {
    "source": "package",
    "state": "consumed",
    "reservedCents": 0,
    "chargedCents": 0,
    "successOrdinal": "1"
  }
}
GET/tasks/{taskId}/resultDownload results

After the task succeeded, authenticate and collect the SVG. Repeated downloads will not increase the number of successes or charge for repeated downloads.

Required permissions tasks:read
Parameter/PositionDescription
taskIdpath UUID RequiredThe task number that belongs to the current account and has been successful.

Successful response:200 image/svg+xml binary content, Content-Disposition: attachment

This response is not JSON. The result is retained for 24 hours by default after success, subject to Task.expiresAt; 410 means expired.

POST/tasks/{taskId}/cancelRequest task cancellation

Cancel tasks that are still queued, or apply to stop tasks that have been dispatched. No JSON request body is required.

Required permissions tasks:write
Parameter/PositionDescription
taskIdpath UUID RequiredCurrent account task number.

Successful response:200 Latest Task JSON

Queued tasks can directly become canceled; dispatched tasks may first become cancel_requested. There is a race condition between success and cancellation. When succeeded is returned, settlement will still be completed.

GET/accountGet account credits

Check the balance, frozen amount, available times package, historical success times and account concurrency limit.

Required permissions account:read

Except for authentication, there are no request parameters or request bodies.

Successful response:200 Account JSON

The balance and larger count fields are returned as decimal strings. When displaying the RMB amount, divide it by 100 and do not use floating point numbers for accounting.

GET /account response example
{
  "accountId": "6fb13245-5c30-48e4-a5c7-0bfffc34a32f",
  "currency": "CNY",
  "balanceCents": "10000",
  "reservedCents": "20",
  "availableCents": "9980",
  "packageAvailableCalls": "0",
  "packageReservedCalls": "0",
  "lifetimeSuccessCount": "999",
  "nextUnitPriceCents": 20,
  "maxConcurrency": 2,
  "activeTasks": 1,
  "maxPendingTasks": 6,
  "maxGlobalPendingTasks": 18,
  "walletFallback": true
}
GET/usageQuery successful settlement records

Query the successful call records of the current account, and return them in ascending order of historical success numbers, with a maximum of 100 records per page.

Required permissions usage:read
Parameter/PositionDescription
afterquery decimal string OptionalOptional, default 0. Without starting point, the next page is passed to the previous page nextCursor; any date filtering or limit parameter is not supported.

Successful response:200 { items, nextCursor }; when nextCursor is null, the last page has been reached.

Contains only successful settlement records. Queued, failed, and recovering tasks should be queried by taskId. The unit of chargedCents is cents, and consumedPackageCalls is the number of times in the package.

GET /usage response example
{
  "items": [
    {
      "taskId": "6dd39862-bec8-44e4-b72e-50a40618ba6e",
      "successOrdinal": "1001",
      "source": "wallet",
      "chargedCents": 15,
      "consumedPackageCalls": 0,
      "createdAt": "2026-10-28T02:01:00.000Z"
    }
  ],
  "nextCursor": null
}
GET/capabilitiesGet service capabilities

Check task acceptance, payment ability, input restrictions and result retention time before accessing. There are no switching fees.

Required permissions 有效 Key 即可

Except for authentication, there are no request parameters or request bodies.

Successful response:200 Capabilities JSON

Do not create new tasks when acceptsTasks=false. paymentAvailable=false means that online recharge is not available in the current environment, which does not mean that the existing effective balance in the account is lost.

GET /capabilities response example
{
  "version": "v1",
  "acceptsTasks": false,
  "paymentAvailable": false,
  "formats": [
    "png",
    "jpeg",
    "webp"
  ],
  "inputMethods": [
    "multipart",
    "https-url"
  ],
  "maxFileBytes": 10485760,
  "maxInputPixels": 20000000,
  "processingMaxEdge": 4096,
  "processingMaxPixels": 3145728,
  "maxConcurrency": 2,
  "maxPendingTasks": 6,
  "maxGlobalPendingTasks": 18,
  "resultRetentionSeconds": 86400
}
06 / DATA MODELS

Response fields

Task task and billing status

Field/Typemeaning
taskIdstring UUIDTask ID within the account. Please save it persistently so that you can continue querying after interruption.
statusstringTask status. Only succeeded indicates successful conversion; HTTP 200/202 does not mean that the conversion was successful.
errorCodestring | nullStable reason code for task failure or recovery phase; retain taskId during troubleshooting.
createdAtstring date-timeTask creation time, ISO 8601, UTC.
finishedAtstring | nullThe time when the task reaches the final state. It is null if it has not yet been completed.
expiresAtstring | nullDeadline for receiving successful results. Based on this time, the default is 24 hours after success.
billing.sourcepackage | walletThe source of deduction determined at the time of receipt: times package or balance; no double deductions will be made for the same task.
billing.statereserved | consumed | releasedThe quota has been reserved, consumed or released. The reservation is not a final deduction.
billing.reservedCentsinteger pointsBalance reserved amount; source of times package is 0. May be higher than final deduction.
billing.chargedCentsinteger | null pointsCash deduction for successful settlement, the number package is 0; it is null when there is no successful settlement.
billing.successOrdinalstring | nullHistorical successful settlement sequence number, returned as a decimal string to avoid loss of large integer precision.

Account Quota and Limitations

Field/Typemeaning
accountIdstringThe API billing account to which the current Key belongs.
currencyCNYRMB; all Cents amounts are in cents.
balanceCentsstringThe total balance, including the portion still reserved.
reservedCentsstringThe balance that has been reserved by pending tasks.
availableCentsstringCurrent available balance, equal to balanceCents − reservedCents.
packageAvailableCallsstringThe number of times in the valid package that have not been consumed or reserved.
packageReservedCallsstringThe number of reserved packages, including expired package reservations that are still being processed.
lifetimeSuccessCountstringThe total number of historical successful calls, in-package and balance calls are accumulated together, and are not reset on a monthly basis.
nextUnitPriceCentsintegerThe unit price of the next balance call calculated based on the current historical number, 20 or 15 cents.
maxConcurrencyintegerAccount execution concurrency limit, currently 2, shared by all keys.
activeTasksintegerThe number of tasks that have occupied the execution quota, including tasks that are being resumed and canceled.
maxPendingTasksintegerThe upper limit of unfinished tasks for the account, which is currently 6.
maxGlobalPendingTasksintegerThe upper limit of unfinished tasks on all OpenAPI platforms is currently 18.
walletFallbackbooleanWhether the balance is allowed to be used after the times package is exhausted.

Error and response headers

Error response example 402 application/json
{
  "error": {
    "code": "API_CREDIT_INSUFFICIENT"
  },
  "requestId": "f7d692da-01bf-48c8-bb45-28d063b3d9d0"
}

Application errors often include requestIdfor easy troubleshooting; gateway failure may only return error.code, clients should tolerate non-JSON error responses.

X-Request-IdSingle request number generated by the application, different from taskId. Reserved when troubleshooting interface errors.
Retry-AfterRecommended waiting seconds: minute current limit is usually 60 seconds, input concurrency limit is usually 3 seconds; the actual response value shall prevail.
Cache-ControlThe data response with identity is no-store, do not use public CDN caching.
Content-DispositionWhen the download is successful, it is attachment, and the file name corresponds to the task number.
07 / TASK LIFECYCLE

Task status and cancellation

StatusDescription
queuedQueued Continue pollingAccepted and reserved quota, waiting for execution. Queuing does not account for execution concurrency; the default input queuing window is 1 hour.
dispatchingReady to execute Continue pollingThe execution quota has been allocated and the image is ready to be processed.
runningConverting Continue pollingThe task is being executed, continue to use the original taskId to query.
reconcilingStatus confirming Continue pollingRestoring the confirmation execution status, reserved seats and reserved quota. Do not change idempotent keys and submit again.
cancel_requestedCancellation confirmation in progress Continue pollingCancellation has been applied for, but the stop has not been confirmed. If you continue to query, it cannot be determined that the amount has been refunded.
succeededCompleted Terminal stateResults have been archived and settled once and are available for download.
failedNot completed Terminal stateThe determination fails and the reservation is released, regardless of the number of successful calls. See errorCode troubleshooting.
cancelledCancelled Terminal stateCancellation confirmed, reservation released; no new successful settlement will be generated.
expiredThe queue has expired Terminal stateFailed to execute within input reservation window, release reservation.

Application for cancellation is not confirmation of cancellation

POST /tasks/{taskId}/cancel No request body required. Return If you continue to query when cancel_requested , the quota may still be reserved; it will only be released after the cancellation is confirmed. Returned when the conversion has completed first succeeded, settled according to the successful result.

Idempotent keys cover the entire logical task

The same idempotent key and image for the same account will return the original taskId, including if the task has succeeded, failed, or expired; it will not "rerun" the original task. If the original image is different, 409 will be returned. In case of HTTP timeout or status confirmation, the query will be resumed first; a new key will be created only when the original task final status is confirmed and there is a new business intention.

The current task record and idempotent information will not be cleared when the result file is deleted. Don't recycle historical idempotent keys after the task ends.

08 / BILLING

Billing and quota reservation

First 1,000 times in history¥0.20/ call
Starting from the 1,001st time in history¥0.15/ call

The number of historical successes is accumulated permanently by API account and is shared by all keys. Segmented pricing does not allow retroactive price changes. The total of 1,500 payments through balance is 275 yuan. Recharging only increases the balance but does not increase the number of successful calls.

  • Reserve the current balance unit price when receiving the task. If the account already has a valid call quota issued by management, the quota will be deducted first; the call count package is currently not sold.
  • The result is settled once after being successfully archived. Failure, confirmation of cancellation or queue expiration will release the reservation, and the number of successes will not be increased.
  • Only the number of packages or the balance can be deducted for the same task. When the status is unknown, the reservation will be kept and the confirmation will be restored without immediate recharge or refund.
  • If two balance tasks are concurrently executed after the 999th time, 20 points can be reserved for each; the successful serial numbers are 1000 and 1001 respectively, and 20 points and 15 points are actually deducted, and the extra 5 points reserved are released.
  • There is no charge for querying status, capacity, quota, usage and repeated downloads; the number of HTTP requests is not equal to the number of billed calls.

The API console provides four levels of balance recharge: ¥10, ¥50, ¥100, and ¥500. The payment amount is credited to the account at a ratio of 1:1. No call packages are sold. Whether WeChat payment is open depends on the actual environment; local preview is closed for real payment. Automatic refunds have not yet been implemented, and the test amount does not represent the actual recharge.

09 / RELIABILITY

Current limiting, timeout and retry

Execution concurrencyEach account can execute up to 2 items at the same time, and all keys are shared; the service globally executes 2 items at the same time by default, and is arranged fairly according to the account, and will be queued when resources are busy. Task concurrency is not HTTP request concurrency.
Pending tasksEach account has a maximum of 6 items, shared by all keys, including tasks in queue, execution, recovery and cancellation confirmation. When the upper limit is reached, 429 ACCOUNT_QUEUE_LIMIT is returned, and no new tasks or reserved quotas will be created.
All platform queuesThe total number of unfinished tasks for all API service accounts is up to 18. Return when the upper limit is reached 429 GLOBAL_QUEUE_LIMIT, prompt to try again later; comply Retry-After, the accepted task continues to be processed, please use the original task ID to query.
Request rateThe current account budget is a maximum of 180 requests per 60 seconds, and task submission is limited to 30 times; the same request is subject to multiple layers of protection and may return 429 earlier.
Polling recommendationsThe entire account is uniformly scheduled for polling. It is recommended that the polling sub-budget does not exceed 120 times per minute; it is recommended to query at an interval of 5–10 seconds for each unfinished task, add jitter and reserve a budget for submission, cancellation and download. Stop after the final state; do not refresh frequently or use more keys to bypass restrictions.
Client timeoutIt is recommended that a single HTTP time is about 30 seconds; the task waiting time is individually timed, and the long connection model of synchronous conversion cannot be used.

429 Priority Compliance Retry-After; Network error, 500/502/503/504 Use capped backoff to add jitter to production. Do not automatically retry 400, 401, 402, 403, 404, 410, 413, fix the cause first. 409 Only IMAGE_FETCH_IN_PROGRESS can preserve original input, original idempotent key limited backoff; IDEMPOTENCY_CONFLICT must be stopped.

Submission response loss may occur after the server has received it. Retransmission must retain the original key and original file; if the download fails, only the original download path will be retried. Stopping polling locally will not stop the server task. Only by canceling the interface can you apply for cancellation.

10 / ERRORS

Error code and troubleshooting

Determine the HTTP status first, and then error.code. Query task returns HTTP 200 but When status=failed , the business conversion still fails, you should check the task errorCode。

400INVALID_IMAGE_URL / IMAGE_URL_FORBIDDEN

The URL is illegal or resolves to a prohibited address.

Only use public network HTTPS 443 direct image links; do not include usernames, passwords, fragments or blank spaces.
400IMAGE_DOWNLOAD_FAILED / IMAGE_DOWNLOAD_TIMEOUT

Image download fails, jumps, link expires or times out; no task is created, no fee will be deducted.

Check link accessibility and signature validity period; if the task is not created, you can use the original idempotent key to try again. Updating links requires replacing idempotent keys.
409IMAGE_FETCH_IN_PROGRESS

The image with the same idempotent key is being downloaded, or the download is interrupted pending verification.

Keep the original link and idempotent key and try again later; if it continues to appear, please provide the requestId to contact the administrator and do not blindly create again.
409IMAGE_INPUT_EXPIRED

The image copy has expired and the task has not been created.

After confirming that the original request did not create a task, submit it with the new idempotent key.
429INPUT_CONCURRENCY_LIMIT

There are already 2 input requests being processed for this account in the current instance.

Wait for the input request to end and then try again; the concurrency of account conversion execution is limited separately.
400IDEMPOTENCY_KEY_REQUIRED

Missing legal idempotent key.

Added 1–80 character Idempotency-Key, allowing only letters, numbers, colons, underscores, and hyphens.
400IMAGE_REQUIRED / INVALID_IMAGE / INVALID_UPLOAD

The image was not submitted, the image cannot be read, or the upload format is not supported.

Use the image single file field of multipart/form-data and remove the extra fields.
400INVALID_CURSOR

The usage paging cursor is invalid.

Use the nextCursor returned from the previous page or start from after=0.
401UNAUTHORIZED

Key is missing, has an invalid format, has been revoked, or has expired.

Check Authorization: Bearer and recreate the Key in the console if necessary.
402API_CREDIT_INSUFFICIENT

No times or balance available for reservation.

Check the available limit and balance settings, and make up the balance on the console before submitting; the WeChat recharge opening status shall be subject to the actual environment.
403SCOPE_REQUIRED / ACCOUNT_DISABLED

Insufficient Key permissions or the API account has been deactivated.

Check the required scope; contact the service provider when the account is deactivated.
404NOT_FOUND

The record does not exist or does not belong to the current account.

Check the account to which taskId and Key belong; data of other accounts cannot be queried.
409IDEMPOTENCY_CONFLICT

The same idempotent key corresponds to different image contents.

The original image should be used when retransmitting the original task; only the new key should be used for new business tasks.
409RESULT_NOT_READY

The task is still being processed and the results cannot be downloaded temporarily.

Query task status; failure/cancellation cannot be changed to success through repeated downloads.
409RESULT_UNAVAILABLE_TERMINAL

The task has failed, been canceled or expired, and there are no downloadable results forever.

Stop downloading and retry; error.taskStatus returns final status, error.retryable=false. Query the original task positioning reason and do not automatically re-convert.
410RESULT_EXPIRED

The result has expired or has been cleared.

Check saved files; expired downloads will not automatically trigger re-conversion.
413IMAGE_TOO_LARGE / IMAGE_PIXEL_LIMIT

Over 10 MiB or 20 million input pixels.

First reduce the image on the client and then submit it as a new business task.
429RATE_LIMITED

The request rate exceeds the limit.

Comply with Retry-After and reduce the request frequency of the entire account. Multiple Keys will not increase the account limit.
429ACCOUNT_QUEUE_LIMIT

The account has 6 unfinished tasks.

Wait for the original task to end or cancel the unexecuted task; query concurrency 2 and request rate are different limits.
429GLOBAL_QUEUE_LIMIT

There are 18 unfinished tasks across the OpenAPI platform.

Comply with Retry-After and try again; the received task is queried using the original task ID, do not create it again.
503SERVICE_UNAVAILABLE / UPLOAD_BUSY

The service is not open, is temporarily unavailable, or is busy uploading.

Back off and retry; when the submission response is uncertain, only use the original idempotent key and the same image to retransmit.
503RESULT_TEMPORARILY_UNAVAILABLE

The completed results cannot be read temporarily.

Only retry the original download interface and do not recreate the conversion task.

Task failure may be related to input exceptions, conversion failures, or queue expiration. There will be no deduction for failed tasks, and the original idempotent key will still return to the original final state. Please check the cause of the error and do not automatically change keys and submit again. encounter When STATE_RECONCILING is entered, the taskId is retained and the query is continued without retransmitting the key. When contacting the service provider, provide taskId, requestId and error code, but do not provide the complete Key or private image.

11 / TOOLING

OpenAPI and Debugging Tools

Provides OpenAPI 3.0.3 JSON for use with Postman, Apifox, or OpenAPI-enabled client generation tools. The specification only includes the 7 external v1 interfaces and does not include console sessions, management interfaces, or internal information.

Download the OpenAPI specificationJSON v0.1.0
  1. Import the downloaded JSON and configure the service address as https://svgo-api.com/openapi/v1。
  2. Set the Bearer Key in a local private environment variable and do not synchronize the real Key to the public workspace or shared collection.
  3. Submit interface optional form-data image file field, or raw JSON imageUrl; supplement the independent Idempotency-Key request header.
  4. Check capabilities first, then submit; save taskId, and download in file response mode after success.

Interface changes are managed through version management. There is currently no official npm/PyPI SDK released; the download examples in the documentation can be used directly, but asynchronous polling and idempotent recovery logic still need to be retained after generating the client.

API v1 document updated on 2026-10-29 The sample response is for illustrative purposes and does not represent a real call or payment