Download the PHP package heroshots/sdk without Composer
On this page you can find all versions of the php package heroshots/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download heroshots/sdk
More information about heroshots/sdk
Files in heroshots/sdk
Package sdk
Short Description Official PHP SDK for the HeroShots / StudioHero platform (JWT/API key auth).
License MIT
Informations about the package sdk
heroshots/sdk (PHP SDK)
High-level PHP client for the HeroShots / StudioHero platform, authenticated with
a portal JWT or API key. PSR-4 namespace HeroShots\.
Scope: image generation (incl. still-life), short video, long video, still-life
video, the full Studio Hero storyboard flow, avatar listing & generation, and
account balance. See GUIDE.md for use-case walkthroughs.
Install
Requires PHP 8.1+. Runtime dependency: guzzlehttp/guzzle.
Authenticate
Agency act-as
Agency API keys can operate as a managed brand by passing the managedUserId
returned by the managed-client provisioning API. The SDK adds
X-Managed-User-Id to authenticated requests.
Usage
Extra backend fields go in the trailing $payload/$fields array argument and
are forwarded verbatim. /api/v1 billing metadata is under $result['_meta'].
Resources
uploads · images · videos · longvideo · stilllife · storyboard ·
avatars
Plus on the client: login(), me(), balance(), stats().
Errors
All errors extend HeroShots\Errors\ApiException (->errorCode, ->status,
->details).
Test
Billing
Generations cost credits. Check remaining credits with $client->balance()
(hs_credits + wallet_balance). Use $client->stats() for the full raw
/api/auth/stats payload, including recent generations and offered plans. See
examples/full_storyboard_flow.php.