Vectorize raster logos, icons, illustrations, and flat-art assets into scalable SVG files through a simple async API.
curl 'https://api.codia.ai/v2/open/svg_converter/create' \
-H 'Authorization: Bearer {codia_api_key}' \
-H 'Content-Type: application/json' \
--data '{
"pic_url": "https://example.com/logo.png",
"file_name": "logo.png"
}'{
"code": 0,
"message": "ok",
"data": {
"record_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Each Codia Open API shares the same authentication, billing, and operational model, so teams can add new visual conversion capabilities without new infrastructure.
Trace flat artwork into scalable SVG assets that stay crisp at any size.
Submit once, poll for status, then download the completed SVG when ready.
Read live dimension, file-size, and credit limits before users submit large assets.
The fields below are the pieces most teams need before wiring the API into a real product flow.
| Field | Type | Required | Notes |
|---|---|---|---|
| pic_url* | string URL | Yes | Public URL of the raster image for JSON mode. |
| image* | binary | Yes | Image file for multipart mode. The compatible field name file is also accepted. |
| file_name | string | No | Original file name for record keeping and output naming. |
| record_id* | uuid | Yes | Required only on GET /v2/open/svg_converter/result/{record_id} to poll the conversion result. |
| Field | Type | Required | Notes |
|---|---|---|---|
| record_id* | uuid | Yes | Returned by create; use it to poll GET /v2/open/svg_converter/result/{record_id}. |
| svg_convert_status* | 1 | 2 | 3 | Yes | Conversion state: 1 complete, 2 failed, 3 doing. |
| svg_url | string URL | No | Generated SVG download URL. Present when svg_convert_status is 1. |
Build the happy path first, then add polling, retry, and terminal error handling around it. Async APIs should store the returned task or record ID before the user leaves the current screen.
Check the user plan limits if your UI accepts direct uploads.
Submit the raster asset by URL or multipart upload and store the returned record ID.
Poll the result endpoint and self-host the SVG once the conversion completes.
Start with curl, then adapt the TypeScript or Python flow for your backend worker.
curl 'https://api.codia.ai/v2/open/svg_converter/create' \
-H 'Authorization: Bearer {codia_api_key}' \
-H 'Content-Type: application/json' \
--data '{
"pic_url": "https://example.com/logo.png",
"file_name": "logo.png"
}'| Code | Meaning | What to do |
|---|---|---|
| 400 | Invalid request body, missing required fields, unsupported file, or malformed URL. | Validate input client-side and log the API response message for the failed request. |
| 401 | Missing or invalid API key. | Send Authorization: Bearer {codia_api_key}; rotate the key if validation keeps failing. |
| 402 | Insufficient Open API credits. | Stop retrying automatically and ask the workspace owner to top up or upgrade. |
| 429 | Rate limit or concurrency limit reached. | Retry with exponential backoff and a small amount of jitter. |
| 500 | Temporary server-side failure. | Retry idempotent polling calls; for submit calls, store your client request ID and avoid duplicate work. |
Complete; svg_url contains the converted SVG.
Failed; show a recoverable error to the user.
Doing; keep polling with backoff.
Codia APIs are designed for applications that need visual understanding, asset conversion, and editable outputs at scale.
Recover missing source files for exported logos.
Convert product icons into scalable design-system assets.
Prepare flat artwork for print, signage, and high-density displays.
Automate vector cleanup inside asset ingestion pipelines.
Similar visual APIs solve different integration problems. Use this table to route users to the right endpoint.
| API | Best for | Not for |
|---|---|---|
| Image to SVG | Vectorizing logos, icons, marks, and flat artwork into scalable SVG files. | Reconstructing full UI layout or editable design components. |
| Image to DSL | Turning a screenshot into structured design data with layout and text objects. | Producing a clean standalone vector asset from a logo. |
| Image Layering | Splitting one flat image into an editable stack of visual layers. | Tracing crisp vector paths for icon systems. |
Des tarifs clairs pour chaque produit. Démarrez gratuitement, évoluez selon vos besoins.
Common implementation questions for Image to SVG API.
The API is optimized for logos, icons, illustrations, and flat-art graphics. Photographic images usually produce less useful SVGs.
Credits are charged on successful conversion completion, not when the task is submitted.
Yes. The create endpoint supports multipart upload with an image file as well as URL-based JSON requests.
All three APIs use the unified Codia Open API balance. You can subscribe to an Open API plan or buy add-on credits: 100 credits for $19.99, 200 credits for $29.99, or 500 credits for $49.99.
Use one Codia Open API balance across visual structure, presentation conversion, vectorization, background removal, and image processing workflows.