---
title: "Generate an SVG from a selected image or logo"
method: POST
path: "/v1/assets/{id}/svg"
tags: ["Assets"]
---

# Generate an SVG from a selected image or logo

`POST /v1/assets/{id}/svg`

## Request

- Base URL: `https://api.masko.ai`
- URL: `https://api.masko.ai/v1/assets/{id}/svg`
- Auth: HTTP bearer

Creates an editable vector derivative from this exact completed image, transparent image or sticker, attached to the same item. Uses the highest-quality configured vector model. Costs 30 credits; failures refund charged credits. Async: poll the returned job URL. Generation can take several minutes. Reuse request_id to retry the same submission without another charge; a new ID starts a new paid attempt. SVG details can differ from the source. Published logo items expose the newest completed vector at logos.svg in cdn-export. Download via the returned asset file_url or cdn_url.

Select Masko-API-Version: 2026-09-26 (or api_version=2026-09-26) for the canonical mascot contract shown first. Existing unversioned clients keep legacy collection fields. A mascot_id query filter also selects the canonical contract. Mixing identifier names returns 400.

## Path parameters

- `id` string, uuid, required

## Query parameters

- `api_version` '2026-09-26' | 'legacy'

## Headers

- `Idempotency-Key` string
- `Masko-API-Version` '2026-09-26' | 'legacy'

## Request body

- object
  - `request_id` string, uuid, required: Idempotency ID. Reuse for retries of this source; use a new ID only for a new paid generation.

## Response `202`

SVG job receipt

- object
  - `data` object, required
    - `job_id` string, uuid, required
    - `asset_ids` object, required
      - `svg` string, uuid, required
    - `status` 'pending' | 'processing' | 'completed' | 'failed', required
    - `estimated_cost` number, required
    - `poll_url` string, required

## Other responses

- `400`: Invalid request
- `401`: Unauthorized
- `402`: Insufficient credits
- `403`: Write access required
- `404`: Source or collection not found
- `409`: Request ID conflict or variant not approved
- `429`: Rate limited
- `500`: Internal error
- `503`: Generation unavailable

---

[API](https://skmtc.dev/masko/apis/masko-api.md) · [All operations](https://skmtc.dev/masko/apis/masko-api/llms.txt) · [OpenAPI document](https://skmtc.dev/masko/apis/masko-api/revisions/91eb3006a92f?raw)
