Skip to content

Common errors (integrators) ​

Quick reference when integrating v2.api.gommo.net + api.gommo.net. Gommo often returns JSON with success, error, and message — sometimes with HTTP 200 and error: 1 in the body. Always parse the body, not only status codes.

Related: Request lifecycle · Authentication · Media & jobs

Symptom → cause → fix ​

What you seeLikely causeWhat to do
401 / “unauthorized” / invalid tokenMissing Bearer, expired access_token, token from wrong userRe-login POST …/auth/login; store token server-side
Login works but credits / ai/me wrongdomain ≠ user’s registration domainSet domain from signup flow — Registration domain
Create job rejected / validation messageGuessed ratio, mode, resolution, durationPOST /ai/models?type=… first; only use catalog values
Create OK, poll never shows result_urlNo poll loop, wrong media query (image vs video vs music), or job still runningImplement lifecycle — 3.5s, max 80; log full poll JSON once
Poll stops with failure text in JSONUpstream moderation, model error, cancelled jobRead message / status fields; do not retry same payload blindly
Timeout after 80 polls (~5 min)Slow video/heavy job or stuck upstreamSurface timeout to user; optional retry create; check Gommo usage-history if needed
402 / insufficient credits / balanceUser out of creditsPOST https://api.gommo.net/ai/me; user tops up on their dealer site (not your app’s Stripe unless you built that)
HTTP 200 + { "error": 1, "message": "…" }Common on platform routes (transfer, some account calls)Treat error !== 0 or success: false as failure — see Account — transfer credits
Works in Playground, fails in your appProxy vs public URL, missing domain on form, token in browser blockedTier A: call public hosts directly; match Playground public URL tab

Job polling is not an “error” ​

Stopping after 80 attempts without result_url is a client-side timeout. Gommo does not guarantee a webhook on the public integrator path — see Webhooks.

Self-host gateway only (Mode B/C) ​

If you call {gateway}/gateway/*, errors use a structured envelope (success: false, code, message). That is not the same shape as every raw Gommo upstream response.

ResourceUse when
Deploy → Gateway error responsesHTTP codes and UNAUTHORIZED, VALIDATION_ERROR, …
doc/GATEWAY-ERRORS.md (repo)Maintainer / smoke reference
SDK errorsTypeScript client on optional gateway transport

Tier A production apps should not depend on gateway error codes unless you explicitly self-host.

Next ​