https://github.com/mkhab7/deepai
a php library for deepai.org
https://github.com/mkhab7/deepai
api colorization deepai image php toonify
Last synced: 5 months ago
JSON representation
a php library for deepai.org
- Host: GitHub
- URL: https://github.com/mkhab7/deepai
- Owner: mkhab7
- License: mit
- Created: 2021-11-02T12:37:01.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-11T14:45:24.000Z (over 4 years ago)
- Last Synced: 2025-08-20T06:07:59.775Z (10 months ago)
- Topics: api, colorization, deepai, image, php, toonify
- Language: PHP
- Homepage: https://github.com/mkhab7/deepai
- Size: 5.38 MB
- Stars: 2
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# deepai
A library for using [deepai.org](http://deepai.org) api
# install
## via composer :
> composer require mkhab7/deepai
# usage
```php
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();
```
### You can adjust the text as needed
example :
```php
$deepai->setText('cat');
$deepai->textToImage();
```
### if output is a text you can use "output"
example :
```php
$deepai->setText('cat');
$textOutput = $deepai->textGeneration()->apply()->output();//returns output url/text
```
### set a custom method :
```php
$deepai->setImage(new CURLFile('image.jpg'))
->method('deepdream') //custom method
->apply();
```
## All the methods you can use
- colorize
- toonify
- superResolution
- textToImage
- textGeneration
- nudityDetection
- waifu2x