# Submit a video background removal (fast) job

Model: Video Background Removal Fast
Endpoint: `POST /v1/video-background-removal-fast`

Start an asynchronous job that removes the background from a source video, keeping only the foreground subject. Faster generation; accepts source videos up to full HD (1080p).

**Inputs**

- `video_url` — public URL of the source video
- `output_codec` — optional; `vp9` (the default) renders one WebM with an alpha channel, `h264` renders two files (the RGB video and an alpha matte) and is recommended for better RGB quality
- `refine_foreground_edges` — optional; improves the quality of the extracted subject's edges (defaults to true)
- `subject_is_person` — optional; set to false when the subject is not a person (defaults to true)

**What happens next**

The job is **accepted immediately** — you get `202 Accepted` with a `job_id` and status `PROCESSING`. Rendering runs in the background; poll `GET /v1/video-background-removal-fast/{job_id}` until the job is `COMPLETED` or `FAILED`.

## Request body

- `output_codec` · enum · optional — Output encoding. vp9 (the default) yields a single webm video with an alpha channel; h264 yields two files (the RGB video and an alpha matte) and is recommended for better RGB quality. Accepts `vp9`, `h264`. Defaults to `"vp9"`.
- `refine_foreground_edges` · boolean · optional — Improves the quality of the extracted subject's edges. Defaults to `true`.
- `subject_is_person` · boolean · optional — Set to false when the subject is not a person. Defaults to `true`.
- `video_url` · url · required — URL of the source video to remove the background from.

## Parameters

- `X-Veed-Store-IO` (header) — Set to `0` to not store this request's and response's bodies. They are then not available in your request logs for debugging.
- `X-Veed-Media-Expiration-Seconds` (header) — Number of seconds before the media URLs returned for this request expire. A value above the maximum is capped rather than rejected.

## Example request

```bash
curl -X POST "https://api.veed.io/v1/video-background-removal-fast" \
  -H "Authorization: Bearer $VEED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "video_url": "https://static-assets.veed.io/api-examples/bg-fast-input.mp4"
}'
```

## Example response (202)

```json
{
  "data": {
    "credits_charged": 0,
    "credits_estimated": 0,
    "error": {
      "code": "input_validation",
      "details": [
        {
          "field": "<field>",
          "message": "<message>",
          "type": "<type>"
        }
      ],
      "message": "<message>"
    },
    "job_id": "123e4567-e89b-12d3-a456-426614174000",
    "result": {
      "files": [
        {
          "content_type": "video/mp4",
          "file_name": "<file_name>",
          "file_size": 0,
          "url": "<url>"
        }
      ]
    },
    "status": "PROCESSING"
  }
}
```

Rendered page: https://api.veed.io/docs/api/post-v1-video-background-removal-fast
