Skip to main content

Documentation Index

Fetch the complete documentation index at: https://rendi.dev/docs/llms.txt

Use this file to discover all available pages before exploring further.

Using a coding agent like Claude Code, Cursor, VS Code Copilot, Codex, or Gemini CLI? Wire up Rendi’s MCP server first — see /coding-agents.

Get your free API key

Register to Rendi, activate your account and get your API key

Run a command to generate a gif from the first minute of a video

We will want to run the following FFmpeg command:
ffmpeg -i https://storage.rendi.dev/sample/sample.avi -vf "select='lte(t,60)*gt(trunc(t/10),trunc(prev_t/10))',setpts='PTS*0.025',scale=trunc(oh*a/2)*2:320:force_original_aspect_ratio=decrease,pad=trunc(oh*a/2)*2:320:-1:-1" -an -vsync vfr output1.gif

Use the same command in Rendi

const API_KEY = process.env.RENDI_API_KEY;

const submit = await fetch("https://api.rendi.dev/v1/run-ffmpeg-command", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-KEY": API_KEY,
  },
  body: JSON.stringify({
    input_files: {
      in_1: "https://storage.rendi.dev/sample/sample.avi",
    },
    output_files: {
      out_1: "output1.gif",
    },
    ffmpeg_command:
      "-i {{in_1}} -vf \"select='lte(t,60)*gt(trunc(t/10),trunc(prev_t/10))',setpts='PTS*0.025',scale=trunc(oh*a/2)*2:320:force_original_aspect_ratio=decrease,pad=trunc(oh*a/2)*2:320:-1:-1\" -an -vsync vfr {{out_1}}",
  }),
});
const { command_id } = await submit.json();
console.log("Command ID:", command_id);
Running this command will return the command_id:
{
  "command_id": "089dd36c-723c-4a0a-b68a-8e8cbcc1afd2"
}
The command now runs in Rendi and you can check its status:

Poll the command_id until it reaches status SUCCESS

const res = await fetch(`https://api.rendi.dev/v1/commands/${command_id}`, {
  headers: { "X-API-KEY": API_KEY },
});
const data = await res.json();
console.log("Status:", data.status);
While processing the command will pass from status QUEUED to PROCESSING to SUCCESS
{
    "command_id": "089dd36c-723c-4a0a-b68a-8e8cbcc1afd2",
    "status": "SUCCESS",
    "command_type": "FFMPEG_COMMAND",
    "total_processing_seconds": 8.333879,
    "ffmpeg_command_run_seconds": 5.734427452087402,
    "vcpu_count": 8,
    "output_files": {
        "out_1": {
            "file_id": "da09eaa7-904f-45e2-a727-74760b2696f6",
            "storage_url": "https://storage.rendi.dev/files/bb0e5c57-2721-4cc5-9453-ceeb2fa60e33/089dd36c-723c-4a0a-b68a-8e8cbcc1afd2/output1.gif",
            "status": "STORED",
            "rendi_store_type": "OUTPUT",
            "is_deleted": false,
            "size_mbytes": 0.3879680633544922,
            "file_type": "image",
            "file_format": "gif",
            "width": 568,
            "height": 320
        }
    },
    "original_request": {
        "input_files": {
            "in_1": "https://storage.rendi.dev/sample/sample.avi"
        },
        "output_files": {
            "out_1": "output1.gif"
        },
        "ffmpeg_command": "-i {{in_1}} -vf \"select='lte(t,60)*gt(trunc(t/10),trunc(prev_t/10))',setpts='PTS*0.025',scale=trunc(oh*a/2)*2:320:force_original_aspect_ratio=decrease,pad=trunc(oh*a/2)*2:320:-1:-1\" -an -vsync vfr {{out_1}}"
    }
}
When the status reaches SUCCESS Rendi will return the stored output file with it.

Get your output files

The result is hosted on Rendi’s storage, with a CDN - you can download it and you can serve it as is to your users