Runwayml Aleph 2
Playground
Try it on WaveSpeedAI!Runway Aleph 2 Video Edit is an in-context video editing model for precise prompt-based edits, multi-shot consistency, and optional keyframe guidance, supporting 2-30 second input videos and up to 5 keyframes for controlled video modification workflows. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
Features
Runway Aleph 2 edits videos with natural-language instructions while preserving scene consistency. Upload a source video, describe the edit you want, and optionally provide keyframe images to guide specific moments in the edited result.
Why Choose This?
-
Natural-language video editing
Edit an existing video by describing the desired change in plain text. -
Scene-consistent edits
Apply visual changes while preserving the overall structure and continuity of the source video. -
Multi-shot editing support
Work with videos that contain multiple shots while maintaining coherent edit behavior. -
Optional keyframe guidance
Provide up to 5 reference keyframes to guide the beginning, ending, or specific timestamps of the edited video. -
Seed control
Use a seed when you need more reproducible edit results.
Parameters
| Parameter | Required | Description |
|---|---|---|
| video | Yes | Source video to edit. Must be 2–30 seconds and under 16 MB. |
| prompt | Yes | Natural-language instruction describing the edit to apply. |
| keyframe_images | No | Optional reference keyframe images. Supports up to 5 images. |
| keyframe_positions | No | Position for each keyframe image. Use first, last, or a timestamp in seconds. |
| seed | No | Random seed for reproducible results. |
How to Use
- Upload your video — Provide a 2–30 second source video under 16 MB.
- Write your edit prompt — Describe the visual change you want to apply.
- Add keyframes optional — Upload up to 5 keyframe images when you need stronger guidance for specific moments.
- Set keyframe positions optional — Use
first,last, or timestamps in seconds to place each keyframe. - Set seed optional — Use a fixed seed when you want more reproducible results.
- Submit — Generate the edited video.
Pricing
Pricing is $1.85 per 5 seconds of source video duration, prorated from 2 to 30 seconds. This is equivalent to $0.37 per second.
| Video Length | Price |
|---|---|
| 2s | $0.74 |
| 5s | $1.85 |
| 10s | $3.70 |
| 30s | $11.10 |
Best Use Cases
- Prompt-based video editing — Apply natural-language edits to existing clips.
- Scene restyling — Change mood, lighting, atmosphere, or visual direction while preserving scene continuity.
- Keyframe-guided edits — Guide the first frame, last frame, or specific timestamps with reference images.
- Multi-shot video edits — Edit clips that contain multiple shots while keeping the result coherent.
- Creative iteration — Test different edit directions from the same source video.
Pro Tips
- Use a clear source video within the supported 2–30 second range.
- Keep the edit prompt focused on the specific change you want.
- Use keyframe images when the edit needs stronger visual guidance at specific moments.
- Make sure each keyframe image has a matching keyframe position.
- Use
firstorlastfor simple start/end guidance. - Use timestamp positions when a keyframe should guide a specific moment in the video.
- Use a fixed seed when comparing prompt or keyframe variations.
Note
Keyframe image and position arrays must contain the same number of entries.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
set -euo pipefail
export WAVESPEED_API_KEY="your-api-key"
REQUEST_BODY=$(cat <<'JSON'
{
"prompt": "A cinematic ocean wave at sunrise, highly detailed",
"video": "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4",
"keyframe_images": [],
"keyframe_positions": []
}
JSON
)
# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
-X POST "https://api.wavespeed.ai/api/v3/runwayml/aleph-2" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
-H "Content-Type: application/json" \
-d "${REQUEST_BODY}")
TASK=$(printf '%s' "${SUBMIT_RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "${TASK}" | jq -r '.id // empty')
if [ -z "${PREDICTION_ID}" ]; then
printf 'Submission response did not contain a prediction id
' >&2
exit 1
fi
RESULT_URL=$(printf '%s' "${TASK}" | jq -r '.urls.get // empty')
if [ -z "${RESULT_URL}" ]; then RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"; fi
# 2. Poll until the prediction finishes.
while true; do
RESPONSE=$(curl --silent --show-error --fail-with-body \
"${RESULT_URL}" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}")
RESULT=$(printf '%s' "${RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')
case "${STATUS}" in
completed) printf '%s\n' "${RESULT}" | jq '.outputs'; break ;;
failed|cancelled|timeout) printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
created|processing) sleep 2 ;;
*) printf 'Unexpected status: %s
' "${STATUS}" >&2; exit 1 ;;
esac
doneParameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| prompt | string | Yes | - | Text prompt describing the edit to apply. | |
| video | string | Yes | - | Input video. Must be 2-30 seconds and less than 16 MB. | |
| keyframe_images | array<string> | No | [] | 0 ~ 5 items | Up to 5 optional keyframe image URLs. |
| keyframe_positions | array<string> | No | [] | 0 ~ 5 items | Position for each keyframe: first, last, or a timestamp in seconds. |
| seed | integer | No | - | - | Optional random seed for reproducible generation. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Output values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction |
| data.model | string | Model ID used for the prediction |
| data.outputs | array<string | object> | Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model. |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to poll for the prediction result |
| data.status | string | Status: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |