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

# Missing Image

> No image file in request

**HTTP Status:** 400

```json theme={null}
{
  "code": "missing_image",
  "message": "No image_file part found. Send multipart/form-data with an 'image_file' field.",
  "request_id": "req_3f6a2c1e-9b0d-4e7a-8c21-5d1f0a9b7e42",
  "doc_url": "https://docs.poof.bg/errors/missing-image"
}
```

## Reasons and How to Fix

### No Image File Provided

The `/remove` endpoint requires an image file in the `image_file` field.

```bash theme={null}
# ❌ Wrong - no image
curl -X POST https://api.poof.bg/v1/remove \
  -H "x-api-key: pk_your_api_key"

# ✅ Correct
curl -X POST https://api.poof.bg/v1/remove \
  -H "x-api-key: pk_your_api_key" \
  -F "image_file=@photo.jpg"
```

### Wrong Content-Type

The request must use `multipart/form-data` encoding.

```bash theme={null}
# ❌ Wrong - JSON body
curl -X POST https://api.poof.bg/v1/remove \
  -H "Content-Type: application/json" \
  -d '{"image": "..."}'

# ✅ Correct - multipart/form-data
curl -X POST https://api.poof.bg/v1/remove \
  -H "x-api-key: pk_your_api_key" \
  -F "image_file=@photo.jpg"
```

### Wrong Field Name

The field must be named exactly `image_file`.

```bash theme={null}
# ❌ Wrong field name
-F "image=@photo.jpg"
-F "file=@photo.jpg"

# ✅ Correct
-F "image_file=@photo.jpg"
```

## SDK Examples

<CodeGroup>
  ```python Python theme={null}
  from poof import Poof

  client = Poof(api_key="pk_your_api_key")
  result = client.remove_background("photo.jpg")  # File path
  result = client.remove_background(image_bytes)  # Bytes
  ```

  ```typescript TypeScript theme={null}
  import { Poof } from '@poof-bg/js';

  const client = new Poof({ apiKey: 'pk_your_api_key' });
  const result = await client.removeBackground(file);  // File, Blob, Buffer or path
  ```
</CodeGroup>

## Need Help?

Contact us at [support@poof.bg](mailto:support@poof.bg) with your `request_id`.


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