Api referenceFiles
Upload File
Upload a file directly to RenderIO storage via multipart form data.
Upload File
POST /api/v1/files/uploadUpload 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
| Header | Type | Required | Description |
|---|---|---|---|
Content-Type | string | Yes | Must be multipart/form-data |
X-API-KEY | string | Yes | Your API key with ffsk_ prefix |
Body
Multipart form data with a single file field:
| Field | Type | Required | Description |
|---|---|---|---|
file | File | Yes | The file to upload. |
Response
200 OK
{
file_id: string;
}| Field | Type | Description |
|---|---|---|
file_id | string | Unique identifier for the uploaded file. Use this to poll for processing status. |
Error responses
| Status | Error | Description |
|---|---|---|
401 | UNAUTHORIZED | Missing or invalid API key. |
422 | VALIDATION_ERROR | Content-Type is not multipart/form-data, or the file field is missing from the form data. |
429 | RATE_LIMITED | Too 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"])