PHP code example of aisdk / prodia

1. Go to this page and download the library: Download aisdk/prodia 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/ */

    

aisdk / prodia example snippets


use AiSdk\Generate;
use AiSdk\Prodia;

Prodia::create(['apiKey' => $_ENV['PRODIA_TOKEN']]);

$image = Generate::image('A cinematic mountain lake at sunrise')
    ->model(Prodia::model('inference.flux-fast.schnell.txt2img.v2'))
    ->run();