---
title: "Fit Video"
method: POST
path: "/fit"
tags: ["Edit"]
---

# Fit Video

`POST /fit`

Fit your original video to different ratios or width and height options. Apply fit when resizing and cropping is not an option.

## Request body

- object
  - `video_url` string, uri — Source video URL.
  - `ratio` number, float, nullable — The value should be a single floating point number which represents the ratio of width and height. The formula is: parameter value = width / height. The default value is that of the original video.
  - `width` integer, nullable — Width of the outcome video. If the new width is larger than the original width, the blurry mirror effect should be applied to the additional part. The measurement unit is px. The default value is the original width. Value must be at least 16 px.
  - `height` integer, nullable — Height of the outcome video. If the new height is larger than the original height, the blurry mirror effect should be applied to the additional part. The measurement unit is px. The default value is the original height. Value must be at least 16 px.
  - `bg_color` string, nullable — Can be a hexcolor code (e.g., #82d5fa, #fff) or a color name (e.g., blue). For semi-transparency, 4-/8-digit hexcodes are also supported (e.g., #18d4ff87). (If this parameter is present, the other bg_ parameters must be empty).
  - `bg_blur` integer — Enter an integer value from 0 to 100.
  - `bg_image_url` string, uri — Background image URL.
  - `bg_video_url` string, uri — Background video URL.

## Response `202`

Requested successfully accepted when doing asynchronous transformation.

- object
  - `transaction_id` string, nullable
  - `status` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `402` — Payment Required
- `403` — Forbidden
- `404` — Not Found
- `405` — Method Not Allowed
- `413` — Request Entity Too Large
- `415` — Unsupported Media Type
- `429` — Too Many Requests
- `431` — Request Header Fields Too Large
- `500` — Internal Server Error
- `503` — Service Unavailable

---

[API](https://skmtc.net/picsart/apis/picsart-programmable-image-apis.md) · [All operations](https://skmtc.net/picsart/apis/picsart-programmable-image-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/picsart/picsart-programmable-image-apis/versions/726b2a637ae8/schema)
