RenderIO
Api referenceFiles

Upload File

Upload a file directly to RenderIO storage via multipart form data.

Upload File

POST /api/v1/files/upload

Upload a file directly to RenderIO storage using multipart form data. The file is stored in R2 and processed asynchronously to extract metadata (duration, codec, resolution, etc.). Poll the Get File endpoint to check when processing is complete.

Uploaded files can be referenced by their storage_url in subsequent FFmpeg commands as input files.

Authentication

Requires API key via X-API-KEY header.

Request

Headers

HeaderTypeRequiredDescription
Content-TypestringYesMust be multipart/form-data
X-API-KEYstringYesYour API key with ffsk_ prefix

Body

Multipart form data with a single file field:

FieldTypeRequiredDescription
fileFileYesThe file to upload.

Response

200 OK

{
  file_id: string;
}
FieldTypeDescription
file_idstringUnique identifier for the uploaded file. Use this to poll for processing status.

Error responses

StatusErrorDescription
401UNAUTHORIZEDMissing or invalid API key.
422VALIDATION_ERRORContent-Type is not multipart/form-data, or the file field is missing from the form data.
429RATE_LIMITEDToo many requests. Retry after the period indicated in the Retry-After header.

Examples

curl

curl -X POST https://renderio.dev/api/v1/files/upload \
  -H "X-API-KEY: ffsk_your_api_key_here" \
  -F "file=@/path/to/video.mp4"

JavaScript (fetch)

const formData = new FormData();
formData.append("file", fileBlob, "video.mp4");

const response = await fetch("https://renderio.dev/api/v1/files/upload", {
  method: "POST",
  headers: {
    "X-API-KEY": "ffsk_your_api_key_here",
  },
  body: formData,
});

const { file_id } = await response.json();
console.log("File ID:", file_id);

Python (requests)

import requests

with open("/path/to/video.mp4", "rb") as f:
    response = requests.post(
        "https://renderio.dev/api/v1/files/upload",
        headers={
            "X-API-KEY": "ffsk_your_api_key_here",
        },
        files={
            "file": ("video.mp4", f, "video/mp4"),
        },
    )

data = response.json()
print("File ID:", data["file_id"])

On this page