PHP code example of runapi-ai / runway-aleph
1. Go to this page and download the library: Download runapi-ai/runway-aleph library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
runapi-ai / runway-aleph example snippets
unApi\RunwayAleph\RunwayAlephClient;
$client = new RunwayAlephClient(); // reads RUNAPI_API_KEY
$task = $client->editVideo->create([
'model' => 'runway-aleph',
'prompt' => 'A precise product render on white marble',
'source_video_url' => 'https://cdn.runapi.ai/public/samples/video.mp4',
]);
$status = $client->editVideo->get($task->id);
$result = $client->editVideo->run([
'model' => 'runway-aleph',
'prompt' => 'A serene mountain lake at dawn',
'source_video_url' => 'https://cdn.runapi.ai/public/samples/video.mp4',
]);
echo $result->videos[0]->url . PHP_EOL;