One skill.
Your agent’s next trick.
Give your assistant a recording and a reference you love. It takes care of the upload, the edit, and the finished MP4.
1. Add the skill
One command. Choose Codex, Claude Code, Cursor, or another supported assistant. The skill contains the complete API workflow.
npx skills add https://disto.lol/skills/disto-edit/SKILL.mdRead the SKILL.md ↗ · Uses the open Skills installer. Installation adds instructions; it does not submit an edit.
Prefer a simple curl install?
This saves the file to Codex’s skills folder. For Claude Code, replace .codex with .claude.
mkdir -p ~/.codex/skills/disto-edit
curl --fail --silent --show-error \
https://disto.lol/skills/disto-edit/SKILL.md \
-o ~/.codex/skills/disto-edit/SKILL.md2. Connect your account
Create a key in API keys. Add it to your assistant’s environment as DISTO_API_KEY. Or enter it privately in a Bash terminal:
read -r -s -p 'Disto API key: ' DISTO_API_KEY; printf '\n'
export DISTO_API_KEYThe key stays in this shell session. For future sessions, save it in your assistant’s secret settings. Keep it out of chat and source files. Keys expire after 90 days and can be revoked anytime in the API keys page.
3. Just ask for the edit
Use the Disto skill to edit ./raw-take.mp4.
Match the style of https://www.instagram.com/reel/YOUR_REFERENCE/
Keep my opening line. Save the finished MP4 here.Your agent uses the API to upload, submit, check progress, and download. Each edit uses one credit from your account. Failed edits return the credit automatically.
MP4, MOV, or WebM · Up to 50 MiB and 10 minutes per file · Public Instagram and TikTok references.
Building your own workflow? Here’s the curl API.
Use Bash, curl, jq, and uuidgen. Run the blocks in order in the same shell after setting your key. Substitute your file and reference. Stop on any error.
set -euo pipefail
umask 077
: "${DISTO_API_KEY:?Configure DISTO_API_KEY first}"
FILE='./raw-take.mp4'
REFERENCE='https://www.instagram.com/reel/YOUR_REFERENCE/'
CONTENT_TYPE='video/mp4' # MOV: video/quicktime; WebM: video/webm
JOB_DIR=$(mktemp -d './disto-job.XXXXXX')
printf 'Job files: %s\n' "$JOB_DIR"
# Pass the key through stdin, not curl's command-line arguments.
disto_api() {
local path="$1"; shift
printf 'Authorization: Bearer %s\n' "$DISTO_API_KEY" |
curl --fail-with-body --silent --show-error --max-time 120 \
--header @- --header 'Content-Type: application/json' \
"https://disto.lol/api/v1$path" "$@"
}
jq -n --arg filename "$(basename "$FILE")" \
--argjson size "$(wc -c < "$FILE" | tr -d '[:space:]')" \
--arg contentType "$CONTENT_TYPE" \
'{filename:$filename,size:$size,contentType:$contentType}' \
> "$JOB_DIR/upload-request.json"
disto_api /uploads --data-binary @"$JOB_DIR/upload-request.json" \
> "$JOB_DIR/upload.json"
UPLOAD_ID=$(jq -er '.uploadId' "$JOB_DIR/upload.json")
UPLOAD_URL=$(jq -er '.signedUrl' "$JOB_DIR/upload.json")
curl --fail-with-body --silent --show-error --max-time 600 \
--request PUT --header "Content-Type: $CONTENT_TYPE" \
--upload-file "$FILE" "$UPLOAD_URL" > /dev/nulljq -n --arg uploadId "$UPLOAD_ID" --arg referenceUrl "$REFERENCE" \
--arg title 'My next video' \
--arg notes 'Follow the reference pacing and caption style.' \
--arg idempotencyKey "$(uuidgen)" \
'{uploadId:$uploadId,referenceUrl:$referenceUrl,title:$title,
notes:$notes,idempotencyKey:$idempotencyKey}' \
> "$JOB_DIR/edit-request.json"
disto_api /edits --data-binary @"$JOB_DIR/edit-request.json" \
> "$JOB_DIR/edit.json"
EDIT_ID=$(jq -er '.id' "$JOB_DIR/edit.json")
printf 'Edit ID: %s\n' "$EDIT_ID"The job folder saves your request and its unique idempotency key. If submission times out, retry that same saved request. Do not generate a new key or upload again.
disto_api "/edits/$EDIT_ID" > "$JOB_DIR/status.json"
jq '{id,status,error_message}' "$JOB_DIR/status.json"
# Repeat the status request every 10 seconds until completed or failed.
# Only run this download block when status is completed.
if [ "$(jq -r '.status' "$JOB_DIR/status.json")" = 'completed' ]; then
disto_api "/edits/$EDIT_ID/result" > "$JOB_DIR/result.json"
RESULT_URL=$(jq -er '.url' "$JOB_DIR/result.json")
# The fresh private directory avoids overwriting an existing output.
curl --fail-with-body --silent --show-error --max-time 300 \
"$RESULT_URL" --output "$JOB_DIR/ready-to-post.mp4.part"
mv -n "$JOB_DIR/ready-to-post.mp4.part" "$JOB_DIR/ready-to-post.mp4"
printf 'Finished video: %s/ready-to-post.mp4\n' "$JOB_DIR"
fiCheck status every 10 seconds. Stop on completed or failed. After 40 minutes, keep the edit ID and resume later. Closing your terminal does not cancel the job. Result links expire after five minutes; request a new link when needed.
The skill also covers error handling, safe retries, and up to five extra B-roll clips. Process batches one edit at a time.
Prefer the Disto CLI?
Optional shortcut for Node.js 22+. Uses the same API key and credits.
npm install -g https://disto.lol/disto-cli.tgz
disto edit ./raw-take.mp4 \
--reference "https://www.instagram.com/reel/YOUR_REFERENCE/" \
--wait --output ./ready-to-post.mp4disto status EDIT_ID
disto download EDIT_ID --output ./ready-to-post.mp4JSON output for agents. Retain the returned edit ID to resume an existing job.