Fast image models return immediately; videos run async via webhook or polling — same client, one method.
HMAC-SHA256 verification with replay-protection timestamps. One line of code, drop-in safe.
Every response surfaces X-RateLimit-* headers as parsed objects, on success AND on errors. Pace yourself before a 429.
JS SDK uses native fetch + Web Crypto. PHP SDK uses curl + ext-hash. Drop into any environment.
Pick the language closest to your stack — every SDK exposes the same surface so the mental model transfers.
Install
npm install @flixly/sdkQuick start
import { Flixly } from "@flixly/sdk";
const flixly = new Flixly({ apiKey: process.env.FLIXLY_API_KEY! });
const result = await flixly.generateAndWait({
model: "flux-dev",
prompt: "A cat wearing a top hat, oil painting style",
type: "TEXT_TO_IMAGE",
input: { aspect_ratio: "1:1", resolution: "1K" },
});
console.log(result.data.output_url);
// → https://cdn.flixly.ai/outputs/...Verify webhooks
// Verify incoming webhooks in your handler
import { Flixly } from "@flixly/sdk";
const valid = await Flixly.verifyWebhookSignature({
secret: process.env.FLIXLY_WEBHOOK_SECRET!,
timestamp: req.headers["x-flixly-timestamp"]!,
signature: req.headers["x-flixly-signature"]!,
body: rawBody, // raw, NOT JSON.parse + re-stringify
});
if (!valid) return res.status(401).end();Install
composer require flixly/sdkQuick start
use Flixly\Flixly;
use Flixly\FlixlyError;
$flixly = new Flixly(['api_key' => getenv('FLIXLY_API_KEY')]);
try {
$gen = $flixly->generateAndWait([
'model' => 'flux-dev',
'prompt' => 'A cat wearing a top hat, oil painting style',
'type' => 'TEXT_TO_IMAGE',
'input' => ['aspect_ratio' => '1:1', 'resolution' => '1K'],
]);
echo $gen['data']['output_url'];
// → https://cdn.flixly.ai/outputs/...
} catch (FlixlyError $e) {
error_log("Flixly: {$e->getErrorCode()} {$e->getMessage()}");
}Verify webhooks
// Verify incoming webhooks in your handler
$body = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_FLIXLY_SIGNATURE'] ?? '';
$timestamp = $_SERVER['HTTP_X_FLIXLY_TIMESTAMP'] ?? '';
$valid = Flixly::verifyWebhookSignature(
getenv('FLIXLY_WEBHOOK_SECRET'),
$timestamp,
$signature,
$body // raw body — do NOT json_decode + re-encode
);
if (!$valid) {
http_response_code(401);
exit;
}Drop Flixly into your existing automation tools — n8n, WordPress, Shopify, and more. No SDK install required.
Browse platform pluginsBuilding in a language we don't ship an SDK for? Hit the REST API directly — full machine-readable spec below.
Import into Postman, n8n, Make, or your codegen tool of choice.
Endpoint-by-endpoint docs, authentication, rate limits, error codes.
Event shape, HMAC signature verification, retry policy. Skip polling.
Issue keys with per-key spending caps and default webhook URLs.