---
name: rendi
description: Use when building video processing pipelines, automating FFmpeg
  tasks, generating thumbnails, transcoding media, trimming/merging clips,
  extracting audio, or burning subtitles. Reach for Rendi when you need to run
  FFmpeg commands at scale without managing servers, or when integrating video
  processing into applications, workflows, or automation platforms.
metadata:
  mintlify-proj: rendi
  version: "1.0"
---

# Rendi Skill

## Product summary

Rendi is a cloud FFmpeg API that runs video processing commands without installation or server management. Submit FFmpeg commands via HTTP REST, Rendi processes them on its infrastructure, and returns results to your storage. Key endpoints: `POST /v1/run-ffmpeg-command` (single command), `POST /v1/run-chained-ffmpeg-commands` (multi-step pipelines), `GET /v1/commands/{command_id}` (poll status). Authentication: `X-API-KEY` header. All examples work in Node.js, Python, cURL, or automation platforms (n8n, Make, Zapier). Primary docs: https://rendi.dev/docs

## When to use

Reach for Rendi when:
- Building video processing features (thumbnails, transcoding, trimming, merging, audio extraction)
- Running FFmpeg commands at scale without managing servers or containers
- Integrating video processing into applications, workflows, or no-code platforms
- Processing videos longer than 45 minutes or jobs that run longer than typical timeouts
- Chaining multiple FFmpeg operations in a single request (faster than sequential calls)
- Storing output files and reusing them across commands
- Needing webhooks for async notification instead of polling

Do not use Rendi for: real-time video streaming, interactive editing, or operations that require sub-second latency.

## Quick reference

### API endpoints

| Endpoint | Purpose |
|----------|---------|
| `POST /v1/run-ffmpeg-command` | Submit single FFmpeg command |
| `POST /v1/run-chained-ffmpeg-commands` | Submit multiple commands in one request |
| `GET /v1/commands/{command_id}` | Poll command status |
| `GET /v1/commands` | List all commands (paginated) |
| `POST /v1/files/init-upload` | Start direct file upload |
| `POST /v1/files/{file_id}/complete-upload` | Finalize upload |
| `POST /v1/files/store-file` | Store file from public URL |
| `GET /v1/files/{file_id}` | Get file metadata |
| `DELETE /v1/files/{file_id}` | Delete file |

### File naming rules

- Input keys must start with `in_` (e.g., `in_1`, `in_video`)
- Output keys must start with `out_` (e.g., `out_1`, `out_gif`)
- Reference them in ffmpeg_command as `{{in_1}}` and `{{out_1}}`
- Output filenames: alphanumeric + underscore + period (e.g., `output_1.mp4`)

### Command status lifecycle

```
QUEUED → PROCESSING → PREPARED_FFMPEG_COMMAND → SUCCESS
                                              → FAILED
```

### Common FFmpeg patterns

| Task | Command snippet |
|------|-----------------|
| Thumbnail at 17s | `-i {{in_1}} -ss 00:00:17 -vframes 1 {{out_1}}` |
| Trim 10-30s | `-i {{in_1}} -ss 10 -to 30 -c copy {{out_1}}` |
| Merge two videos | `-i {{in_1}} -i {{in_2}} -filter_complex "[0:v][0:a][1:v][1:a]concat=n=2:v=1:a=1[v][a]" -map "[v]" -map "[a]" {{out_1}}` |
| Extract audio | `-i {{in_1}} -vn -c:a libmp3lame -q:a 2 {{out_1}}` |
| Compress video | `-i {{in_1}} -c:v libx264 -crf 28 -c:a aac -b:a 128k {{out_1}}` |
| Resize to 1280x720 | `-i {{in_1}} -vf scale=1280:720 {{out_1}}` |

### Request structure

```json
{
  "input_files": {
    "in_1": "https://example.com/video.mp4",
    "in_2": "https://example.com/audio.mp3"
  },
  "output_files": {
    "out_1": "result.mp4"
  },
  "ffmpeg_command": "-i {{in_1}} -i {{in_2}} -c copy {{out_1}}",
  "max_command_run_seconds": 600,
  "is_private": false,
  "metadata": {"job_id": "12345"}
}
```

### Response structure (on SUCCESS)

```json
{
  "command_id": "uuid",
  "status": "SUCCESS",
  "total_processing_seconds": 8.3,
  "ffmpeg_command_run_seconds": 5.7,
  "vcpu_count": 8,
  "output_files": {
    "out_1": {
      "file_id": "uuid",
      "storage_url": "https://storage.rendi.dev/...",
      "size_mbytes": 1.5,
      "file_type": "video",
      "file_format": "mp4",
      "width": 1920,
      "height": 1080,
      "duration": 60.5
    }
  }
}
```

## Decision guidance

### When to use polling vs webhooks

| Condition | Use |
|-----------|-----|
| Job expected to run < 30 seconds | Polling (`GET /v1/commands/{command_id}`) |
| Job expected to run > 30 seconds | Webhooks (set in dashboard Configuration tab) |
| Need immediate feedback | Polling with 1-2s interval |
| Async notification preferred | Webhooks (Rendi retries up to 8 times over 10+ hours) |

### When to use chained commands vs separate calls

| Condition | Use |
|-----------|-----|
| Single FFmpeg operation | `run-ffmpeg-command` |
| Multi-step pipeline (e.g., trim → compress → thumbnail) | `run-chained-ffmpeg-commands` (single round-trip, shared quota) |
| Outputs from step N feed step N+1 | `run-chained-ffmpeg-commands` |
| Steps are independent | Either (separate calls allow parallel execution) |

### When to use direct upload vs store-file

| Condition | Use |
|-----------|-----|
| File already at public URL (S3, Dropbox, GCS, CDN) | `store-file` (Rendi fetches it) |
| Local file on client/server | `init-upload` → upload parts → `complete-upload` |
| File > 5 GB | Direct upload (supports up to 5 TB) |
| Need to stream bytes directly | Direct upload (multipart) |

### When to use private storage

| Condition | Use |
|-----------|-----|
| Output must not be publicly accessible | Set `is_private: true` on command or upload |
| Need time-limited access | Request presigned URL with `presigned_ttl_seconds` |
| Reusing private file as input | Get presigned URL first, pass as input URL |
| Trial plan | Cannot use private storage |

## Workflow

### Basic single-command workflow

1. **Prepare inputs**: Ensure input files are at publicly accessible URLs (Google Drive share link, S3 signed URL, Dropbox, CDN).
2. **Construct FFmpeg command**: Write the FFmpeg command using `{{in_*}}` and `{{out_*}}` placeholders. Test locally if complex.
3. **Set max_command_run_seconds**: Estimate runtime and set a safety cap (default 300s). For long videos or complex filters, increase it.
4. **Submit command**: POST to `/v1/run-ffmpeg-command` with `input_files`, `output_files`, `ffmpeg_command`, and `X-API-KEY` header.
5. **Capture command_id**: Extract from response.
6. **Poll or wait for webhook**: If < 30s expected, poll every 1-2s. If > 30s, set up webhook in dashboard and wait for callback.
7. **Check status**: When status is `SUCCESS`, extract `storage_url` from `output_files`. If `FAILED`, check `error_message`.
8. **Download or reuse**: Use `storage_url` directly or pass it as input to another command.

### Multi-step pipeline workflow

1. **Design pipeline**: Map out steps (e.g., trim → compress → generate thumbnail).
2. **Build command array**: Each command references outputs from previous steps as inputs.
3. **Submit chained request**: POST to `/v1/run-chained-ffmpeg-commands` with array of commands.
4. **Poll single command_id**: All steps share one command_id; poll until `SUCCESS` or `FAILED`.
5. **Extract all outputs**: Response includes outputs from all steps.

### Direct upload workflow

1. **Initialize**: POST to `/v1/files/init-upload` with `filename` and `size_bytes`. Get back `file_id`, `part_size`, `upload_urls`.
2. **Split file**: Divide local file into chunks of exactly `part_size` bytes (last chunk can be smaller).
3. **Upload parts in parallel**: PUT each chunk to its corresponding URL. Collect `ETag` header from each response.
4. **Complete upload**: POST to `/v1/files/{file_id}/complete-upload` with array of `{part_number, etag}` pairs.
5. **Wait for FFprobe**: File status transitions from `UPLOADED` to `STORED` as metadata is extracted. Poll `GET /v1/files/{file_id}` to observe.
6. **Use as input**: Once `STORED`, pass the `file_id` or `storage_url` to FFmpeg commands.

## Common gotchas

- **Forgetting `in_` / `out_` prefixes**: Input and output keys must start with these prefixes or Rendi rejects the request. Check every key name.
- **Hardcoding `ffmpeg` in command**: Don't write `ffmpeg -i ...`; Rendi adds it. Just write `-i {{in_1}} ...`.
- **Using private URLs as inputs**: Rendi cannot fetch files from private S3 buckets, Google Drive without share links, or password-protected URLs. Use signed/public URLs only.
- **Not setting max_command_run_seconds for long jobs**: Default is 300s (5 min). Videos over 45 min or complex filters will timeout. Set it explicitly to match expected runtime.
- **Polling too aggressively**: Polling every 100ms wastes quota and hits rate limits. Use 1-2s intervals or webhooks instead.
- **Forgetting to escape curly brackets in automation platforms**: In Make, Zapier, n8n, replace `{{in_1}}` with `\{\{in_1\}\}` to avoid platform variable interpolation.
- **Reusing presigned URLs after TTL expires**: Presigned URLs are time-limited. Request a fresh one if the old one expires.
- **Mixing public and private files**: If any output is private, all outputs in that command are private. Plan accordingly.
- **Not checking error_message on FAILED status**: Always inspect `error_message` and `error_status` to debug failures (e.g., `UNREACHABLE_INPUT_FILE`, `FFMPEG_COMMAND_FAILED`).
- **Assuming output files persist forever**: Output files are stored indefinitely until you delete them. Clean up old files to manage storage quota.

## Verification checklist

Before submitting a Rendi integration:

- [ ] API key is stored in environment variable, not hardcoded
- [ ] All input URLs are publicly accessible (test in incognito browser)
- [ ] Input keys start with `in_`, output keys start with `out_`
- [ ] FFmpeg command uses `{{in_*}}` and `{{out_*}}` placeholders, not hardcoded filenames
- [ ] `max_command_run_seconds` is set to a value matching expected runtime (not just default 300s)
- [ ] Output filenames contain only alphanumeric, underscore, and period characters
- [ ] Error handling checks both `status` and `error_message` fields
- [ ] Polling interval is 1-2 seconds (not sub-second or too aggressive)
- [ ] Webhook endpoint (if used) responds within 15 seconds
- [ ] Private files are requested with `presigned_ttl_seconds` before passing to next command
- [ ] Storage quota is monitored; old files are deleted when no longer needed
- [ ] Test with a small/short input file first before scaling to production

## Resources

- **Comprehensive page index**: https://rendi.dev/docs/llms.txt
- **Full documentation**: https://rendi.dev/docs
- **OpenAPI spec** (canonical request/response schema): https://rendi.dev/docs/api-reference/openapi.json
- **FFmpeg cheatsheet** (canonical patterns for common operations): https://github.com/rendi-api/ffmpeg-cheatsheet
- **API Reference**: https://rendi.dev/docs/api-reference/introduction
- **Examples** (thumbnail, trim, merge, transcode, etc.): https://rendi.dev/docs/examples
- **Integrations** (n8n, Make, Zapier): https://rendi.dev/docs/n8n

---

> For additional documentation and navigation, see: https://rendi.dev/docs/llms.txt