# Extend an existing video
> Continue a source clip beyond its current endpoint.

Continue a source clip beyond its current endpoint.

## Primary agent path

Use `beatra.videos.extend` to continue beyond a clip's current endpoint. Use
edit instead when the existing timeline itself should change.

1. Upload the local source video.
2. Call `beatra.models.list` with `capability: "video_extend"` for current clip
   limits, final-duration rules, controls, and prices.
3. Describe only the continuation and any required final composition.
4. Submit once with one `client_request_id`; poll with `beatra.tasks.get`.

## AI guide

AI integration guide: https://docs.beatra.ai/llms/videos-video-extend.md

## Tool arguments

```json
{
  "instruction": "Continue the camera move until the train enters the tunnel",
  "video": { "type": "artifact", "artifact_id": "artifact_source_clip" },
  "direction": "after",
  "resolution": "720p",
  "duration": 12,
  "client_request_id": "vid-extend-opaque-1"
}
```

`direction` is required (`after` continues past the end). `duration` means the
final output duration, including the source clip—not the number of seconds to
add.

## Models, controls, and cost

Common controls are `prompt`, `negative_prompt`, `resolution`,
`duration`, `aspect_ratio`, `seed`, `enhance_prompt`, and `watermark`.
Use each only according to the selected model's metadata.

Use `beatra.models.list` as the current source for selectable models, accepted
source duration, final-duration range, resolution,
derived aspect ratio, defaults, and price inputs. Ensure the final duration is
valid for the source; never silently rewrite it.

### Wan 3.0

Set `model: "wan3.0-video"` or `wan3.0-video-prime`. `duration` is the final
file length (2–30 seconds), must exceed the source by at least 2 seconds, and
source seconds plus that duration must be at most 30. Source video is at most
15 seconds.
Only `direction: "after"` is supported. Source seconds and the final file
length both bill at the same rate: `480p` 225 credits/s (`wan3.0-video`) or
335 (higher tier).

## Task status and recovery

Keep polling the same task while it is `queued` or `running`. Retry a lost create
response only with identical arguments and the same `client_request_id`. A new
source, instruction, model, or duration requires a new ID.

## REST API

Direct protocol integrations use `POST /v1/videos/extend`. Follow the generated
[API operation](https://docs.beatra.ai/en/docs/api-reference/operations/videos/videos_extend_v1_videos_extend_post)
for the complete request contract. Skill + MCP is the recommended integration; REST serves custom applications.
