gen4_aleph

This documentation is valid for the following list of our models:

  • runway/gen4_aleph

This is a video-to-video model capable of either modifying the input video or generating the next shot in a story that begins in the input and continues based on your prompt. You can define camera angles and movements, alter the plot, change character appearances, or adjust the environment.

How to Make a Call

Step-by-Step Instructions

Generating a video using this model involves sequentially calling two endpoints:

  • The first one is for creating and sending a video generation task to the server (returns a generation ID).

  • The second one is for requesting the generated video from the server using the generation ID received from the first endpoint.

Below, you can find both corresponding API schemas.

API Schemas

Video Generation

You can generate a video using this API. In the basic setup, you need only a video URL and a prompt.

post
Body
modelstring · enumRequiredPossible values:
promptstring · max: 1000Required

The text description of the scene, subject, or action to generate in the video.

video_urlstring · uriRequired

A HTTPS URL pointing to a video or a data URI containing a video. This video will be used as a reference during generation.

frame_sizestring · enumOptional

The width and height of the video.

Default: 1280:720Possible values:
durationnumber · enumOptional

The length of the output video in seconds.

Default: 5Possible values:
seedinteger · max: 4294967295Optional

Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen.

Responses
200Success
application/json
post
/v2/video/generations
200Success

Retrieve the generated video from the server

After sending a request for video generation, this task is added to the queue. This endpoint lets you check the status of a video generation task using its id, obtained from the endpoint described above. If the video generation task status is completed, the response will include the final result — with the generated video URL and additional metadata.

get
Authorizations
AuthorizationstringRequired

Bearer key

Query parameters
generation_idstringRequiredExample: <REPLACE_WITH_YOUR_GENERATION_ID>
Responses
200Success
application/json
get
/v2/video/generations
200Success

Full Example: Generating and Retrieving the Video From the Server

How it works

Let’s take a video of our running raccoon and ask Aleph to add a small fairy riding on its back. Here’s the prompt we can use:

"Add a small fairy as a rider on the raccoon’s back. She must have a black-and-golden face and a cloak in the colors of a dark emerald tropical butterfly with bright blue shimmering spots."

We combine both methods above in one program: first it sends a video generation request to the server, then it checks for results every 10 seconds.

Response

Processing time: ~3 min 30 sec.

Original: 1280Ă—720

Low-res GIF preview:

Reference Video
Generated (Edited) Video

Last updated

Was this helpful?