1. Go to this page and download the library: Download hanshs474/aigifmaker 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/ */
hanshs474 / aigifmaker example snippets
= new Aigifmaker\Client(); // reads AIGIFMAKER_API_KEY
$url = $gif->generate('a corgi in sunglasses dancing on a beach, looping');
echo $url; // the finished GIF
echo $gif->credits(); // remaining credits, free to call
$gif = new Aigifmaker\Client('sk-...', timeout: 900); // timeout in seconds, 15 minutes by default
$taskId = $gif->submit('happy birthday text bouncing in rainbow letters');
echo $gif->status($taskId)['status']; // pending | processing | success | failed
$url = $gif->wait($taskId); // polls every 3 seconds
bash
php tests/run.php # mocked, offline
php tests/smoke_live.php # two free live checks, no generation
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.