# Your first SVG in five minutes

A test key, one request, one file. Test keys are free: every image becomes the same sample result, so you can build the whole integration before you spend anything.

## 1. Get a test key

Sign in and open [Developers](https://vecsnap.com/app/developers). Create a test key: it starts with `vs_test_` and is shown once. Keep it in an environment variable, never in your code.

```bash
export VECSNAP_API_KEY=vs_test_…
```

## 2. Install a client (optional)

Node.js:

```bash
npm install @vecsnap/sdk
```

Python:

```bash
pip install vecsnap
```

curl needs nothing. The SDKs wait for a slow image for you, and turn every refusal into one error type with its `code`.

## 3. Send an image

curl:

```bash
curl https://api.vecsnap.com/v1/vectorize \
  -H "Authorization: Bearer $VECSNAP_API_KEY" \
  -H "Accept: image/svg+xml" \
  -F file=@logo.png \
  -L -o logo.svg
```

Node.js:

```js
import { readFile, writeFile } from "node:fs/promises";
import { VecSnap } from "@vecsnap/sdk";

const vecsnap = new VecSnap(); // reads VECSNAP_API_KEY
const result = await vecsnap.vectorize({ file: await readFile("logo.png"), filename: "logo.png" });
await writeFile("logo.svg", await vecsnap.download(result));
console.log(`${result.result?.anchorPoints} anchor points`);
```

Python:

```python
from vecsnap import VecSnap

vecsnap = VecSnap()  # reads VECSNAP_API_KEY
result = vecsnap.vectorize(file=open("logo.png", "rb").read(), filename="logo.png")
open("logo.svg", "wb").write(vecsnap.download(result))
print(result["result"]["anchorPoints"], "anchor points")
```

The file goes as form data, up to 4 MB. Larger files, up to 10 MB, go through [an upload](https://vecsnap.com/docs/api/uploads). A link works too: send `url` instead of `file`.

## 4. Read what came back

The answer is the conversion: its `status`, its `result` with `anchorPoints`, `fileSize` and `formats`, and `files`, a short-lived link to each SVG. With `Accept: image/svg+xml` curl gets the file itself.

> **A slow image answers 202.** Most images finish in seconds; a few take minutes. Past `wait` seconds (30 by default) the API answers `202` with the conversion, which finishes by itself. The SDKs wait for it. With curl, [read it again or take a webhook](https://vecsnap.com/docs/wait-for-a-result).

## Next

- [Webhooks](https://vecsnap.com/docs/webhooks): Hear about every conversion as it ends.
- [Errors and retries](https://vecsnap.com/docs/errors): Every code and what to do.
- [Go live](https://vecsnap.com/docs/go-live): From a test key to real images.

---
This page: https://vecsnap.com/docs/quickstart
