PopNowDocs API
Contenuto principale

Riferimento API di GPT Image 2.6 Sunburst

Il livello di precisione di OpenAI, fino al 4K con dettagli stabili

Con una sola chiave API di PopNow chiami GPT Image 2.6 Sunburst dal tuo codice. Qui trovi gli ID del modello da inviare, ogni campo di input accettato, quanto costa ogni richiesta in USD e una richiesta da incollare nel terminale così com’è.

Le descrizioni dei parametri provengono dallo schema di input del modello e sono disponibili solo in inglese.

In sintesi

Sviluppato da
OpenAI
Risultato
Immagine
Da
$0.02232 USD per immagine
Tempo tipico
circa 50 s

I prezzi sono indicati in USD e gli importi vengono addebitati sul tuo saldo PopNow. Alla ricezione viene riservato il massimo importo; al termine viene addebitato il consumo effettivo e il resto viene sbloccato. Le attività fallite non vengono addebitate. Per un preventivo esatto prima di eseguire, usa POST /api/v1/jobs/quote.

Crea immagine

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

Prezzo

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

L’addebito segue i token usati da ogni richiesta: $4.5 per 1 milione di token di testo in ingresso, $7.2 per 1 milione di token immagine in ingresso e $27 per 1 milione di token immagine in uscita. La tabella riporta il prezzo dell’immagine quadrata per ogni livello, quindi gli altri formati di solito costano meno. Con più immagini in uscita, i token in ingresso contano per ogni immagine.

Parametri

CampoTipoPredefinitoValori ammessiA cosa serve
promptObbligatoriostring—fino a 5000 caratteriDescribe the picture: subject, setting, light and any short text to render in quotes.
aspect_ratioFacoltativostring1: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.
resolutionFacoltativostring1k1k, 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.
qualityFacoltativostringmediumlow, medium, high, xhigh, maxRendering quality. Higher tiers add detail, time and cost.
reasoning_effortFacoltativostring—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_outputsFacoltativointeger1da 1 a 10How many images to return, each billed separately.
backgroundFacoltativostringautoauto, transparent, opaqueBackground treatment. Transparent needs PNG or WebP output.
output_formatFacoltativostringpngpng, jpeg, webp, gifFile format of the returned images. gif returns an animated loop; describe the motion in the prompt.
frame_countFacoltativointeger—da 2 a 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_msFacoltativointeger—da 20 a 2000How long each GIF frame stays on screen, 20 to 2000 milliseconds (default 200). Only with gif output.
output_qualityFacoltativointeger—da 0 a 100Compression quality for JPEG and WebP output, from 0 to 100.

Richiesta di esempio

Questa richiesta funziona così com’è; i campi omessi usano il valore predefinito. Prima salva la tua chiave in POPNOW_API_KEY.

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-sunburst/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 risposta contiene subito un taskId. Recupera il risultato con GET /api/v1/jobs/recordInfo, oppure aggiungi callBackUrl per ricevere una notifica.

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"

Modifica immagine

openai/gpt-image-2.6-sunburst/edit

Prezzo

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

L’addebito segue i token usati da ogni richiesta: $4.5 per 1 milione di token di testo in ingresso, $7.2 per 1 milione di token immagine in ingresso e $27 per 1 milione di token immagine in uscita. La tabella riporta il prezzo dell’immagine quadrata per ogni livello, quindi gli altri formati di solito costano meno. Con più immagini in uscita, i token in ingresso contano per ogni immagine.

Parametri

CampoTipoPredefinitoValori ammessiA cosa serve
promptObbligatoriostring—fino a 5000 caratteriSay what to change and what must stay the same. Refer to the images as Image 1, Image 2 and so on.
image_urlsObbligatorioarray<string (uri)>—fino a 16 elementiOne to 16 source images, in the order your prompt refers to them. Each one adds a small charge.
mask_urlFacoltativostring (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_urlFacoltativostring (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_ratioFacoltativostring—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.
resolutionFacoltativostring1k1k, 2k, 4kOutput size tier: 1k is about 1 megapixel, 2k about 3.7, 4k about 8.3.
qualityFacoltativostringmediumlow, medium, high, xhigh, maxRendering quality. Higher tiers add detail, time and cost.
reasoning_effortFacoltativostring—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_outputsFacoltativointeger1da 1 a 10How many images to return, each billed separately.
backgroundFacoltativostringautoauto, transparent, opaqueBackground treatment. Transparent needs PNG or WebP output.
output_formatFacoltativostringpngpng, jpeg, webpFile format of the returned images.
output_qualityFacoltativointeger—da 0 a 100Compression quality for JPEG and WebP output, from 0 to 100.

Richiesta di esempio

Questa richiesta funziona così com’è; i campi omessi usano il valore predefinito. Prima salva la tua chiave in POPNOW_API_KEY.

L’esempio usa file di prova di PopNow in image_urls. Sostituiscili con i tuoi link HTTPS pubblici, file caricati o asset salvati.

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-sunburst/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 risposta contiene subito un taskId. Recupera il risultato con GET /api/v1/jobs/recordInfo, oppure aggiungi callBackUrl per ricevere una notifica.

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"

Passi successivi

In questa pagina