SDKs
Official SDKs for JavaScript/TypeScript, PHP (with Laravel) and Python.
| Language | Install | Source |
|---|---|---|
| JavaScript / TypeScript (Node 18+, edge, browsers) | npm install @pixviro/sdk |
sdks/js |
| PHP 8.1+ (Laravel auto-discovery) | composer require pixviro/pixviro-php |
sdks/php |
| Python 3.9+ | pip install pixviro |
sdks/python |
Each SDK has no third-party dependencies and includes:
- an API client for every endpoint, with pagination helpers, typed
errors and safe retries (
429afterRetry-After;5xxand network errors only for requests that are safe to repeat); - delivery helpers that build canonical, signed and responsive URLs locally — no API call;
- webhook verification with replay protection.
The SDKs are tested against vectors generated from the PixViro server itself, so their URLs and signatures always match what the CDN expects.
Set up
import { PixViro, Delivery } from '@pixviro/sdk';
const pixviro = new PixViro(process.env.PIXVIRO_API_KEY);
const cdn = new Delivery({ account: 'k3x9p2ab7q', project: 'shop' });
const asset = await pixviro.assets.upload(file, { publicId: 'products/red-shoe' });
cdn.url(asset.public_id, { transformation: { width: 400, format: 'auto' } });
use PixViro\Delivery;
use PixViro\Http\Upload;
use PixViro\PixViro;
$pixviro = new PixViro(getenv('PIXVIRO_API_KEY'));
$cdn = new Delivery('k3x9p2ab7q', 'shop');
$asset = $pixviro->assets->upload(Upload::fromPath('red-shoe.jpg'), ['public_id' => 'products/red-shoe']);
$cdn->url($asset['public_id'], ['width' => 400, 'format' => 'auto']);
from pixviro import PixViro, Delivery
pixviro = PixViro(os.environ["PIXVIRO_API_KEY"])
cdn = Delivery("k3x9p2ab7q", "shop")
asset = pixviro.assets.upload("red-shoe.jpg", public_id="products/red-shoe")
cdn.url(asset["public_id"], {"width": 400, "format": "auto"})
Your account ID and project ID are on the project page.
Laravel
The PHP SDK registers itself: set PIXVIRO_API_KEY, PIXVIRO_ACCOUNT and
PIXVIRO_PROJECT (optionally PIXVIRO_SIGNING_SECRET,
PIXVIRO_CUSTOM_DOMAIN, PIXVIRO_WEBHOOK_SECRET), then inject
PixViro\PixViro / PixViro\Delivery, use the PixViro facade, or in Blade:
<img src="@pixviro('products/red-shoe', ['width' => 400, 'format' => 'auto'])" alt="">
Other languages
The API is described by an OpenAPI document: generate a client with your favorite generator, or import the Postman collection from Developers → API reference in the dashboard.

