Referência da API do GPT Image 2.6 Sunburst
O nível de precisão da OpenAI, até 4K com detalhes estáveis
Com uma única chave de API da PopNow você chama o GPT Image 2.6 Sunburst direto do seu código. Aqui estão os IDs de modelo a enviar, cada campo de entrada aceito, quanto custa cada requisição em USD e um exemplo que você cola no terminal e roda.
As descrições dos parâmetros vêm do schema de entrada do modelo e estão disponíveis só em inglês.
Resumo
- Desenvolvedor
- OpenAI
- Resultado
- Imagem
- A partir de
- $0.02232 USD por imagem
- Tempo médio
- cerca de 50 s
Os preços são exibidos em USD e os valores são descontados do seu saldo PopNow. Ao aceitar a tarefa, o valor máximo é reservado; ao concluir, o uso real é cobrado e o restante liberado. Tarefas com falha não são cobradas. Consulte POST /api/v1/jobs/quote para obter uma cotação exata antes de executar.
Criar imagem
openai/gpt-image-2.6-sunburst/text-to-image
Preço
| Opção | USD |
|---|---|
quality = low, resolution = 1k | $0.02232 por imagem |
quality = low, resolution = 512 | $0.027 por imagem |
quality = medium, resolution = 1k | $0.03915 por imagem |
quality = low, resolution = 2k | $0.04131 por imagem |
quality = low, resolution = 768 | $0.04392 por imagem |
quality = high, resolution = 1k | $0.04743 por imagem |
quality = medium, resolution = 512 | $0.04752 por imagem |
quality = high, resolution = 512 | $0.05742 por imagem |
quality = medium, resolution = 2k | $0.07299 por imagem |
quality = low, resolution = 4k | $0.07479 por imagem |
quality = medium, resolution = 768 | $0.07776 por imagem |
quality = xhigh, resolution = 1k | $0.08433 por imagem |
quality = high, resolution = 2k | $0.08847 por imagem |
quality = high, resolution = 768 | $0.09432 por imagem |
quality = xhigh, resolution = 512 | $0.10206 por imagem |
quality = medium, resolution = 4k | $0.13221 por imagem |
quality = xhigh, resolution = 2k | $0.15723 por imagem |
quality = high, resolution = 4k | $0.16011 por imagem |
quality = xhigh, resolution = 768 | $0.1674 por imagem |
quality = max, resolution = 1k | $0.18972 por imagem |
quality = max, resolution = 512 | $0.22941 por imagem |
quality = xhigh, resolution = 4k | $0.28512 por imagem |
quality = max, resolution = 2k | $0.35379 por imagem |
quality = max, resolution = 768 | $0.37638 por imagem |
quality = max, resolution = 4k | $0.64044 por imagem |
A cobrança segue os tokens usados em cada solicitação: $4.5 por 1 milhão de tokens de texto de entrada, $7.2 por 1 milhão de tokens de imagem de entrada e $27 por 1 milhão de tokens de imagem de saída. A tabela mostra o preço da imagem quadrada em cada nível, então outras proporções costumam custar menos. Com várias imagens de saída, os tokens de entrada contam por imagem.
Parâmetros
| Campo | Tipo | Padrão | Valores aceitos | Para que serve |
|---|---|---|---|---|
promptObrigatório | string | — | até 5.000 caracteres | Describe the picture: subject, setting, light and any short text to render in quotes. |
aspect_ratioOpcional | string | 1:1 | 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. |
resolutionOpcional | string | 1k | 1k, 2k, 4k, 512, 768 | Output 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. |
qualityOpcional | string | medium | low, medium, high, xhigh, max | Rendering quality. Higher tiers add detail, time and cost. |
reasoning_effortOpcional | string | — | low, medium, high | How 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_outputsOpcional | integer | 1 | de 1 a 10 | How many images to return, each billed separately. |
backgroundOpcional | string | auto | auto, transparent, opaque | Background treatment. Transparent needs PNG or WebP output. |
output_formatOpcional | string | png | png, jpeg, webp, gif | File format of the returned images. gif returns an animated loop; describe the motion in the prompt. |
frame_countOpcional | integer | — | de 2 a 16 | Number 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_msOpcional | integer | — | de 20 a 2000 | How long each GIF frame stays on screen, 20 to 2000 milliseconds (default 200). Only with gif output. |
output_qualityOpcional | integer | — | de 0 a 100 | Compression quality for JPEG and WebP output, from 0 to 100. |
Exemplo de requisição
Esta requisição roda do jeito que está; os campos que você omitir usam o valor padrão. Antes, coloque sua chave em POPNOW_API_KEY.
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"
}
}'A resposta já traz um taskId. Busque o resultado com GET /api/v1/jobs/recordInfo ou inclua callBackUrl para ser avisado.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"Editar imagem
openai/gpt-image-2.6-sunburst/edit
Preço
| Opção | USD |
|---|---|
quality = low, resolution = 1k | $0.02232 por imagem |
quality = medium, resolution = 1k | $0.03915 por imagem |
quality = low, resolution = 2k | $0.04131 por imagem |
quality = high, resolution = 1k | $0.04743 por imagem |
quality = medium, resolution = 2k | $0.07299 por imagem |
quality = low, resolution = 4k | $0.07479 por imagem |
quality = xhigh, resolution = 1k | $0.08433 por imagem |
quality = high, resolution = 2k | $0.08847 por imagem |
quality = medium, resolution = 4k | $0.13221 por imagem |
quality = xhigh, resolution = 2k | $0.15723 por imagem |
quality = high, resolution = 4k | $0.16011 por imagem |
quality = max, resolution = 1k | $0.18972 por imagem |
quality = xhigh, resolution = 4k | $0.28512 por imagem |
quality = max, resolution = 2k | $0.35379 por imagem |
quality = max, resolution = 4k | $0.64044 por imagem |
A cobrança segue os tokens usados em cada solicitação: $4.5 por 1 milhão de tokens de texto de entrada, $7.2 por 1 milhão de tokens de imagem de entrada e $27 por 1 milhão de tokens de imagem de saída. A tabela mostra o preço da imagem quadrada em cada nível, então outras proporções costumam custar menos. Com várias imagens de saída, os tokens de entrada contam por imagem.
Parâmetros
| Campo | Tipo | Padrão | Valores aceitos | Para que serve |
|---|---|---|---|---|
promptObrigatório | string | — | até 5.000 caracteres | Say what to change and what must stay the same. Refer to the images as Image 1, Image 2 and so on. |
image_urlsObrigatório | array<string (uri)> | — | até 16 itens | One to 16 source images, in the order your prompt refers to them. Each one adds a small charge. |
mask_urlOpcional | string (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_urlOpcional | string (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_ratioOpcional | string | — | 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. |
resolutionOpcional | string | 1k | 1k, 2k, 4k | Output size tier: 1k is about 1 megapixel, 2k about 3.7, 4k about 8.3. |
qualityOpcional | string | medium | low, medium, high, xhigh, max | Rendering quality. Higher tiers add detail, time and cost. |
reasoning_effortOpcional | string | — | low, medium, high | How 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_outputsOpcional | integer | 1 | de 1 a 10 | How many images to return, each billed separately. |
backgroundOpcional | string | auto | auto, transparent, opaque | Background treatment. Transparent needs PNG or WebP output. |
output_formatOpcional | string | png | png, jpeg, webp | File format of the returned images. |
output_qualityOpcional | integer | — | de 0 a 100 | Compression quality for JPEG and WebP output, from 0 to 100. |
Exemplo de requisição
Esta requisição roda do jeito que está; os campos que você omitir usam o valor padrão. Antes, coloque sua chave em POPNOW_API_KEY.
O exemplo usa arquivos de amostra da PopNow em image_urls. Troque pelos seus próprios links HTTPS públicos, uploads ou assets salvos.
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"
}
}'A resposta já traz um taskId. Busque o resultado com GET /api/v1/jobs/recordInfo ou inclua callBackUrl para ser avisado.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
