Most Bria video endpoints take a video parameter that points to a publicly accessible URL. When your video lives on your own machine rather than at a public URL, use the upload service to get a temporary hosted URL you can pass straight into those endpoints.
The flow is three steps:
- Request a presigned upload URL. Call
POST /v2/video/uploadto get anupload_url, theupload_fieldsneeded to authenticate the upload, and thefile_urlyour video will live at. - Upload the file.
POSTthe video directly toupload_urlas multipart form data. - Process the video. Pass
file_urlas thevideoinput to any video editing endpoint.
client.upload() wraps all three steps and returns the hosted URL:
from bria_client import BriaSyncClient
client = BriaSyncClient() # reads BRIA_API_TOKEN
file_url = client.upload("path/to/video.mp4", media_type="video/mp4")
job = client.submit(endpoint="video/edit/remove_background", payload={"video": file_url})
result = client.poll(job, interval=5, timeout=600)
print(result.result.video_url)POST /v2/video/uploadBody (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
media_type | string | No | MIME type of the video you intend to upload, e.g. "video/mp4". When omitted, the server falls back to a "video/" content-type prefix. |
An empty body ({}) is also valid.
Response (result)
| Field | Type | Description |
|---|---|---|
upload_url | string | Presigned URL to upload your video to. Valid for 1 hour. |
upload_fields | object | Presigned form fields (key, policy, signature, etc.) that must be included in the upload POST to authenticate it. |
file_url | string | The URL your video will be available at after upload. Pass this as the video input to any video endpoint. Valid for 1 day. |
POST the video to upload_url as multipart/form-data. The upload_fields must be sent as form fields before the file field: they are validated in order, so the file must come last. A successful upload returns HTTP 204 No Content.
Pass file_url as the video input to any video editing endpoint, for example POST /v2/video/edit/remove_background with { "video": "<file_url>" }. Video endpoints are asynchronous: a successful call returns HTTP 202 with a request_id and a status_url. Poll it until status is COMPLETED (or ERROR); the finished video is then available at result.video_url. See Async requests and polling.
| Constraint | Value |
|---|---|
| Content type | Video files only |
| Max file size | 1 GB |
upload_url validity | 1 hour |
file_url validity | 1 day |
Security note: Both
upload_urlandfile_urlare unauthenticated. Anyone holding either can upload to or download from your file. Treat them as secrets and do not share them beyond your processing pipeline.