Api referencePresets
Update Preset
Update an existing user-owned preset. System presets cannot be modified.
Update Preset
PUT /api/v1/presets/:presetIdUpdate an existing preset that belongs to your account. At least one field must be provided. System presets cannot be modified.
Authentication
Requires API key via X-API-KEY header.
Request
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Content-Type | string | Yes | Must be application/json |
X-API-KEY | string | Yes | Your API key with ffsk_ prefix |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
presetId | string | Yes | The unique identifier of the preset to update. |
Body
interface UpdatePresetRequest {
name?: string;
description?: string;
command_type?: "FFMPEG_COMMAND" | "CHAINED_COMMAND" | "MULTIPLE_COMMAND";
ffmpeg_command?: string;
ffmpeg_commands?: string[];
input_file_keys?: string[];
output_file_definitions?: Record<string, string>;
metadata?: Record<string, string | number | boolean>;
}| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Updated name for the preset. |
description | string | No | Updated description. |
command_type | string | No | Updated command type. One of FFMPEG_COMMAND, CHAINED_COMMAND, or MULTIPLE_COMMAND. |
ffmpeg_command | string | No | Updated FFmpeg command template with {{alias}} placeholders. |
ffmpeg_commands | string[] | No | Updated array of FFmpeg commands for chained execution. |
input_file_keys | string[] | No | Updated array of expected in_* alias keys. |
output_file_definitions | Record<string, string> | No | Updated map of out_* alias names to output filenames. |
metadata | Record<string, string | number | boolean> | No | Updated metadata. Replaces existing metadata entirely. Maximum 10 keys. |
At least one field must be provided in the request body.
Response
200 OK
Returns the updated PresetResponse object. See Create Preset for the full schema.
interface PresetResponse {
preset_id: string;
name: string;
description: string | null;
is_system: boolean;
command_type: "FFMPEG_COMMAND" | "CHAINED_COMMAND" | "MULTIPLE_COMMAND";
ffmpeg_command: string | null;
ffmpeg_commands: string[] | null;
input_file_keys: string[];
output_file_definitions: Record<string, string>;
metadata: Record<string, string | number | boolean> | null;
created_at: string;
updated_at: string;
}Error responses
| Status | Error | Description |
|---|---|---|
400 | INVALID_REQUEST | No fields provided or invalid field values. |
401 | UNAUTHORIZED | Missing or invalid API key. |
404 | NOT_FOUND | Preset does not exist, does not belong to your account, or is a system preset. |
422 | VALIDATION_ERROR | Validation failed (e.g., metadata exceeds 10 keys). |
429 | RATE_LIMITED | Too many requests. Retry after the period indicated in the Retry-After header. |
Examples
curl
curl -X PUT https://renderio.dev/api/v1/presets/prs_abc123 \
-H "Content-Type: application/json" \
-H "X-API-KEY: ffsk_your_api_key_here" \
-d '{
"name": "MP4 to WebM (High Quality)",
"ffmpeg_command": "ffmpeg -i {{in_video}} -c:v libvpx-vp9 -crf 20 -b:v 0 {{out_video}}",
"metadata": {
"codec": "vp9",
"quality": "high"
}
}'JavaScript (fetch)
const presetId = "prs_abc123";
const response = await fetch(
`https://renderio.dev/api/v1/presets/${presetId}`,
{
method: "PUT",
headers: {
"Content-Type": "application/json",
"X-API-KEY": "ffsk_your_api_key_here",
},
body: JSON.stringify({
name: "MP4 to WebM (High Quality)",
ffmpeg_command:
"ffmpeg -i {{in_video}} -c:v libvpx-vp9 -crf 20 -b:v 0 {{out_video}}",
metadata: {
codec: "vp9",
quality: "high",
},
}),
},
);
const preset = await response.json();
console.log("Updated preset:", preset.name);Python (requests)
import requests
preset_id = "prs_abc123"
response = requests.put(
f"https://renderio.dev/api/v1/presets/{preset_id}",
headers={
"Content-Type": "application/json",
"X-API-KEY": "ffsk_your_api_key_here",
},
json={
"name": "MP4 to WebM (High Quality)",
"ffmpeg_command": "ffmpeg -i {{in_video}} -c:v libvpx-vp9 -crf 20 -b:v 0 {{out_video}}",
"metadata": {
"codec": "vp9",
"quality": "high",
},
},
)
preset = response.json()
print("Updated preset:", preset["name"])