Image Trace Guide

Use this document to submit and monitor Image Trace jobs with the Illustrator API.

Illustrator API supports Image Trace workflows for raster-to-vector conversion. The service accepts PNG/JPEG input, runs image tracing in Illustrator, and returns presigned URLs for SVG output when the job succeeds.

If you are new to pre-signed URLs and job polling, read Key concepts first.

Workflow

  1. Upload your raster file to your storage and obtain a presigned GET URL (or equivalent temporary download URL supported by the platform).
  2. Submit POST .../beta/images/image-trace with input (source URL + mediaType) and, if needed, optional settings.preset. See the Image Trace API (public beta) reference for the request schema.
  3. Poll GET .../beta/status/{jobId} using the jobId or statusUrl from the submit response until status is succeeded or failed.
  4. Download SVG output from the presigned URLs in the outputs array when the job succeeds.

Required input for Image Trace

Use the following request shape:

Parameter
Required
Description
input
Yes
Input file details.
input.source.url
Yes
Pre-signed URL of the input file.
input.mediaType
Yes
Media type of the input file. Allowed values: image/png, image/jpeg.
settings
No
Optional object containing only preset (see below).

Example request body

{
  "input": {
    "source": { "url": "https://example.blob.core.windows.net/container/art.png?sas..." },
    "mediaType": "image/png"
  },
  "settings": {
    "preset": "enhanced_general"
  }
}

Request parameters

Parameter
Type
Description
settings.preset
string
Optional. One of: enhanced_general — vector-looking generated output; high_fidelity_photo — photorealistic tracing. Omit to use the service default. Any other value returns 400.

Status and outputs

Polling uses the Image Trace status operation (GET /beta/status/{jobId}). When status is succeeded, use the presigned URLs in outputs to download generated SVG files. Error messages and HTTP status codes follow the same error schema as other beta operations in this reference.

Submit response (202 Accepted)

{
  "jobId": "f7da0875-7919-486d-b915-7258c89f09e0",
  "statusUrl": "<url>/beta/status/f7da0875-7919-486d-b915-7258c89f09e0"
}

Status response (succeeded)

{
  "jobId": "f7da0875-7919-486d-b915-7258c89f09e0",
  "status": "succeeded",
  "outputs": [
    {
      "destination": {
        "url": "<PRESIGNED_URL>"
      },
      "mediaType": "image/svg+xml"
    }
  ]
}

Status response (failed)

{
  "jobId": "fe0f4a1a-a213-44bd-b37b-8aa2f636449c",
  "status": "failed",
  "error_code": "<ERROR_CODE>",
  "message": "<MESSAGE>"
}