L'API Flixy, en 5 minutes
Une API REST simple, en JSON : envoyez une requête avec votre clé, récupérez votre création sans filigrane.
Créez une clé
Studio → Business Suite → API → « Créer une clé ». Elle n'est affichée qu'une fois : gardez-la secrète, côté serveur.
Lancez une création
POST generate.php avec un format et un prompt. La réponse arrive tout de suite avec un identifiant.
Récupérez le fichier
Interrogez status.php toutes les 3 secondes. Quand le statut est « done », téléchargez « url ».
Authentification
Adresse de base : https://flixy.design/api/v1/
Authorization: Bearer flx_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
L'en-tête « X-Api-Key » est aussi accepté. Limite : 60 requêtes par minute et par clé. Les créations sont payées en crédits avec votre remise Business ; une création qui échoue est remboursée.
Exemples
curl -X POST https://flixy.design/api/v1/generate.php \
-H "Authorization: Bearer $FLIXY_KEY" \
-H "Content-Type: application/json" \
-d '{"format":"reel_video","prompt":"A runner smiles at sunrise"}'const r = await fetch("https://flixy.design/api/v1/generate.php", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FLIXY_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ format: "reel_video", prompt: "A runner smiles at sunrise" }),
});
const job = await r.json();
// Poll job.status_url every 3 s until status is "done", then download job.urlimport os, time, requests
H = {"Authorization": f"Bearer {os.environ['FLIXY_KEY']}"}
job = requests.post("https://flixy.design/api/v1/generate.php", headers=H,
json={"format": "reel_video", "prompt": "A runner smiles at sunrise"}).json()
while True:
s = requests.get(job["status_url"], headers=H).json()
if s["status"] in ("done", "failed"): break
time.sleep(3)
print(s.get("url"))$ch = curl_init("https://flixy.design/api/v1/generate.php");
curl_setopt_array($ch, [
CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FLIXY_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode(["format" => "reel_video", "prompt" => "A runner smiles at sunrise"]),
]);
$job = json_decode(curl_exec($ch), true);
Points d'accès
/api/v1/generate.phpLancer une création (image, retouche ou vidéo)
{
"format": "native_square",
"prompt": "A smiling runner at sunrise on a city bridge",
"type": "image",
"params": { "image_size": "2K" },
"enhance": true
}{
"ok": true,
"id": 1842,
"status": "queued",
"type": "image",
"format": "native_square",
"credits_charged": 0.29,
"balance": 412.5,
"status_url": "https://flixy.design/api/v1/status.php?id=1842"
}/api/v1/status.php?id=1842Suivre une création ; « url » donne le fichier final sans filigrane
{
"ok": true,
"id": 1842,
"type": "image",
"status": "done",
"url": "https://flixy.design/api/v1/file.php?id=1842&exp=…&sig=…",
"width": 2048,
"height": 2048
}/api/v1/copy.phpGénérer des textes pub en plusieurs variantes
{
"kind": "push",
"brief": "Meditation app, 7-day free trial, busy professionals",
"lang": "en",
"variants": 3,
"tone": "warm",
"brand": "Calmly"
}{
"ok": true,
"kind": "push",
"items": [
{ "title": "Breathe. Just 3 minutes.", "message": "Your 7-day free trial is ready.", "image_prompt": "…" }
],
"credits_charged": 0.06,
"balance": 412.44
}/api/v1/svg.phpCréer une bannière SVG animée
{
"brief": "Winter sale -40% on sneakers",
"width": 300,
"height": 250,
"colors": "#FF80BF, #1E1A24",
"cta": "Shop now",
"lang": "en"
}{
"ok": true,
"width": 300,
"height": 250,
"svg": "<svg xmlns=…>…</svg>",
"credits_charged": 0.12
}/api/v1/balance.phpSolde de crédits et remise du compte
{
"ok": true,
"account": "Acme Inc.",
"balance": 412.44,
"discount_percent": 20,
"credit_usd": 1
}/api/v1/formats.phpListe des formats pub et des types de textes
{ "ok": true, "formats": [ … ], "copy_kinds": [ … ] }Champs de generate.php
| Champ | Description |
|---|---|
prompt * | Description de la création (3 à 2 000 caractères), dans n'importe quelle langue. |
format | Format pub (voir la liste ci-dessous) : règle le cadrage, la durée et les consignes pub. |
type | image · edit · video |
params | aspect_ratio, image_size (1K, 2K, 4K), style, lighting · vidéo : resolution (720p, 1080p), duration (4s–10s) |
image | Photo en base64 (PNG, JPEG, WebP, 12 Mo max) : à retoucher (edit) ou à animer (video). |
continue_from | Identifiant d'une création terminée à modifier ou à prolonger. |
enhance | true : l'assistant Flixy améliore le prompt avant la création. |
Formats pub
| format | Nom | Type | Taille de diffusion |
|---|---|---|---|
native_square | Native ad carrée | image | 1200×1200 |
native_wide | Native ad paysage | image | 1200×628 |
push_icon | Icône push | image | 192×192 |
push_image | Image push | image | 720×480 |
banner_mrec | Bannière pavé 300×250 | image | 300×250 |
banner_leader | Bannière horizontale 728×90 | image | 728×90 |
banner_sky | Bannière verticale 160×600 | image | 160×600 |
social_feed | Pub Facebook / Instagram | image | 1080×1350 |
social_story | Story sponsorisée | image | 1080×1920 |
reel_video | Reel / TikTok publicitaire | video | 1080×1920 · 8s |
ctv_video | Spot CTV / TV connectée | video | 1920×1080 · 10s |
social_square | Pub LinkedIn / B2B | image | 1200×1200 |
pin_vertical | Épingle Pinterest | image | 1000×1500 |
instream_video | Pré-roll YouTube / in-stream | video | 1920×1080 · 6s |
dooh_portrait | Écran abribus / mobilier urbain | image | 1080×1920 |
dooh_landscape | Écran géant / billboard digital | image | 1920×1080 |
billboard_4x3 | Affiche 4×3 / panneau | image | 4×3 m |
dooh_video | Vidéo DOOH (gares, centres commerciaux) | video | 1080×1920 · 8s |
film_wide | Scène de film 16:9 | video | 1920×1080 · 8s |
film_vertical | Scène de film vertical 9:16 | video | 1080×1920 · 8s |
packshot | Photo produit carrée | image | 2048×2048 |
packshot_portrait | Photo produit portrait | image | 1600×2000 |
poster_portrait | Affiche verticale | image | A3 / A4 |
poster_landscape | Affiche horizontale | image | A3 / A4 |
advertorial | Image d'advertorial | image | 1600×900 |
Types de textes (champ « kind » de copy.php) : native push facebook tiktok banner ctv advertorial titles email
Erreurs
{ "ok": false, "error": { "code": "insufficient_credits", "message": "Not enough credits for this creation." } }
401 missing_key · invalid_key | Clé absente, invalide ou supprimée. |
402 insufficient_credits | Solde insuffisant : rechargez vos crédits. |
403 not_business | Le compte n'a pas l'accès Business. |
422 refused | Demande contraire aux règles d'utilisation. |
429 rate_limited | Plus de 60 requêtes en une minute. |
Une question technique ? Le support Business répond 24 h/24, 7 j/7 : business@flixy.design.
Ta prochaine publication commence ici
Crée gratuitement l'image, la retouche ou la vidéo de ton prochain post, au bon format pour chaque réseau.