A library for using deepai.org api
composer require mkhab7/deepai
use Solid\Deepai\Deepai;
require_once 'vendor/autoload.php';
$deepai = new Deepai('api key');
$deepai->setImage('image url');
// you can use a url or a local file path , for example :
$deepai->setImage(new CURLFile('image.jpg'));
$deepai->colorize();
$result = $deepai->apply();
$url = $result->url();
$result->save('output.jpg');
/*
* you can get the all response data from this method
*/
$allResponseData = $result->getData();
example :
$deepai->setText('cat');
$deepai->textToImage();
example :
$deepai->setText('cat');
$textOutput = $deepai->textGeneration()->apply()->output();//returns output url/text
$deepai->setImage(new CURLFile('image.jpg'))
->method('deepdream') //custom method
->apply();
- colorize
- toonify
- superResolution
- textToImage
- textGeneration
- nudityDetection
- waifu2x