# Generate toward a final frame
> Generate motion toward a controlled last frame, with an optional first frame.

Generate motion toward a controlled last frame, with an optional first frame.

## Primary agent path

Use `beatra.videos.interpolate` when a required last image defines the ending.
Add `first_frame` only when the opening must also be controlled.

1. Upload the last frame, an optional first frame, and optional driving audio.
2. Call `beatra.models.list` with `capability: "frames_to_video"` for current
   media combinations, duration, resolution, audio support, and prices.
3. Describe the movement toward the ending, including the transition from the
   first frame when one is supplied.
4. Submit once with one `client_request_id`; poll with `beatra.tasks.get`.

## AI guide

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

## Tool arguments

```json
{
  "prompt": "The product rises and rotates smoothly between the two views",
  "first_frame": { "type": "artifact", "artifact_id": "artifact_start" },
  "last_frame": { "type": "artifact", "artifact_id": "artifact_end" },
  "driving_audio": { "type": "artifact", "artifact_id": "artifact_optional_audio" },
  "resolution": "720p",
  "duration": 6,
  "client_request_id": "vid-frames-opaque-1"
}
```

`last_frame` is required; `first_frame` and `driving_audio` are optional but
must be supported by the selected model. Image-driven aspect-ratio rules come
from model discovery.

## 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` instead of a static model table. It returns selectable
models, accepted frame/audio combinations, constraints, defaults, ignored
fields, and prices. Resolution and duration normally affect cost; do
not silently change them.

### MiniMax H3

Set `model: "minimax-h3"` for a last-frame-only or first-and-last-frame H3
request. The last frame and prompt are required; the first frame is optional.
Duration is 4–15 seconds. Public `720p` costs 370 credits per output second;
`2k` costs 590. Omitting resolution with explicit H3 now defaults to 720p.
H3 accepts `watermark` but not driving audio or the other optional controls.
Supplied boundary images are free.

### Wan 3.0

Set `model: "wan3.0-video"` or `wan3.0-video-prime` with first and last frames.
Duration is 2–30 seconds. Do not send `driving_audio`. `480p` is
225 credits per output second on `wan3.0-video` and 335 on the higher tier.

## Task status and recovery

Poll the same task through `queued` and `running`. A lost create response may be
retried only with identical arguments and the same `client_request_id`.
Swapping either frame or changing audio, prompt, or output settings requires a
new ID.

## REST API

Direct protocol integrations may use `POST /v1/videos/frames-to-video`. Follow
the generated [API operation](https://docs.beatra.ai/en/docs/api-reference/operations/videos/videos_f2v_v1_videos_frames_to_video_post).
Skill + MCP is the recommended integration; REST serves custom applications.
