1. Go to this page and download the library: Download heroshots/sdk 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/ */
heroshots / sdk example snippets
use HeroShots\Client;
// Email/password login: stores the JWT, auto re-logins on expiry.
// Base URL defaults to https://app.heroshots.ai.
$client = Client::fromLogin('[email protected]', 'secret');
// Or reuse an existing token.
$client = new Client(token: 'eyJ...');
use HeroShots\Client;
$client = new Client(token: 'lz_live_YOUR_AGENCY_KEY', managedUserId: 12345);
$job = $client->images->generate('https://example.com/product.jpg');
// Switch target brand later, or pass null to clear it.
$client->withManagedUser(67890);