# PerfectVector API

Convert PNG, JPEG and WebP images to SVG from your own software, with an API key.

> **Coming soon:** The Developer API opens soon. You can read the docs now; API keys arrive when it opens.

The PerfectVector API converts raster images (PNG, JPEG and WebP) into SVG files from your own
servers, scripts and automation tools. You send an image with an API key, and you get the SVG back.

- **One credit per successful conversion.** A live conversion uses one API credit when it succeeds.
  Failed conversions, status checks and repeat downloads are free.
- **Free test mode.** Test keys (`pv_test_…`) run the whole request and return a sample SVG, at no
  cost. Use them to build your integration.
- **Separate API credits.** The API uses its own API credits, bought as one-time packs in the
  Developers area of your account. They are separate from the credits you use on the website.

Start with the [quickstart](/docs/api/quickstart).

## Base URL

```
https://api.perfectvector.com/v1
```

Every request needs an API key in the `Authorization` header. See
[Authentication](/docs/api/authentication).

## Endpoints

| Method | Path | What it does | Credits |
|---|---|---|---|
| `POST` | `/v1/vectorizations` | Convert one image. Waits for the result, or answers at once and lets you poll. | 1 on success |
| `GET` | `/v1/vectorizations/{id}` | The conversion's status and result links. | 0 |
| `GET` | `/v1/vectorizations/{id}/result` | Download the SVG. | 0 |
| `GET` | `/v1/vectorizations/{id}/results/{index}` | Download the SVG of one result, by its position (`0` in v1). | 0 |
| `DELETE` | `/v1/vectorizations/{id}` | Delete the conversion's image and SVG now. | 0 |
| `GET` | `/v1/account` | Your API balance, prices, limits and the key you used. | 0 |

There is no endpoint that lists your conversions. Keep the `id` of each conversion you create.

## Conventions

| Topic | Rule |
|---|---|
| Requests | `POST /v1/vectorizations` takes `multipart/form-data`. The other endpoints take no body. |
| Responses | JSON, except SVG downloads. Conversion and account objects carry an `object` field (`vectorization`, `account`). |
| IDs | A prefix and 22 letters and digits: `vec_…` for conversions, `key_…` for keys, `req_…` for requests. |
| Times | RFC 3339 in UTC, to the second, for example `2026-10-15T09:30:12Z`. |
| Errors | `application/problem+json` with a stable `code`. See [Errors](/docs/api/errors). |
| Request IDs | Every response has an `X-Request-ID` header (`req_…`). Every error body has the same `request_id`. Quote it when you contact us. |
| Credits | Every response has `X-Credits-Charged`. See [Credits](/docs/api/credits). |
| Servers only | Call the API from your server or script. It sends no CORS headers, so browsers block calls from web pages, and an API key in a web page would be public. |
| New fields | We may add fields to responses. Ignore fields you do not know. |

## Support and terms

Questions: contact@perfectvector.com. Please include the `request_id`.

You accept the [API Terms](/docs/api/terms) when you create your first key or buy credits for the
first time. The [API Privacy Notice](/docs/api/privacy) explains what we do with your images and
data.

[Site index](https://perfectvector.com/llms.txt) — available pages and descriptions.
