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.
The docs portal Activity hub (and Profile usage preview) reads Gommo POST /api/v2/usage-history via gateway wrappers. Same data as Gommo upstream usage history.
| Method | Path | Auth |
|---|---|---|
| POST | /gateway/usage/stats | Authorization: Bearer |
| GET | /gateway/usage/stats | Bearer (query params) |
| POST | /gateway/usage/logs | Bearer |
| GET | /gateway/usage/logs | Bearer (query params) |
| POST | /gateway/usage/aggregate | Bearer |
| GET | /gateway/usage/aggregate | Bearer (query params) |
Upstream: action=stats or action=logs on https://api.gommo.net/api/v2/usage-history.
Send device fields in the form body (browser apps). The docs site forwards device_id, device_name, device_info automatically.
curl.exe -X POST "http://localhost:3001/gateway/usage/stats" ^
-H "Authorization: Bearer USER_TOKEN" ^
-H "Content-Type: application/x-www-form-urlencoded" ^
-d "domain=%REGISTRATION_DOMAIN%&period=30d&type=all&language=vi&device_id=UUID&device_name=Chrome%%201&device_info={...}"| Field | Values |
|---|---|
period | 7d, 30d, 90d |
type | all, image, video, audio, music |
language | vi (stats) |
Response data.summary: total, success, error, credit, refund, credit_net, by_type.
curl.exe -X POST "http://localhost:3001/gateway/usage/logs" ^
-H "Authorization: Bearer USER_TOKEN" ^
-H "Content-Type: application/x-www-form-urlencoded" ^
-d "domain=%REGISTRATION_DOMAIN%&period=30d&type=all&language=VI&page=1&limit=30&device_id=..."| Field | Notes |
|---|---|
language | VI for logs (uppercase) |
page / limit | Pagination; has_more in response |
Server paginates action=logs and groups by model (up to 50 pages × 100 rows).
curl.exe -X POST "http://localhost:3001/gateway/usage/aggregate" ^
-H "Authorization: Bearer USER_TOKEN" ^
-H "Content-Type: application/x-www-form-urlencoded" ^
-d "domain=%REGISTRATION_DOMAIN%&period=30d&type=all&groupBy=model&top=5&device_id=..."| Field | Notes |
|---|---|
groupBy | model (required) |
top | 1–20, default 5 |
maxPages | 1–100, default 50 (scan cap) |
refresh | 1 / true — skip in-memory cache and rescan logs |
Response data: scanned_jobs, pages_scanned, truncated, items[] (model, count, credit, percent), optional from_cache when served from gateway memory cache (default TTL 10 minutes, USAGE_AGGREGATE_CACHE_TTL_MS).
| UI | Source |
|---|---|
| Activity Overview KPIs | action=stats → summary |
| Top models (Overview) | POST /gateway/usage/aggregate |
| Trends charts / daily table | action=stats → chart, table[] |
| Explore job list | action=logs items |
| Net credits | summary.credit_net |
| Available credits | POST /ai/me → balancesInfo.credits_ai |
See Activity hub, OpenAPI, and Authentication.