# Green Screen

[**Try out this capability in Bria's sandbox**](https://platform.bria.ai/video-editing/video-green-screen)
**Description**
Initiates an asynchronous job that detects the video background and replaces it with a solid green (or blue) screen, producing a chroma-key-ready output for downstream compositing tools.
Response behavior:
- Returns HTTP 202 with `request_id` and `status_url`
- Check job status by polling `status_url` or by calling the [status endpoint](/status/job-status/get_status) with the `request_id` until a terminal status is returned

Supported input containers:
- .mp4, .mov, .webm, .avi, .gif

Supported input codecs:
- H.264, H.265 (HEVC), VP9, AV1, PhotoJPEG

Input attributes preserved in output:
- Aspect Ratio and resolution
- Frame Rate
- Audio if present and `preserve_audio` is true

Limits:
- Max input duration: 60 seconds
- Resolutions: Input resolution up to 16000x16000 (16K). Inputs larger than this return 413 Payload Too Large. Output resolution matches the input resolution.

Green shade selection:
- `broadcast_green` (#00B140) - industry standard for professional pipelines. Default.
- `chroma_green` (#00FF00) - works with consumer editors.
- `blue_screen` (#0000FF) - use when the subject wears green.

Output transparency:
- Output is fully opaque (no alpha channel needed). `mp4_h264` is recommended for broad editor compatibility.

Endpoint: POST /green_screen
Security: api_token

## Request fields (application/json):

  - `video` (string, required)
    Publicly accessible URL of the input video. Input resolution supported up to 16000x16000 (16K)

  - `green_shade` (string)
    Predefined screen color. `broadcast_green` (#00B140) is the industry standard for professional pipelines. `chroma_green` (#00FF00) works with consumer editors. `blue_screen` (#0000FF) is used when the subject wears green.
    Enum: "broadcast_green", "chroma_green", "blue_screen"

  - `output_container_and_codec` (string)
    Output container and codec preset. Alpha is not needed for green screen output; `mp4_h264` is recommended for broad editor compatibility.
    Enum: "mp4_h264", "mp4_h265", "webm_vp9", "mov_h265", "mov_proresks", "mkv_h264", "mkv_h265", "mkv_vp9", "gif"

  - `preserve_audio` (boolean)

  - `webhook_url` (string)
    Optional URL for receiving the result via webhook when the async job completes. See [webhooks](/getting-started/async-requests#webhooks).

  - `spill_suppression` (number)
    Strength of green-spill suppression on the retained foreground. Green screens cast a green fringe onto the subject; raising this pulls the green channel toward the red/blue average on green-dominant pixels, removing that fringe. `0` disables it.

## Response 202 fields (application/json):

  - `request_id` (string, required)

  - `status_url` (string, required)

## Response 400 fields (application/json):

  - `error` (object, required)

  - `error.code` (integer, required)
    Example: 123

  - `error.message` (string, required)

  - `error.details` (string, required)

  - `request_id` (string, required)

## Response 403 fields (application/json):

  - `error` (object, required)

  - `error.code` (integer, required)
    Example: 123

  - `error.message` (string, required)

  - `error.details` (string, required)

  - `request_id` (string, required)

## Response 405 fields (application/json):

  - `error` (object, required)

  - `error.code` (integer, required)
    Example: 123

  - `error.message` (string, required)

  - `error.details` (string, required)

  - `request_id` (string, required)

## Response 413 fields (application/json):

  - `error` (object, required)

  - `error.code` (integer, required)
    Example: 123

  - `error.message` (string, required)

  - `error.details` (string, required)

  - `request_id` (string, required)

## Response 415 fields (application/json):

  - `error` (object, required)

  - `error.code` (integer, required)
    Example: 123

  - `error.message` (string, required)

  - `error.details` (string, required)

  - `request_id` (string, required)

## Response 422 fields (application/json):

  - `error` (object, required)

  - `error.code` (integer, required)
    Example: 123

  - `error.message` (string, required)

  - `error.details` (string, required)

  - `request_id` (string, required)

## Response 429 fields (application/json):

  - `error` (object, required)

  - `error.code` (integer, required)
    Example: 123

  - `error.message` (string, required)

  - `error.details` (string, required)

  - `request_id` (string, required)

## Response 500 fields (application/json):

  - `error` (object, required)

  - `error.code` (integer, required)
    Example: 123

  - `error.message` (string, required)

  - `error.details` (string, required)

  - `request_id` (string, required)

