Official SDKs

Build faster with Flixly SDKs

Typed clients for the Flixly AI API with built-in webhook verification, rate-limit handling, and zero runtime dependencies. Drop into Node, Edge, browsers, or WordPress.

Sync + async in one call

Fast image models return immediately; videos run async via webhook or polling — same client, one method.

Built-in webhook verification

HMAC-SHA256 verification with replay-protection timestamps. One line of code, drop-in safe.

Rate-limit aware

Every response surfaces X-RateLimit-* headers as parsed objects, on success AND on errors. Pace yourself before a 429.

Zero dependencies

JS SDK uses native fetch + Web Crypto. PHP SDK uses curl + ext-hash. Drop into any environment.

Available SDKs

Pick the language closest to your stack — every SDK exposes the same surface so the mental model transfers.

JavaScript / TypeScript

@flixly/sdk

Node.js 18+ · Edge · Browser

Install

npm install @flixly/sdk

Quick 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();

PHP

flixly/sdk

PHP 7.4+ · WordPress-ready

Install

composer require flixly/sdk

Quick 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;
}

No-code integrations

Drop Flixly into your existing automation tools — n8n, WordPress, Shopify, and more. No SDK install required.

Browse platform plugins

Start building today

Create an API key in seconds. No credit card required for the free tier.