> ## 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.

# Request Formats

> When to use JSON vs multipart, and how Accept headers work.

Pixelcut endpoints generally support two request styles:

## JSON with `image_url`

Use this when your image is already hosted (recommended for server-side pipelines).

```bash theme={null}
curl -sS "https://api.developer.pixelcut.ai/v1/upscale" \
  -H "X-API-Key: $PIXELCUT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"image_url":"https://cdn3.pixelcut.app/product.jpg","scale":2}'
```

## Multipart with file upload

Use this when you want to upload the image bytes directly.

```bash theme={null}
curl -sS "https://api.developer.pixelcut.ai/v1/remove-background" \
  -H "X-API-Key: $PIXELCUT_API_KEY" \
  -H "Accept: application/json" \
  -F "image=@./product.jpg"
```

## `Accept` header: JSON vs image bytes

Some endpoints support:

* `Accept: application/json` → returns `{ "result_url": "..." }`
* `Accept: image/*` → returns the binary image directly

> [!TIP]
>
> For production pipelines, `application/json` + downloading `result_url` is usually easier to retry and to store.

> [card] [Result URLs and asset handling](https://pixelcut.ai/docs/developer-guide/core-concepts/result-urls.md)


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