4. Recipes

The route never changes — only the three form fields do. Each recipe below is the same POST https://metaplatho.com/api/v1/jobs/upload with a different service_slug / operation_key / params.

Goal service_slug operation_key params
Compress a photo to 70% JPEG photoconvert compress {"quality": 70, "format": "jpeg"}
Photo to WebP photoconvert convert {"format": "webp", "quality": 85}
Square crop photoconvert crop {"crop_aspect": "1:1"}
Round avatar, transparent photoconvert circle {"diameter": 512}
Strip EXIF + GPS photoconvert strip_meta {"strip_metadata": true, "strip_gps": true}
Instagram portrait size photoconvert social {"width": 1080, "height": 1350, "resize_mode": "fill"}
Blur a photo, silhouette only photoconvert blur {} (= {"strength": 7})
Caption on a photo photoconvert text {"text": "Sale -30%", "position": "bottom", "bold": true, "background_opacity": 0.5}
Shrink a video clipconvert compress {"level": "medium"}
Exactly 1280×720, letterboxed clipconvert resize {"width": 1280, "height": 720, "mode": "pad"}
First 30 seconds clipconvert trim {"start": 0, "duration": 30}
Video → GIF clipconvert gif {"start": 0, "duration": 5, "fps": 15, "width": 480}
Rip the audio clipconvert extract_audio {"format": "mp3"}
Burn auto-captions clipconvert subtitles {"style": "karaoke", "position": "top"}
Speech → SRT file clipconvert transcribe {"format": "srt"}
Telegram video note clipconvert circle {"format": "note", "diameter": 512, "duration": 60}
Landscape → TikTok canvas clipconvert blur_bg {"width": 1080, "height": 1920, "bg_mode": "blur"}

Written out in full, one of them:

curl -s https://metaplatho.com/api/v1/jobs/upload \
  -H 'X-Api-Key: ca_live_...' \
  -F 'file=@/path/to/clip.mp4' \
  -F 'service_slug=clipconvert' \
  -F 'operation_key=resize' \
  -F 'params={"width": 1280, "height": 720, "mode": "pad"}'

The sections below document every parameter of the operations that have more than a couple.

Subtitles & transcription

subtitles puts captions on the video. The text comes from one of:

Speech recognition takes roughly as long as the audio, so these are the operations where the per-minute half of the tariff actually bites — and they are the most likely to hit the per-tier input-length limit (5 / 5 / 45 min for anonymous / free / paid). See The tariff: you pay for processing time.

Param Values Default
mode burn (baked in) / embed (soft track, mp4/mov/mkv only) burn
language en, uk, ru, … (2–3 letters) auto-detect
task transcribe / translate (→ English captions) transcribe
style boxed / clean / yellow / karaoke (word-by-word) boxed
position bottom / middle / top bottom
font_size 2–12 (% of frame height) 5
subtitles_url / subtitles_text / captions your own captions — see Your own text —
shift_sec -600…600 — move every caption earlier (−) or later (+) 0
font dejavu_sans, dejavu_serif, liberation_sans, liberation_serif, roboto, roboto_condensed, open_sans, montserrat, comfortaa, mono (all with Cyrillic) dejavu_sans
text_color / outline_color #RRGGBB the style's
background_color / background_opacity #RRGGBB / 0–1 — the plate of boxed the style's
bold / italic / uppercase true / false the style's / false / false
align left / center / right center
margin_v 0–45 — distance from the edge, % of frame height (bottom / top) the style's
animation how each caption arrives: fade, pop, slide (up), typewriter (letter by letter), words (word by word — follows the speech when it was recognised) none
animation_rate 0.2–5 — speed of the effect: 1 normal, 2 twice as fast, 0.5 half. animation_speed slow/normal/fast = 0.5 / 1 / 2 1
quality fast (small model, quickest) / balanced / accurate (large-v3-turbo — far fewer mistakes in Ukrainian, ~2.5× the time) — where the server allows turbo; otherwise the best model it holds the server's
language_hint a likely spoken language (uk, ru, en) — audio up to 30 s is recognised in it directly (short Ukrainian clips used to be detected as Russian and come back translated); longer audio is detected and the hint wins a close call. Ignored when language is set —
typography true: Ukrainian typography — ’ instead of ' between letters, «…» instead of "…" false
translate_to a language code (2–7 chars) — captions translated into it —
text_timing / text_start / text_end for your own plain text — see Your own text spread / 0 / end

Font, colours and placement apply to burn. An embed soft track is drawn by the player, which picks its own look.

Common spellings are accepted and mapped onto the params above:

You send Becomes
"burn": true / false "mode": "burn" / "embed"
fontsize (pixels, e.g. 48) font_size in % of a 1080-line frame (48 → 4.44); 2–12 is already %
color, font_color text_color
background background_color
stroke_color outline_color
colours as #RGB, #RRGGBBAA, rgb(…), rgba(…), white… #RRGGBB; the alpha of a background → background_opacity
"position": "center" "middle"
"font": "Arial" / "Helvetica" / "Times New Roman" / "Courier" liberation_sans / liberation_sans / liberation_serif / mono
"animation": "karaoke" "style": "karaoke" (word highlighting is a style)

A value that maps to nothing ("font": "Comic Sans", "position": "left") is a 400 naming what is accepted, before anything is charged.

Your own text

Plain text, spread over the video. One caption per line; a line too long for one caption is split. The lines follow one another over the whole video (or text_start…text_end, in seconds), longer lines staying on screen longer. No sound needed — this is how a silent video, a slideshow or a music clip gets captions.

curl -s https://metaplatho.com/api/v1/jobs/upload \
  -H 'X-Api-Key: ca_live_...' \
  -F 'file=@/path/to/clip.mp4' \
  -F 'service_slug=clipconvert' \
  -F 'operation_key=subtitles' \
  -F 'params={"subtitles_text": "Spring collection\nAvailable now\nLink in bio", "font": "montserrat", "bold": true}'

Plain text, synced to the speech. Add "text_timing": "speech": the speech is recognised and each of your lines appears when it is said. The text stays exactly yours (spelling, names, punctuation) — recognition only supplies the timing, so this is billed and queued like automatic captions. With no speech to match (no audio track, or a script that is not what is said) the lines are spread instead; result.body.text_timing says which happened (speech / spread).

{ "subtitles_text": "Hi, I'm Olena from Kyiv.\nToday — three tips.", "text_timing": "speech", "style": "karaoke" }

Lines with your own timing. captions is a list of {start, end, text, position?}; times are seconds (2.5) or clock strings ("0:02.5", "00:00:02,500"). position puts one line somewhere else — a title at the top, for example. Up to 5000 lines, 500 characters each.

{
  "captions": [
    { "start": 0, "end": 2.5, "text": "BIG NEWS", "position": "top" },
    { "start": "0:03", "end": "0:06.5", "text": "We open a second store" }
  ],
  "text_color": "#FFD400",
  "background_color": "#000000",
  "background_opacity": 0.6
}

Arrival animation. One preset for the whole track, burned in:

{ "subtitles_text": "Big news today.\nRead on.", "animation": "typewriter", "animation_speed": "fast" }

At rate 1: fade 150 ms in/out, pop scales up with a small bounce, slide rises into place, typewriter reveals letters at 40 ms each, words reveals words at 250 ms — divided by animation_rate, and both reveals are capped so the whole line is on screen for most of its time. With automatic captions, words follows the actual word timings. The karaoke style keeps its own word highlight; typewriter and words are ignored on it.

A subtitle file. SRT / VTT / ASS as subtitles_text (the file's content) or subtitles_url; its cues are kept as they are. shift_sec fixes a file that runs early or late.

Give only one of subtitles_text, captions, subtitles_url — two at once is a 400 naming the conflict, and the charge is refunded. Every finished subtitles job returns the captions it burned as an SRT file in result.outputs (role captions, a link under /api/v1/jobs/{id}/captions.srt) and inline in result.body.subtitles_srt.

{
  "service_slug": "clipconvert",
  "operation_key": "subtitles",
  "params": { "file_url": "https://.../clip.mp4", "style": "karaoke", "position": "top" }
}

transcribe returns a subtitle/text file instead of a video — format: srt (default), vtt, ass, txt, json. Sent with video styling (burn, mode, style, font, position, animation, colours…) it runs as subtitles instead — the job comes back with operation_key: "subtitles", and result.outputs holds the captioned video and the SRT.

{
  "service_slug": "clipconvert",
  "operation_key": "transcribe",
  "params": { "file_url": "https://.../interview.mp4", "format": "srt", "task": "translate" }
}

Audio files. transcribe also takes an audio-only file — MP3, WAV, M4A, OGG/Opus, FLAC, voice notes — uploaded exactly like a video (it is the one operation whose accepts is ["video", "audio"]). Every other operation (including subtitles) needs a video stream and refuses an audio-only file with 400.

curl -s https://metaplatho.com/api/v1/jobs/upload \
  -H 'X-Api-Key: ca_live_...' \
  -F 'file=@/path/to/podcast.mp3' \
  -F 'service_slug=clipconvert' \
  -F 'operation_key=transcribe' \
  -F 'params={"format": "txt"}'

Several formats in one job. formats (1–5 of srt, vtt, ass, txt, json) replaces format. With more than one, the result is a ZIP holding transcript.srt, transcript.vtt, … — result.outputs[0].contains (and result.body.files) lists them.

{ "formats": ["srt", "vtt", "txt"] }

Translations. translate_to: a list of up to 5 language codes — the transcript in each, always as a ZIP (transcript.<lang>.<fmt>), listed in result.outputs[0].contains.

Readable text. format: "txt" comes back as running sentences in paragraphs — a new paragraph on a pause of 1.2 s or more, or after about 400 characters at a sentence end — not one caption per line.

Language. Without language the spoken language is detected and picked among Ukrainian, Russian and English (another language still wins when it is clearly that); language_hint decides it outright for audio up to 30 s and tips a close call on longer audio. Long recordings (over a minute) are recognised as mixed speech, so a Ukrainian-Russian conversation keeps each part in its own language instead of translating one into the other. Setting language skips detection and is the fastest.

What the recogniser did is in result.body: asr_model, asr_language, asr_sec (recognition time) and asr_rtf (that time ÷ the audio length).

JSON with word timings. format: "json" returns language, duration_sec, the full text, and segments[] — each with start, end, text and words[] (start, end, word).

Caption layout and vocabulary — on both subtitles and transcribe, for captions produced by speech recognition:

Param Values Default
max_chars_per_line 16–80 42
max_lines 1–3 lines per caption 2
max_cue_duration 1–10 s 5
min_cue_duration 0.3–3 s (not above max_cue_duration) 1
max_cps 8–30 characters per second — fast speech stays on screen longer off
vocabulary up to 100 terms (names, brands, jargon) recognition should spell your way —
initial_prompt up to 600 chars of context text; affects the start of the recording —
{
  "format": "srt",
  "language": "en",
  "max_chars_per_line": 32,
  "max_lines": 1,
  "max_cps": 17,
  "vocabulary": ["MetaPlatho", "ClipConvert", "Kubernetes"]
}

Auto-edit & voice cleanup

auto_edit is an ASR-driven rough cut: drops dead air, tightens pauses longer than max_pause (default 0.6s) down to keep_pause (0.3s) of natural ambience, cuts standalone filler sounds («эээ», "um" — extend with filler_words), and with remove_retakes: true drops a sentence that is immediately re-spoken almost verbatim, keeping the last take.

enhance_voice cleans phone audio in the same encode pass: noise reduction, de-esser, gentle compression, loudness normalization to −16 LUFS.

Add audio (voiceover / music)

add_audio lays one or more audio tracks over the video — a voiceover, a music bed, sound effects — mixing them with the video's own soundtrack. Up to 8 tracks in one pass. The result always keeps the video's duration: a 3-minute music bed under a 10-second clip is cut at 10 seconds, and a track shorter than the video simply stops (or repeats, with loop).

Per track:

Field Meaning
audio_url The track to mix in (fetched server-side, same SSRF rules as a watermark logo)
volume 0–4, 1 = as-is. A bed under speech usually wants 0.15–0.3
offset_sec Where it starts on the video timeline
start_sec Skip this far into the track before using it
loop Repeat until the video ends — for beds shorter than the clip
fade_in_sec / fade_out_sec Fades; the fade-out is anchored to the end of the video

Plus original_volume (0–4, default 1) for the video's own audio — 0 replaces the soundtrack entirely. On a silent video the original leg is simply skipped.

{
  "service_slug": "clipconvert",
  "operation_key": "add_audio",
  "params": {
    "file_url": "https://.../talk.mp4",
    "operations": "[{\"type\":\"add_audio\",\"original_volume\":0.25,\"tracks\":[{\"audio_url\":\"https://.../voice.mp3\",\"volume\":1},{\"audio_url\":\"https://.../music.mp3\",\"volume\":0.2,\"loop\":true,\"fade_out_sec\":2}]}]"
  }
}

It composes with the rest of the pipeline in one pass (resize, compress, subtitles, watermark…). The one exception is speed — both rewrite the audio graph, so combining them is rejected with a clear error; run them as two jobs instead.

Both run inside the pipeline, so they compose with everything else in one job:

{
  "service_slug": "clipconvert",
  "operation_key": "auto_edit",
  "params": {
    "file_url": "https://.../talk.mp4",
    "operations": "[{\"type\":\"auto_edit\"},{\"type\":\"enhance_voice\"},{\"type\":\"subtitles\",\"style\":\"karaoke\"}]"
  }
}

operations may be a JSON string or a nested array — both are accepted.

Review before cutting. plan_only: true returns the proposed cuts as a JSON file instead of a video — speech is recognised, nothing is rendered:

{ "service_slug": "clipconvert", "operation_key": "auto_edit",
  "params": { "file_url": "https://.../talk.mp4", "plan_only": true, "max_pause": 0.8 } }
{ "duration_sec": 92.4, "language": "en", "removed_sec": 11.2,
  "keep": [{ "start": 0.0, "end": 14.9 }, { "start": 15.6, "end": 40.2 }],
  "cuts": [{ "start": 14.9, "end": 15.6, "kind": "pause", "text": "" },
           { "start": 40.2, "end": 40.9, "kind": "filler", "text": "um" }],
  "words": [{ "start": 0.3, "end": 0.6, "word": "Hi" }] }

kind is silence (dead air at the start or end), pause (a long gap between phrases, tightened), filler (a hesitation sound) or retake (a repeated take). Keep the ones that are not noise — a deliberate beat, birdsong between sentences — and send the rest back as cuts:

{ "operation_key": "auto_edit", "params": { "cuts": [[14.9, 15.6], [40.2, 40.9]] } }

With cuts nothing is recognised again: one re-encode, billed as plain video work (class standard). This is exactly what the studio's "Preview cuts" editor does.

Circle video & Telegram video note

format decides what you get:

format Result
note Square, cover-cropped, filled h264/aac clip, ≤60 s. This is the real Telegram video note format — Telegram renders it round only when a bot sends it as a video note. Use diameter: 512.
mp4 Round video baked onto a solid bg_color (square file, colored corners). For sites and overlays — not Telegram notes.
webm Round with real transparency.
gif Animated, round on bg_color, silent.

Other params: diameter 64–1080, zoom 1–3, offset_x / offset_y −1..1, bg_color, start, duration, mute, fps, crf, loop.

{
  "service_slug": "clipconvert",
  "operation_key": "circle",
  "params": { "file_url": "https://.../clip.mp4", "format": "note", "diameter": 512, "duration": 60, "mute": false }
}

Fit to canvas (blur_bg)

Landscape source → vertical TikTok / Reels / Shorts canvas:

{
  "service_slug": "clipconvert",
  "operation_key": "blur_bg",
  "params": { "file_url": "https://.../wide.mp4", "width": 1080, "height": 1920, "bg_mode": "blur", "scale": 0.9 }
}

bg_mode: blur / dark_blur / color / mirror / stretch.

Param Values Default
width / height 64–2160 1080 / 1920
scale 0.1–1 — the foreground's size on the canvas 1
pos_y −1…1 — vertical shift of the foreground, 0 centred, +0.5 lower 0
blur 0–100 25
dim 0–0.9 — darken the background —
padding 0–400 px —
radius 0–200 px — rounded corners —
bg_color #RRGGBB for bg_mode: "color" —

Blur & text on photos

Privacy blur (blur)

The whole photo is blurred so the silhouette and colours stay, but faces, text and details are gone — the "this member has private photos" card. Every param is optional: {} blurs at strength 7.

curl -s https://metaplatho.com/api/v1/jobs/upload \
  -H 'X-Api-Key: ca_live_...' \
  -F 'file=@/path/to/photo.jpg' \
  -F 'service_slug=photoconvert' \
  -F 'operation_key=blur' \
  -F 'params={"strength": 7}'
Param Values Default
strength 0.5–10. Relative to the photo's short side, so the same number hides the same on any size: 1–3 soft, 5–7 silhouette only, 10 colour fields 7
dim 0–0.9 — darken the result so white text on top reads 0

enhance → blur is a different knob: a radius in pixels for a mild soften.

Text on a photo (text)

A designed caption — not the faint corner watermark. Sizes are % of the photo width, so one request looks the same on a thumbnail and on the original. The styling names are the ones the video captions use.

curl -s https://metaplatho.com/api/v1/jobs/upload \
  -H 'X-Api-Key: ca_live_...' \
  -F 'file=@/path/to/photo.jpg' \
  -F 'service_slug=photoconvert' \
  -F 'operation_key=text' \
  -F 'params={"text": "Sale -30% until Sunday", "position": "bottom", "font": "montserrat", "bold": true, "font_size": 5, "background_opacity": 0.55}'
Param Values Default
text required, up to 500 characters; \n starts a new line, long lines wrap —
position tl tc tr ml mc mr bl bc br, or top / middle / bottom mc
font dejavu_sans, dejavu_serif, liberation_sans, liberation_serif, roboto, roboto_condensed, open_sans, montserrat, comfortaa, mono — all with Cyrillic dejavu_sans
font_size 1–40, % of the photo width 6
text_color #RRGGBB #ffffff
bold / italic / uppercase true / false false
align left / center / right — lines inside the block center
outline_color #RRGGBB #000000
outline_width 0–20, % of the font size (0 = no outline) 0
shadow soft drop shadow (skipped on an opaque plate) true
background_color #RRGGBB — a rounded plate behind the text #000000
background_opacity 0–1 (0 = no plate) 0
opacity 0.05–1 — the whole caption 1
margin 0–40, % of the width from the edge 4
max_width 10–100, wrap width in % of the photo 90
line_spacing 0.8–3 1.2

Both in one job — the locked-photo card

blur then text, in one pass, through edit with an explicit operations list (the steps run in order):

curl -s https://metaplatho.com/api/v1/jobs/upload \
  -H 'X-Api-Key: ca_live_...' \
  -F 'file=@/path/to/photo.jpg' \
  -F 'service_slug=photoconvert' \
  -F 'operation_key=edit' \
  -F 'params={"operations": [{"type": "blur", "strength": 7, "dim": 0.15}, {"type": "text", "text": "This member has 3 private photos", "bold": true, "font_size": 5}]}'

Inside operations the text colour is color (the worker's name); as flat params of the text operation both text_color and color work.