1 USD ≈ 27,000 credits · display only
Reference rate may change over time.
1 USD ≈ 27,000 credits · display only
Reference rate may change over time.
Use when you want the job id immediately and poll from your app (or Playground poll loop).
Gommo poll interval: 3500ms, max 80 attempts (~5 min). Each poll is one POST to /ai/jobs/{id_base}?media=….
Public API
Create: POST https://v2.api.gommo.net/ai/jobs/image/{model_id} (form body). Poll: POST https://v2.api.gommo.net/ai/jobs/{id_base}?media=image. See Gommo public API.
Assume $env:TOKEN, $slug, $ratio from First image job.
$domain = $env:GOMMO_API_DOMAIN; if (-not $domain) { throw 'Set GOMMO_API_DOMAIN to the user registration domain (dealer)' }
$h = @{ Authorization = "Bearer $env:TOKEN"; 'Content-Type' = 'application/x-www-form-urlencoded' }
$body = "domain=$domain&project_id=default&prompt=A cute cat&ratio=$ratio"
$created = Invoke-RestMethod -Method POST `
-Uri "https://v2.api.gommo.net/ai/jobs/image/$slug" `
-Headers $h -Body $body
$jobId = $created.imageInfo.id_base ?? $created.data.id_base ?? $created.id_base
Write-Host "jobId=$jobId"$pollBody = "access_token=$env:TOKEN&domain=$domain"
$poll = Invoke-RestMethod -Method POST `
-Uri "https://v2.api.gommo.net/ai/jobs/$jobId?media=image" `
-Headers $h -Body $pollBody
$poll$max = 80
$intervalSec = 3.5
for ($i = 1; $i -le $max; $i++) {
$poll = Invoke-RestMethod -Method POST `
-Uri "https://v2.api.gommo.net/ai/jobs/$jobId?media=image" `
-Headers $h -Body $pollBody
$url = $poll.imageInfo.result_url ?? $poll.data?.resultUrl
if ($url) { Write-Host "Done: $url"; break }
Write-Host "Attempt $i — waiting..."
Start-Sleep -Seconds $intervalSec
}Poll media: image | video | music — must match job type.
Media job → uncheck wait → Poll job → Auto poll (3.5s).