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.
Coming to Gommo platform
This feature is not on Gommo public API yet. Docs and portal on this site are a preview via dev proxy. When Gommo ships officially, endpoints and SDK will live on Gommo — not on self-hosted repo dependency.
Beta
Observability is not production-complete. Use it for dev, staging, or self-hosted gateways where you accept the limits below. Behavior may change without a major version bump.
The Observability app page (/app/observability/) is a hub for:
| Area | Status | Notes |
|---|---|---|
| Gommo usage stats & logs | Stable | Same data as Profile → Usage / Logs via /gateway/usage/* |
| Local session mirror | Beta | Browser localStorage only (Playground / Chat) |
| Outbound webhooks | Beta | Gateway → your HTTPS URL on selected job events |
| Langfuse, OTEL, Datadog, Sentry | Not built | Shown as “Coming soon” in the UI |
Gommo upstream still does not push job completion. Gateway webhooks are an optional add-on on top of gateway REST — they do not replace wait: true or client polling for async media jobs.
Aggregated stats and per-job rows from Gommo usage-history, wrapped at:
GET / POST /gateway/usage/statsGET / POST /gateway/usage/logsSee Usage history.
When enabled on the Observability page, Playground and Chat append lightweight job rows to this browser’s localStorage. Nothing is sent to your webhook endpoints or a server-side log store.
Register up to 5 HTTPS endpoints per account (default). The gateway POSTs JSON when:
| Trigger | Event | When |
|---|---|---|
POST /gateway/jobs/{type} with wait: true | job.completed or job.failed | After gateway poll finishes (~3.5s × up to 80 attempts) |
POST /gateway/jobs/{type} with wait: false | job.completed or job.failed | Immediate when create response includes a result URL; background poll (~3.5s × up to 80) when async and the account has job webhooks (background: true in payload) |
POST /gateway/observability/webhooks/{id}/test | webhook.test | Manual test from UI or API |
Supported {type} values match Media & jobs (image, video, tts, music, avatar-lipsync, tool types, etc.).
Not covered (no webhook today):
wait: false async jobs when the account has no job webhooks registered (no background poll)/gateway/chat/*, BYOK chat)/v2 or /ai proxy trafficDelivery semantics:
OBSERVABILITY_DELIVERY_RETRY_COUNT=2 retries after the first try, linear backoff via OBSERVABILITY_DELIVERY_RETRY_DELAY_MS)OBSERVABILITY_DELIVERY_TIMEOUT_MS)data/observability-webhooks.json) — not replicated across multiple gateway instances unless you share that filewait=false async jobs persisted at data/observability-background-polls.json (encrypted user token at rest — same key material as BYOK); resumed on gateway restarthttp:// allowed only for localhost / 127.0.0.1 (dev)All routes require Authorization: Bearer (same user token as /gateway/*).
| Method | Path | Body |
|---|---|---|
| GET | /gateway/observability/webhooks | — |
| POST | /gateway/observability/webhooks | { "url", "label?", "secret?" } |
| PATCH | /gateway/observability/webhooks/{id} | { "enabled?", "label?" } |
| DELETE | /gateway/observability/webhooks/{id} | — |
| POST | /gateway/observability/webhooks/{id}/test | — |
curl.exe -X POST "http://localhost:3001/gateway/observability/webhooks" ^
-H "Authorization: Bearer USER_TOKEN" ^
-H "Content-Type: application/json" ^
-d "{\"url\":\"https://example.com/hooks/gateway\",\"label\":\"staging\",\"secret\":\"whsec_...\"}"Secrets are encrypted at rest on the gateway (same crypto as BYOK). The API never returns the raw secret — only a hint such as whsec_…ab12.
POST to your URL with JSON body:
{
"type": "job.completed",
"timestamp": "2026-09-12T02:00:00.000Z",
"data": {
"jobType": "image",
"modelSlug": "flux-schnell",
"jobId": "abc123",
"resultUrl": "https://…",
"coverUrl": "https://…",
"status": "success",
"background": false
}
}job.failed includes status: "failed" and optional error. Background deliveries for async wait: false jobs set background: true.
Headers:
| Header | Value |
|---|---|
Content-Type | application/json |
User-Agent | ai-gateway-observability/1.0 |
X-Gateway-Event | Event type (job.completed, job.failed, webhook.test) |
X-Gateway-Timestamp | Same ISO timestamp as body |
X-Gateway-Signature | HMAC-SHA256 hex of {timestamp}.{rawBody} when a signing secret is set |
Verify on your receiver:
expected = HMAC_SHA256(secret, timestamp + "." + rawRequestBody)Compare to X-Gateway-Signature with a constant-time compare.
| Variable | Default |
|---|---|
OBSERVABILITY_STORE_FILE | data/observability-webhooks.json |
OBSERVABILITY_MAX_WEBHOOKS | 5 |
OBSERVABILITY_DELIVERY_TIMEOUT_MS | 10000 |
OBSERVABILITY_BACKGROUND_POLL | true — server poll for wait: false async jobs when owner has webhooks |
For reliable job notifications in production today:
wait: true on POST /gateway/jobs/{type} and handle the HTTP response, orwait: false when webhooks are configured.Background delivery retries webhook POSTs (configurable) and persists async poll jobs to disk (single-instance file store). Prefer wait: true or client poll for production-critical flows.
Manage webhooks at Observability (sidebar Developer → Observability, badge beta). The on-page callout lists the same limits in plain language.
Requires a running gateway, user Bearer token, and credits for one small image job:
# .env: OBSERVABILITY_VERIFY_TOKEN=<access_token from /ai/login>
# (or GATEWAY_VERIFY_TOKEN / BILLING_VERIFY_TOKEN)
npm run observability:verify-backgroundThe script:
127.0.0.1POST /gateway/jobs/image with wait: falsejob.completed or job.failed with data.background: trueExits SKIP if the model returns a result immediately (sync path). Picks ratio / resolution / mode from the catalog (never guessed). Optional env: OBSERVABILITY_VERIFY_GATEWAY_URL, OBSERVABILITY_VERIFY_MODEL_SLUG, OBSERVABILITY_VERIFY_TIMEOUT_MS (default 6 min).
Manual (logged in, npm run docs:stack):
n/5npm run observability:verify-background (see above)See also Usage history and Media & jobs.