PopNowDocs API
Contenu principal

Référence API de GPT Image 2.6 Flare

Le niveau rapide d’OpenAI pour brouillons, retouches et GIF en boucle

Une seule clé API PopNow suffit pour appeler GPT Image 2.6 Flare depuis votre code. Vous trouverez ici les identifiants de modèle à envoyer, chaque champ d’entrée accepté, le coût d’une requête en USD et une requête à coller telle quelle dans un terminal.

Les descriptions des paramètres proviennent du schéma d’entrée du modèle et ne sont disponibles qu’en anglais.

En bref

Éditeur
OpenAI
Résultat
Image
À partir de
$0.02232 USD par image
Durée habituelle
environ 29 s

Les prix sont affichés en USD et les frais sont déduits de votre solde PopNow. Le montant maximal est réservé à la réception de la tâche, puis la consommation réelle est facturée à la fin et le solde libéré. Les tâches en échec ne sont pas facturées. Obtenez un devis exact avant de lancer avec POST /api/v1/jobs/quote.

Créer une image

openai/gpt-image-2.6-flare/text-to-image

Prix

OptionUSD
quality = low, resolution = 1k$0.02232 par image
quality = low, resolution = 512$0.027 par image
quality = medium, resolution = 1k$0.03915 par image
quality = low, resolution = 2k$0.04131 par image
quality = low, resolution = 768$0.04392 par image
quality = high, resolution = 1k$0.04743 par image
quality = medium, resolution = 512$0.04752 par image
quality = high, resolution = 512$0.05742 par image
quality = medium, resolution = 2k$0.07299 par image
quality = low, resolution = 4k$0.07479 par image
quality = medium, resolution = 768$0.07776 par image
quality = xhigh, resolution = 1k$0.08433 par image
quality = high, resolution = 2k$0.08847 par image
quality = high, resolution = 768$0.09432 par image
quality = xhigh, resolution = 512$0.10206 par image
quality = medium, resolution = 4k$0.13221 par image
quality = xhigh, resolution = 2k$0.15723 par image
quality = high, resolution = 4k$0.16011 par image
quality = xhigh, resolution = 768$0.1674 par image
quality = max, resolution = 1k$0.18972 par image
quality = max, resolution = 512$0.22941 par image
quality = xhigh, resolution = 4k$0.28512 par image
quality = max, resolution = 2k$0.35379 par image
quality = max, resolution = 768$0.37638 par image
quality = max, resolution = 4k$0.64044 par image

La facturation suit les tokens réellement utilisés par chaque requête : $4.5 par million de tokens de texte en entrée, $7.2 par million de tokens d’image en entrée et $27 par million de tokens d’image en sortie. Le tableau indique le prix d’une image carrée pour chaque niveau ; les autres formats coûtent généralement moins cher. Avec plusieurs images en sortie, les tokens d’entrée comptent pour chaque image.

Paramètres

ChampTypeValeur par défautValeurs admisesRôle
promptObligatoirestring—jusqu’à 5 000 caractèresDescribe the picture: subject, setting, light and any short text to render in quotes.
aspect_ratioFacultatifstring1:11:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, 9:21, 2:1, 1:2, 3:1, 1:3, 5:4, … (+1)Output aspect ratio.
resolutionFacultatifstring1k1k, 2k, 4k, 512, 768Output size tier: 1k is about 1 megapixel, 2k about 3.7, 4k about 8.3. For GIF output use 512 or 768, the size of one frame.
qualityFacultatifstringmediumlow, medium, high, xhigh, maxRendering quality. Higher tiers add detail, time and cost.
reasoning_effortFacultatifstring—low, medium, highHow much the model plans the picture before drawing. Higher helps dense text and complex layouts and takes longer; the price does not change. Leave it unset for the model default (high).
num_outputsFacultatifinteger1de 1 à 10How many images to return, each billed separately.
backgroundFacultatifstringautoauto, transparent, opaqueBackground treatment. Transparent needs PNG or WebP output.
output_formatFacultatifstringpngpng, jpeg, webp, gifFile format of the returned images. gif returns an animated loop; describe the motion in the prompt.
frame_countFacultatifinteger—de 2 à 16Number of frames in a GIF, 2 to 16 (default 9). Every 8 frames are billed as one more frame sheet. Only with gif output.
frame_duration_msFacultatifinteger—de 20 à 2000How long each GIF frame stays on screen, 20 to 2000 milliseconds (default 200). Only with gif output.
output_qualityFacultatifinteger—de 0 à 100Compression quality for JPEG and WebP output, from 0 to 100.

Exemple de requête

Cette requête fonctionne telle quelle ; les champs omis gardent leur valeur par défaut. Placez d’abord votre clé dans POPNOW_API_KEY.

POST /api/v1/jobs/createTask?wait=60
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask?wait=60" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "openai/gpt-image-2.6-flare/text-to-image",
  "input": {
    "prompt": "A cozy reading nook beside a rain-streaked window, warm lamp light, a sleeping orange cat on a knitted blanket, soft film grain",
    "num_outputs": 1,
    "quality": "medium",
    "resolution": "1k"
  }
}'

La réponse contient tout de suite un taskId. Récupérez le résultat avec GET /api/v1/jobs/recordInfo, ou ajoutez callBackUrl pour être prévenu.

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Modifier une image

openai/gpt-image-2.6-flare/edit

Prix

OptionUSD
quality = low, resolution = 1k$0.02232 par image
quality = medium, resolution = 1k$0.03915 par image
quality = low, resolution = 2k$0.04131 par image
quality = high, resolution = 1k$0.04743 par image
quality = medium, resolution = 2k$0.07299 par image
quality = low, resolution = 4k$0.07479 par image
quality = xhigh, resolution = 1k$0.08433 par image
quality = high, resolution = 2k$0.08847 par image
quality = medium, resolution = 4k$0.13221 par image
quality = xhigh, resolution = 2k$0.15723 par image
quality = high, resolution = 4k$0.16011 par image
quality = max, resolution = 1k$0.18972 par image
quality = xhigh, resolution = 4k$0.28512 par image
quality = max, resolution = 2k$0.35379 par image
quality = max, resolution = 4k$0.64044 par image

La facturation suit les tokens réellement utilisés par chaque requête : $4.5 par million de tokens de texte en entrée, $7.2 par million de tokens d’image en entrée et $27 par million de tokens d’image en sortie. Le tableau indique le prix d’une image carrée pour chaque niveau ; les autres formats coûtent généralement moins cher. Avec plusieurs images en sortie, les tokens d’entrée comptent pour chaque image.

Paramètres

ChampTypeValeur par défautValeurs admisesRôle
promptObligatoirestring—jusqu’à 5 000 caractèresSay what to change and what must stay the same. Refer to the images as Image 1, Image 2 and so on.
image_urlsObligatoirearray<string (uri)>—jusqu’à 16 élémentsOne to 16 source images, in the order your prompt refers to them. Each one adds a small charge.
mask_urlFacultatifstring (uri)——Optional PNG mask: transparent pixels mark the area to repaint in the first image, same size as that image. Cannot be combined with markup_url.
markup_urlFacultatifstring (uri)——Optional transparent PNG with circles, sketches or notes drawn over the first image to show what to change, same size as that image. Cannot be combined with mask_url.
aspect_ratioFacultatifstring—1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, 9:21, 2:1, 1:2, 3:1, 1:3, 5:4, … (+1)Output aspect ratio. Leave it unset to keep the first image's shape (1k only); pick a ratio for 2k or 4k.
resolutionFacultatifstring1k1k, 2k, 4kOutput size tier: 1k is about 1 megapixel, 2k about 3.7, 4k about 8.3.
qualityFacultatifstringmediumlow, medium, high, xhigh, maxRendering quality. Higher tiers add detail, time and cost.
reasoning_effortFacultatifstring—low, medium, highHow much the model plans the picture before drawing. Higher helps dense text and complex layouts and takes longer; the price does not change. Leave it unset for the model default (high).
num_outputsFacultatifinteger1de 1 à 10How many images to return, each billed separately.
backgroundFacultatifstringautoauto, transparent, opaqueBackground treatment. Transparent needs PNG or WebP output.
output_formatFacultatifstringpngpng, jpeg, webpFile format of the returned images.
output_qualityFacultatifinteger—de 0 à 100Compression quality for JPEG and WebP output, from 0 to 100.

Exemple de requête

Cette requête fonctionne telle quelle ; les champs omis gardent leur valeur par défaut. Placez d’abord votre clé dans POPNOW_API_KEY.

L’exemple utilise des fichiers d’exemple PopNow dans image_urls. Remplacez-les par vos propres liens HTTPS publics, fichiers envoyés ou ressources enregistrées.

POST /api/v1/jobs/createTask
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "openai/gpt-image-2.6-flare/edit",
  "input": {
    "prompt": "Change the orange jacket to deep forest green and add soft golden-hour light; keep the face, pose and background unchanged",
    "image_urls": [
      "https://media.popnow.ai/influencer/examples/marco.webp"
    ],
    "num_outputs": 1,
    "quality": "medium",
    "resolution": "1k"
  }
}'

La réponse contient tout de suite un taskId. Récupérez le résultat avec GET /api/v1/jobs/recordInfo, ou ajoutez callBackUrl pour être prévenu.

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Pour aller plus loin

Sur cette page