Start · Overview

# Overview

LogicBoostKit Media runs FFmpeg and ffprobe over HTTP. You send a task as JSON; it reads your files, writes the outputs and tells you what the job cost. The API is compatible with the ffmpeg-api.com API: the same paths, fields, status codes and error shape.

## Before you start

What every request needs

- **Base URL**: `https://media.logicboostkit.com`
- **API key**: `Authorization: Basic <your key>` on every request. [Sign up](https://media.logicboostkit.com/sign-up), add a card, and create a key in the console. See [Authentication](https://media.logicboostkit.com/docs/authentication).
- **Format**: Requests and responses are JSON. Files travel separately, to and from signed URLs.

The examples read the key from `$MEDIA_KEY`, set to what follows “Basic ” in the header value the console shows.

## Quick start

01

### Register a file

Tell the API the file’s name. It answers with the file’s `file_path` and a URL to upload to.

```bash
curl https://media.logicboostkit.com/file \
  -H "Authorization: Basic $MEDIA_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "file_name": "source.mp4" }'
```

```json
{
  "ok": true,
  "file": {
    "dir_id": "dir_pi23jgy1yxlmigi873bz",
    "file_name": "source.mp4",
    "file_path": "dir_pi23jgy1yxlmigi873bz/source.mp4",
    "added_on": "2026-10-13T09:41:07.214Z"
  },
  "upload": {
    "url": "https://…",
    "method": "PUT",
    "headers": {},
    "expiresInSeconds": 300
  }
}
```

02

### Upload it

Send the bytes to `upload.url` with `PUT`. The URL works for 5 minutes.

```bash
curl -X PUT "$UPLOAD_URL" --upload-file source.mp4
```

03

### Process it

Name the input by its `file_path` and say what to write. The answer comes when the job has finished.

```bash
curl https://media.logicboostkit.com/ffmpeg/process \
  -H "Authorization: Basic $MEDIA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "task": {
      "inputs": [{ "file_path": "dir_pi23jgy1yxlmigi873bz/source.mp4" }],
      "outputs": [{ "file": "output.mp4", "options": ["-crf", "23"] }]
    }
  }'
```

04

### Download the result

Each entry of `result[]` has a `download_url`, good for 1 hour. Later, ask [GET /file/download](https://media.logicboostkit.com/docs/get-file-download) for a fresh one.

```bash
curl -o output.mp4 "$DOWNLOAD_URL"
```

To skip the upload, give an input’s `file_path` as a public HTTPS URL. For a long job, use [the async endpoint](https://media.logicboostkit.com/docs/post-ffmpeg-process-async) and a webhook.

## Endpoints

Every endpoint

- `POST /file`: Register a file name and get a URL to upload it to.
- `GET /file/{dirId}/{fileName}`: A file’s path, type and size.
- `GET /file/download/{dirId}/{fileName}`: A URL to download a file from.
- `DELETE /file/{dirId}/{fileName}`: Delete a file now.
- `POST /directory`: Create a directory with a lifetime.
- `GET /directory`: List your directories.
- `GET /directory/{dirId}`: List the files in a directory.
- `POST /ffmpeg/process`: Run a task and wait for the result.
- `POST /ffmpeg/process/async`: Queue a task; read the result later or receive a webhook.
- `GET /job/{jobId}`: An async job’s status and result.
- `DELETE /job/{jobId}`: Cancel a job that is still pending.
- `GET /jobs`: List your async jobs.
- `POST /ffprobe/analyze`: Run ffprobe on a file.
- `GET /account/usage`: One row per charged request, as CSV or JSON.

## For tools and agents

Machine-readable descriptions of the API

- **[OpenAPI 3.1](https://media.logicboostkit.com/openapi.json)**: Every endpoint, its request and response schemas, the error shape and these docs’ examples.
- **[Agent Skill](https://media.logicboostkit.com/docs/skill.md)**: How an AI agent should use the API: the task shape, sync or async, limits, errors and a checklist.
- **[llms.txt](https://media.logicboostkit.com/llms.txt)**: An index of these docs as Markdown. Every page is also at its URL with .md added.

## What happens to your files

Files live in directories, and a directory is deleted with everything in it when it expires: 24 hours after it is created unless you set another lifetime, 7 days at most. Nothing is kept after that except one billing line per charged request. Download what you need before then.
