> **Shapeless capabilities index**
> Fetch https://shapelessai.com/llms.txt to discover every page before exploring further.
> Every page also answers Markdown: append `.md` to its path, or send `Accept: text/markdown`.

# Edit a video

*Verified 2026-10-07. Source: https://shapelessai.com/capabilities/edit-video*

Cut a video the account already holds (an upload, a generated clip, a render) down to the moments that earn their place, by transcript beats or time ranges, and get a new media key back.

The same call reframes for vertical, cuts the speaker out over a background, burns in captions, lays a music bed, adds a logo and sets the look. Upload the source first with POST /api/studio/uploads; its mediaKey is the input.

## Ask in plain words

- "cut my recording down to the best 30 seconds"
- "reframe this landscape video to 9:16 with captions"
- "video editing API for my agent"
- "add music and burned-in captions to this clip"

## From an agent host (MCP)

Server: `https://shapelessai.com/mcp` ([add it to your host](https://shapelessai.com/connect)).

- `tools_run` with `{ "name": "edit_footage", "input": { ... } }`: the input is the REST body below; `tools_list` prints its JSON Schema.

## From code (REST)

Bearer API key with the scope each call names ([auth](https://shapelessai.com/docs/auth), [OpenAPI](https://shapelessai.com/api/openapi.json)).

- `POST /api/videos/edit` (write scope): Edit a video you uploaded (tool edit_footage): cut, reframe, cutout, captions, music, overlays. Schema on GET /api/tools.

## From a terminal (CLI)

- `shapeless tools run edit_footage --input '<json>'` (`tools show edit_footage` prints the schema)

## Example

```bash
curl -s https://shapelessai.com/api/videos/edit -H "Authorization: Bearer $SHAPELESS_API_KEY" -H "Content-Type: application/json" -d '{"media_key":"<mediaKey>","name":"launch cut"}'
```

## Refusals

| Status | Meaning |
| --- | --- |
| 400 | The input does not match the tool's schema; the message names the field. |
| 402 | Not enough credit to hold budgetUsd, or the call costs more than budgetUsd. |
| 404 | No such tool on this deployment. |
| 422 | The tool refused this input; nothing was charged. |
| 502 | The tool failed; nothing was charged. |

## Where else

- [The api docs](https://shapelessai.com/docs/api) ([markdown](https://shapelessai.com/docs/api.md))
