> ## Documentation Index
> Fetch the complete documentation index at: https://pixelcut.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Make your first request and save the resulting image.

To begin using the Pixelcut API, you'll need an API key. This key allows you to authenticate your requests and access our services.

## 1) Get an API key

Generate an API key in the developer dashboard.

> [card] [Get an API key](https://www.pixelcut.ai/developer-settings)

## 2) Call an endpoint (Remove Background)

This example requests `application/json` and returns a `result_url` you can download.

```bash cURL theme={null}
curl -sS "https://api.developer.pixelcut.ai/v1/remove-background" \
  -H "X-API-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "image_url": "https://cdn3.pixelcut.app/product.jpg"
  }'
```

```js Node.js theme={null}
const response = await fetch('https://api.developer.pixelcut.ai/v1/remove-background', {
  method: 'POST',
  headers: {
    'X-API-Key': '<YOUR_API_KEY>',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
  },
  body: JSON.stringify({
    image_url: 'https://cdn3.pixelcut.app/product.jpg',
  }),
});

const data = await response.json();
console.log(data.result_url);
```

```python Python theme={null}
import os
import requests

resp = requests.post(
  "https://api.developer.pixelcut.ai/v1/remove-background",
  headers={
    "X-API-Key": "<YOUR_API_KEY>",
    "Accept": "application/json",
  },
  json={"image_url": "https://cdn3.pixelcut.app/product.jpg"},
)

resp.raise_for_status()
print(resp.json()["result_url"])
```

## 4) Download and store the output

Result files are deleted after at most 24 hours, so download and store the file in your own storage.

```bash theme={null}
curl -L "$RESULT_URL" -o output.png
```

## Prefer a binary response?

Some endpoints support `Accept: image/*` to return the image bytes directly.

```bash theme={null}
curl -sS "https://api.developer.pixelcut.ai/v1/remove-background" \
  -H "X-API-Key: <YOUR_API_KEY>" \
  -H "Accept: image/*" \
  -H "Content-Type: application/json" \
  -d '{"image_url":"https://cdn3.pixelcut.app/product.jpg"}' \
  -o output.png
```

> [card] [Request formats (JSON vs multipart)](https://pixelcut.ai/docs/developer-guide/core-concepts/request-formats.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.