RenderIO
Api referencePresets

Execute Preset

Execute a preset by providing input files. The FFmpeg command and output files are defined by the preset.

Execute Preset

POST /api/v1/presets/:presetId/execute

Execute a preset by providing only the input files. The FFmpeg command configuration and output file definitions come from the preset. This simplifies repeated processing -- instead of specifying the full command each time, you reference a preset and supply the inputs.

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

Path parameters

ParameterTypeRequiredDescription
presetIdstringYesThe unique identifier of the preset to execute.

Body

interface ExecutePresetRequest {
  input_files: Record<string, string>;
  metadata?: Record<string, string | number | boolean>;
  webhook_url?: string;
}
FieldTypeRequiredDescription
input_filesRecord<string, string>YesMap of in_* alias keys to file URLs. Must match the preset's input_file_keys exactly -- no missing keys, no extra keys.
metadataRecord<string, string | number | boolean>NoAdditional metadata for this execution. Merged with the preset's metadata. Maximum 10 keys.
webhook_urlstringNoURL to receive a POST request when the command completes. Overrides any account-level webhook configuration.

The input_files keys are validated against the preset's input_file_keys. If any expected key is missing or any unexpected key is provided, the request is rejected with a 422 error.

Response

200 OK

{
  command_id: string;
}
FieldTypeDescription
command_idstringUnique identifier for the command. Use this to poll for status via GET /api/v1/commands/:commandId.

Error responses

StatusErrorDescription
401UNAUTHORIZEDMissing or invalid API key.
404NOT_FOUNDPreset does not exist or does not belong to your account.
422VALIDATION_ERRORInput file keys do not match the preset's expected keys (missing or extra keys).
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/prs_abc123/execute \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: ffsk_your_api_key_here" \
  -d '{
    "input_files": {
      "in_video": "https://example.com/sample.mp4"
    },
    "metadata": {
      "batch": "2024-01",
      "source": "upload"
    }
  }'

JavaScript (fetch)

const presetId = "prs_abc123";

const response = await fetch(
  `https://renderio.dev/api/v1/presets/${presetId}/execute`,
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "X-API-KEY": "ffsk_your_api_key_here",
    },
    body: JSON.stringify({
      input_files: {
        in_video: "https://example.com/sample.mp4",
      },
      metadata: {
        batch: "2024-01",
        source: "upload",
      },
    }),
  },
);

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

Python (requests)

import requests

preset_id = "prs_abc123"

response = requests.post(
    f"https://renderio.dev/api/v1/presets/{preset_id}/execute",
    headers={
        "Content-Type": "application/json",
        "X-API-KEY": "ffsk_your_api_key_here",
    },
    json={
        "input_files": {
            "in_video": "https://example.com/sample.mp4",
        },
        "metadata": {
            "batch": "2024-01",
            "source": "upload",
        },
    },
)

data = response.json()
print("Command ID:", data["command_id"])

On this page