---
title: "Seamless loop or trim of your own video — free"
method: POST
path: "/media/loop"
tags: ["Landings"]
---

# Seamless loop or trim of your own video — free

`POST /media/loop`

## Request

- Base URL: `https://vibemarketolog.ru/api/agent`
- URL: `https://vibemarketolog.ru/api/agent/media/loop`
- Auth: HTTP bearer

Rebuilds your own finished video up to 20 s on our server. mode=boomerang — seamless forward-backward loop for a hero background, without sound (with trim_at — trims first). mode=trim — cut at trim_at with sound (take the point from POST /media/check suggested_trim_at; if it is null — regenerate instead of cutting). Result: H.264, at most 720p, fast start; url is a permanent address on lk.vibemarketolog.ru — put it straight into <video src> (the landing passport accepts it). The file is tied to the source generation and is deleted with it. Do not loop people in boomerang — backwards they look silly. Up to 30 per day, one at a time per account. MCP twin: video_loop.

## Request body

- object
  - `generation_id` integer, required: Your finished video (status=complete), up to 20 s
  - `mode` 'boomerang' | 'trim', required: boomerang — background loop without sound; trim — cut with sound
  - `trim_at` number: Second to cut at (required for trim; optional pre-trim for boomerang)

## Response `200`

Rebuilt video

- MediaLoopResult
  - `status` 'ok'
  - `generation_id` integer
  - `mode` 'boomerang' | 'trim'
  - `url` string, uri: Permanent mp4 address for <video src>
  - `duration` number
  - `source_duration` number
  - `trim_at` number, nullable
  - `bytes` integer
  - `width` integer
  - `height` integer
  - `has_audio` boolean
  - `loops_left_today` integer
  - `hint` string

## Other responses

- `401`: Ключ не передан, недействителен, отозван или истёк (missing_token / invalid_token)
- `403`: sandbox_not_allowed (shared trial key from self-registration: its files would be visible to everyone) / insufficient_scope / ip_not_allowed
- `422`: bad_params — no generation_id / media_rejected — wrong mode, no trim_at for trim, video longer than 20 s, not your generation, daily limit or another call in progress / validation_failed
- `429`: Превышена частота запросов или суточный лимит траты ключа (rate_limit_exceeded / daily_spend_limit_exceeded)

---

[API](https://skmtc.dev/vibemarketolog/apis/agent-api.md) · [All operations](https://skmtc.dev/vibemarketolog/apis/agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/vibemarketolog/apis/agent-api/revisions/6a74f8ad5d58?raw)
