Upscaler
Melhorador de Imagem
Amplia uma imagem para 1K, 2K ou 4K, mantendo a composição, as cores e a proporção originais
- Endpoint
- POST /api/v1/images/generate
- model
- upscaler
- Output
- Image
- Credits
- from 3
1
Enviar uma tarefa
POST
/api/v1/images/generateParâmetros
modelstringObrigatórioMust be "upscaler"
typestringOpcional"upscale"
image_urlsstring[]ObrigatórioPublic URL of the image to upscale (first item is used)
resolutionstringOpcionalPadrão2k"1k", "2k" (default) or "4k" output
1k2k4kscalenumberOpcionalDeprecated. Used only when resolution is omitted: 3 or 4 means "4k", otherwise "2k"
Requisição
curl -X POST https://www.bananapro.site/api/v1/images/generate \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "upscaler",
"type": "upscale",
"image_urls": ["https://cdn.gempix2.site/gempix2/img/tasks/gptimage25-g25-89eb5727b74db3d74b84ab07045757123470ab2b6bc0ae72-0.webp"],
"resolution": "2k"
}'Resposta200
{
"success": true,
"data": {
"task_id": "task_up123",
"credits_used": 4,
"remaining_credits": 496
}
}Os valores de credits_used nestes exemplos são ilustrativos. O consumo real é calculado no envio e retornado pela API.
2
Consultar a tarefa
GET
/api/v1/images/{task_id}status
pending- Accepted and waiting to start. Keep polling.
processing- Running. Keep polling.
completed- Finished. Read image_url; output holds the full result.
failed- Ended without a result. error_message says why and credits_refunded shows what was returned.
Poll every 5 to 10 seconds and stop at completed or failed, or register a webhook to be notified instead. Failed tasks are refunded automatically.
Requisição
curl https://www.bananapro.site/api/v1/images/task_abc123 \
-H "Authorization: Bearer sk-your-api-key"Resposta200
{
"success": true,
"data": {
"task_id": "task_abc123",
"model": "upscaler",
"status": "completed",
"output": { "images": [{ "url": "https://..." }] },
"primary_url": "https://...",
"image_url": "https://...",
"error_message": null,
"credits_used": 4,
"credits_refunded": 0,
"created_at": "2026-10-04T10:00:00.000Z",
"updated_at": "2026-10-04T10:01:12.000Z",
"completed_at": "2026-10-04T10:01:12.000Z"
},
"request_id": "req_abc123"
}Aguardar o resultado
TASK_ID=task_abc123
while true; do
TASK=$(curl -s https://www.bananapro.site/api/v1/images/$TASK_ID \
-H "Authorization: Bearer sk-your-api-key")
STATUS=$(echo "$TASK" | jq -r '.data.status')
if [ "$STATUS" = "completed" ] || [ "$STATUS" = "failed" ]; then
echo "$TASK" | jq
break
fi
sleep 10
donePreços
| Resolution | Credits |
|---|---|
| 1k | 3 |
| 2k | 4 |
| 4k | 6 |
Funcionalidades
- Saída em 1K, 2K e 4K
- Mantém a composição, as cores e a proporção originais
- Mesmo mecanismo e mesmos preços do ampliador do site
- Tarefas com falha são reembolsadas automaticamente