RenderIO
Api referencePresets

Create Preset

Create a reusable preset that stores FFmpeg command configuration for repeated execution.

Create Preset

POST /api/v1/presets

Create a reusable preset that encapsulates an FFmpeg command configuration. Presets store the command, input file aliases, and output file definitions so you can execute the same processing pipeline repeatedly by providing only the input files.

Authentication

Requires API key via X-API-KEY header.

Request

Headers

HeaderTypeRequiredDescription
Content-TypestringYesMust be application/json
X-API-KEYstringYesYour API key with ffsk_ prefix

Body

interface CreatePresetRequest {
  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>;
}
FieldTypeRequiredDescription
namestringYesA descriptive name for the preset.
descriptionstringNoOptional description of what the preset does.
command_typestringNoOne of FFMPEG_COMMAND, CHAINED_COMMAND, or MULTIPLE_COMMAND. Defaults to FFMPEG_COMMAND.
ffmpeg_commandstringConditionalThe FFmpeg command with {{alias}} placeholders. Required when command_type is FFMPEG_COMMAND.
ffmpeg_commandsstring[]ConditionalArray of FFmpeg commands to run sequentially. Required when command_type is CHAINED_COMMAND.
input_file_keysstring[]YesArray of in_* alias keys that the preset expects as input.
output_file_definitionsRecord<string, string>YesMap of out_* alias names to output filenames.
metadataRecord<string, string | number | boolean>NoArbitrary key-value metadata attached to the preset. Maximum 10 keys.

Response

201 Created

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;
}
FieldTypeDescription
preset_idstringUnique identifier for the preset.
namestringThe preset name.
descriptionstring | nullThe preset description, or null if not provided.
is_systembooleanWhether this is a system-provided preset. Always false for user-created presets.
command_typestringThe type of command configuration stored in the preset.
ffmpeg_commandstring | nullThe FFmpeg command template, or null if not applicable.
ffmpeg_commandsstring[] | nullThe array of FFmpeg commands, or null if not applicable.
input_file_keysstring[]The expected input file alias keys.
output_file_definitionsRecord<string, string>The output file alias-to-filename mapping.
metadataRecord<string, string | number | boolean> | nullThe attached metadata, or null if not provided.
created_atstringISO 8601 timestamp of when the preset was created.
updated_atstringISO 8601 timestamp of when the preset was last updated.

Error responses

StatusErrorDescription
400INVALID_REQUESTMissing required fields or invalid field values.
401UNAUTHORIZEDMissing or invalid API key.
422VALIDATION_ERRORValidation failed (e.g., metadata exceeds 10 keys, missing command for command type).
429RATE_LIMITEDToo many requests. Retry after the period indicated in the Retry-After header.

Examples

curl

curl -X POST https://renderio.dev/api/v1/presets \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: ffsk_your_api_key_here" \
  -d '{
    "name": "MP4 to WebM",
    "description": "Convert an MP4 video to WebM format using VP9 codec",
    "command_type": "FFMPEG_COMMAND",
    "ffmpeg_command": "ffmpeg -i {{in_video}} -c:v libvpx-vp9 -crf 30 -b:v 0 {{out_video}}",
    "input_file_keys": ["in_video"],
    "output_file_definitions": {
      "out_video": "result.webm"
    },
    "metadata": {
      "codec": "vp9",
      "format": "webm"
    }
  }'

JavaScript (fetch)

const response = await fetch("https://renderio.dev/api/v1/presets", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-KEY": "ffsk_your_api_key_here",
  },
  body: JSON.stringify({
    name: "MP4 to WebM",
    description: "Convert an MP4 video to WebM format using VP9 codec",
    command_type: "FFMPEG_COMMAND",
    ffmpeg_command:
      "ffmpeg -i {{in_video}} -c:v libvpx-vp9 -crf 30 -b:v 0 {{out_video}}",
    input_file_keys: ["in_video"],
    output_file_definitions: {
      out_video: "result.webm",
    },
    metadata: {
      codec: "vp9",
      format: "webm",
    },
  }),
});

const preset = await response.json();
console.log("Preset ID:", preset.preset_id);

Python (requests)

import requests

response = requests.post(
    "https://renderio.dev/api/v1/presets",
    headers={
        "Content-Type": "application/json",
        "X-API-KEY": "ffsk_your_api_key_here",
    },
    json={
        "name": "MP4 to WebM",
        "description": "Convert an MP4 video to WebM format using VP9 codec",
        "command_type": "FFMPEG_COMMAND",
        "ffmpeg_command": "ffmpeg -i {{in_video}} -c:v libvpx-vp9 -crf 30 -b:v 0 {{out_video}}",
        "input_file_keys": ["in_video"],
        "output_file_definitions": {
            "out_video": "result.webm",
        },
        "metadata": {
            "codec": "vp9",
            "format": "webm",
        },
    },
)

data = response.json()
print("Preset ID:", data["preset_id"])

On this page