---
title: "Trim or keep parts — estimate"
method: POST
path: "/v1/studio/trim/estimate"
tags: ["Edit"]
---

# Trim or keep parts — estimate

`POST /v1/studio/trim/estimate`

## Request

- Base URL: `https://apihub.co.il`
- URL: `https://apihub.co.il/v1/studio/trim/estimate`
- Auth: HTTP bearer

Price the request without executing it. Same body as `POST /v1/studio/trim`.

## Request body

- object
  - `end` number: seconds
  - `keep` object[]: Keep only these spans (seconds)
    - `end` number, required
    - `start` number, required
  - `start` number: seconds
  - `output` object
    - `fit` 'crop' | 'blur' | 'pad': When the aspect ratio changes: crop the edges, blurred copy behind, or solid bars
    - `fps` number
    - `format` 'mp4' | 'webm' | 'mov' | 'gif' | 'mp3' | 'wav' | 'm4a' | 'jpg' | 'png'
    - `quality` 'draft' | 'standard' | 'high': high (default) = best picture; draft renders fastest for previews
    - `background` string: Bar colour for fit=pad
    - `resolution` '480' | '720' | '1080' | 'source': Short side in pixels (1080 = Full HD). `source` keeps the input size, max 1080
    - `aspect_ratio` 'original' | '9:16' | '16:9' | '1:1' | '4:5' | '4:3': 9:16 for Reels/TikTok/Shorts, 1:1 or 4:5 for feed, 16:9 for YouTube
  - `cut_sound` object: A sound effect on every jump cut the engine makes (the joins after remove_silence / keep / trim); each one is reported in `elements` (kind sound, ids cut1…). Never in the first 100 ms
    - `max` integer: At most this many cut sounds — the first cuts get them
    - `url` string, uri, required: The sound effect (e.g. a whoosh from /v1/ai/sound-effects)
    - `volume` number: 1 sits just under the speech; 0.5 is a soft accent
    - `normalize` boolean: Level the effect first, so `volume` means the same for every file
    - `offset_ms` number: Shift from the cut, ms (negative = the sound starts before the join, so a whoosh peaks on it)
  - `video_url` string, uri, required: Public URL of the source video (mp4, mov, webm, mkv…) — or the `url` of a previous render
  - `transition` object: How the kept spans are joined (a crossfade or a dip to black at every jump cut). Omit for plain cuts
    - `ms` number: Length of the transition, ms — rounded to whole frames, never more than half of the shorter span; every join shortens the output by this much
    - `type` 'cut' | 'crossfade' | 'dip': cut = a plain jump cut (default); crossfade = the spans dissolve into each other, picture and sound; dip = the picture dips to black between them

## Response `200`

Estimate

- Estimate
  - `operation` string
  - `estimated_credits` number
  - `credits_to_reserve` number
  - `estimated_usage` object
  - `note` string, nullable
  - `balance` object
    - `available` number
  - `sufficient` boolean

---

[API](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai.md) · [All operations](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai/llms.txt) · [OpenAPI document](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai/revisions/a8caa42835ce?raw)
