Skip to content

Media & jobs ​

Recommended: Gommo public API — https://v2.api.gommo.net for models, jobs, upload.

Every media job is async: create → poll → done (or failure / timeout). Full narrative: Request lifecycle. Errors: Common errors (integrators). No job webhook on Tier A — Webhooks.

mermaid
flowchart LR
  A[POST /ai/models] --> B[POST /ai/jobs/...]
  B --> C{Poll POST /ai/jobs/id?media=...}
  C -->|result_url| D[Done]
  C -->|pending| C
  C -->|fail or 80 tries| E[Terminal]

Poll interval: 3500 ms, max 80 attempts. Send domain in every form body (dealer-specific — do not copy from docs). Auth: Authorization: Bearer <access_token>.

Endpoint map ​

OperationURL
List modelsPOST https://v2.api.gommo.net/ai/models?type={type}
Create jobPOST https://v2.api.gommo.net/ai/jobs/{type}/{model_id}
Poll jobPOST https://v2.api.gommo.net/ai/jobs/{id}?media={media}

Job types: image, video, tts, music, avatar-lipsync, image-upscale, remove-bg, video-upscale, video-vfx, video-subtitle, video-cut

Poll media: image | video | music


List models ​

bash
curl.exe -X POST "https://v2.api.gommo.net/ai/models?type=image" ^
  -H "Authorization: Bearer %TOKEN%" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "type=image&domain=%REGISTRATION_DOMAIN%"
powershell
$d = $env:GOMMO_API_DOMAIN; if (-not $d) { throw 'Set GOMMO_API_DOMAIN to the user registration domain (dealer)' }
$h = @{ Authorization = "Bearer $env:TOKEN" }
Invoke-RestMethod -Method POST `
  -Uri "https://v2.api.gommo.net/ai/models?type=image" `
  -Headers $h `
  -ContentType "application/x-www-form-urlencoded" `
  -Body "type=image&domain=$d"

Pick model / slug and allowed ratio, mode, resolution from the response — never guess.


Create job ​

ratio, mode, resolution, and duration must match the model catalog.

bash
curl.exe -X POST "https://v2.api.gommo.net/ai/jobs/image/MODEL_ID" ^
  -H "Authorization: Bearer %TOKEN%" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "domain=%REGISTRATION_DOMAIN%&project_id=default&prompt=Hello&ratio=RATIO_FROM_CATALOG"
powershell
$d = $env:GOMMO_API_DOMAIN; if (-not $d) { throw 'Set GOMMO_API_DOMAIN to the user registration domain (dealer)' }
$form = "domain=$d&project_id=default&prompt=Hello&ratio=$ratio"
Invoke-RestMethod -Method POST `
  -Uri "https://v2.api.gommo.net/ai/jobs/image/$slug" `
  -Headers @{ Authorization = "Bearer $env:TOKEN" } `
  -ContentType "application/x-www-form-urlencoded" -Body $form

Poll job ​

Repeat every 3500 ms, max 80 times:

bash
curl.exe -X POST "https://v2.api.gommo.net/ai/jobs/JOB_ID?media=image" ^
  -H "Authorization: Bearer %TOKEN%" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "domain=%REGISTRATION_DOMAIN%&project_id=default"
powershell
$d = $env:GOMMO_API_DOMAIN; if (-not $d) { throw 'Set GOMMO_API_DOMAIN to the user registration domain (dealer)' }
Invoke-RestMethod -Method POST `
  -Uri "https://v2.api.gommo.net/ai/jobs/$jobId?media=image" `
  -Headers @{ Authorization = "Bearer $env:TOKEN" } `
  -ContentType "application/x-www-form-urlencoded" `
  -Body "domain=$d&project_id=default"

On success: look for result_url / file_url in imageInfo, videoInfo, or equivalent in the response.


Self-host (operators only) ​

Optional REST when you deploy this repo — Deploy → Self-host (advanced).

Response shape ​

Gommo returns native JSON (success, data, imageInfo / videoInfo, …).