> ## 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.

# Quickstart

> Get a Rendi API key and run your first FFmpeg command in under 2 minutes.

<Note>
  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](/coding-agents).
</Note>

## Get your free API key

<Card icon="key" title="Register to Rendi, activate your account and get your API key" href="https://app.rendi.dev/sign-up?loc=doc-quickstart" />

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

We will want to run the following FFmpeg command:

```bash theme={null}
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

<Tabs>
  <Tab title="Node.js">
    ```js theme={null}
    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);
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import os
    import requests

    API_KEY = os.environ["RENDI_API_KEY"]

    submit = requests.post(
        "https://api.rendi.dev/v1/run-ffmpeg-command",
        headers={"X-API-KEY": API_KEY},
        json={
            "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}}",
        },
    )
    print("Command ID:", submit.json()["command_id"])
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl --location 'https://api.rendi.dev/v1/run-ffmpeg-command' \
    --header 'X-API-KEY: <api-key>' \
    --header 'Content-Type: application/json; charset=utf-8' \
    --data '{
        "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}}"
    }'
    ```
  </Tab>
</Tabs>

<Note>
  [Documentation for /run-ffmpeg-command ](/api-reference/endpoint/run-ffmpeg-command)
</Note>

Running this command will return the command\_id:

```json theme={null}
{
  "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

<Tabs>
  <Tab title="Node.js">
    ```js theme={null}
    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);
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    res = requests.get(
        f"https://api.rendi.dev/v1/commands/{command_id}",
        headers={"X-API-KEY": API_KEY},
    ).json()
    print("Status:", res["status"])
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl --request GET \
      --url https://api.rendi.dev/v1/commands/{command_id} \
      --header 'X-API-KEY: <api-key>'
    ```
  </Tab>
</Tabs>

While processing the command will pass from status `QUEUED ` to `PROCESSING` to `SUCCESS`

```json theme={null}
{
    "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.&#x20;

## 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
