PHP code example of runapi-ai / midjourney
1. Go to this page and download the library: Download runapi-ai/midjourney 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 / midjourney example snippets
unApi\Midjourney\MidjourneyClient;
$client = new MidjourneyClient(); // reads RUNAPI_API_KEY
$task = $client->textToImage->create([
'model' => 'midjourney-v8.1',
'enable_prompt_translation' => true,
' true,
'