Gommo public API
Dùng các URL này khi tích hợp trực tiếp Gommo (theo contract Gommo public API). Auth: Authorization: Bearer <access_token> qua HTTPS. Body form có domain (domain app, vd. <registration-domain>).
Host
| Host | Dùng cho |
|---|---|
https://v2.api.gommo.net | Models, create/poll job, upload ảnh/video, album library |
https://api.gommo.net | Login, /vi/ai/me, info job, library list, chat, audio platform |
Tab Endpoints trên playground hiển thị URL đầy đủ theo từng operation (v2 vs auth).
Media & jobs (v2)
| Thao tác | Method | URL |
|---|---|---|
| List models | GET hoặc POST | https://v2.api.gommo.net/ai/models?type={type} |
| Create job | POST | https://v2.api.gommo.net/ai/jobs/{type}/{model_id} |
| Poll job | POST | https://v2.api.gommo.net/ai/jobs/{id_base}?media=image|video|music |
| Upload ảnh | POST | https://v2.api.gommo.net/ai/upload/image |
| Upload video | POST | https://v2.api.gommo.net/ai/upload/video |
Create/poll dùng application/x-www-form-urlencoded (không phải JSON gateway). Luôn gọi models trước — không đoán ratio, mode, resolution, duration.
Poll: 3.5s, tối đa 80 lần (~5 phút). Không webhook.
Library & album
| Thao tác | Host | Path |
|---|---|---|
| Album ảnh | v2 | POST /ai/library/album-images |
| Album video | v2 | POST /ai/library/album-videos |
| Thư viện nhạc | v2 | POST /ai/library/musics |
| Thư viện audio | v2 | POST /ai/library/audios |
Body album (thường): domain, project_id, limit, order_by, sort_by (+ access_token trong form hoặc Bearer).
Explore cộng đồng (platform app trên auth host)
Feed công khai trên site dealer (tab Explore). application/x-www-form-urlencoded. Bearer tùy chọn khi chỉ xem; user đăng nhập nhận thêm liked, permissions, …
| Thao tác | URL |
|---|---|
| Video cộng đồng | POST https://api.gommo.net/api/apps/go-mmo/ai/public-videos |
| Ảnh cộng đồng | POST https://api.gommo.net/api/apps/go-mmo/ai/images |
Video (thường): domain, type=public_home, public_prompt=true|false, tùy chọn language, model, access_token.
Ảnh (thường): domain, project_id=default, feed_type=suggested, tùy chọn search, category, after_id (cursor), language, model, type (thường rỗng), access_token.
Item response có URL media (download_url, thumbnail_url, resolutions[]), author, like/comment. Envelope thường { "data": [ … ] } — pass-through JSON.
Bảng tin home (newfeeds)
Timeline hỗn hợp trên trang chủ dealer. POST https://api.gommo.net/ai/newfeeds — form, cần đăng nhập.
| Preset | Form thường |
|---|---|
| Bảng tin (công khai) | privacy=PUBLIC, limit=30, project_id=default, tùy chọn after_video_id, language |
| Của tôi | privacy= (rỗng), after_video_id + after_image_id (rỗng lần đầu) |
Response { "data": [ … ] } — pass-through.
→ Cookbook: Home feed
Projects & thông báo (auth)
Shell app home (form trên api.gommo.net, cần đăng nhập):
| Thao tác | URL |
|---|---|
| Danh sách AI projects (legacy) | POST https://api.gommo.net/ai/projects |
| AI projects V2 (CRUD) | POST https://api.gommo.net/api/v2/ai-projects |
| Hộp thông báo | POST https://api.gommo.net/ai/notifications |
| Tin tức & cập nhật | POST https://api.gommo.net/api/apps/go-mmo/news/getAll |
| Changelogs (recent updates) | POST https://api.gommo.net/api/apps/go-mmo/app/changelogs |
| Thiết bị (devices) | POST https://api.gommo.net/api/v2/devices |
| Ticket hỗ trợ | POST https://api.gommo.net/api/apps/go-mmo/support/myTickets (+ create, detail, reply) |
Projects (legacy): domain, access_token — { "data": [ … ] } pass-through.
AI projects V2: form action=list, create, get, update, delete, set_password (id_base, password; rỗng = xóa), get + password khi protected, member_list, member_kick, invite, invite_revoke, set_budget, stats, activity_list; invite cần identifier, role, access, scopes; invite_revoke cần invite_id; member_kick cần user_id; set_budget cần budget; stats cần id_base, period; activity_list cần id_base, limit, offset (tab Lịch sử hoạt động). Credit pools (tab Ngân sách): POST …/api/v2/credit-pools — list, ledger, create, deposit (pool_id, amount), delete, set_share_credit; deposit: ví giữ tối thiểu 100k; delete: ok: true không cam kết hoàn ví.
Media (tab modal): files-manager action=list (project, media_type); /ai/audio action_type=get.list + project_id; ai_musics/getAll + project_id.
Notifications: domain, access_token, tùy chọn limit, page — envelope pass-through (có thể có mảng data).
Devices: domain, access_token, tùy chọn action, device_id / device_name / device_info — pass-through (gọi lúc khởi động app home). Nhiều feed chấp nhận cùng các field device trên mỗi request.
Support: domain, access_token — list POST …/support/myTickets; create …/support/create (subject, issue_type, description); detail/reply dùng ticket_id_base (SUP-…, trùng ticket_id_hash khi create). Tùy chọn language, device_*.
Partner program: domain, access_token, action_type status | apply — POST …/users/partner_program. Apply cần field payout + accept_rules=1. Ưu tiên application?.status khi chờ duyệt.
Creator Rewards: domain, access_token, action_type status | pool | apply — POST …/users/creator_rewards. Apply dùng payout_pref (credit | cash) + accept_rules=1. Ưu tiên program.application?.status.
Changelogs: modal Recent updates — POST …/app/changelogs (format, app, limit, language, site_domain). Khác news/getAll. → Changelogs
Chỉ dealer (không thuộc home Tier A)
community-chat, get_rooms, mini-apps, site-config, domain-config-get xuất hiện trên web dealer nhưng không bắt buộc cho app home bên thứ ba. news/getAll và app/changelogs là tùy chọn. Xem Cookbook home feed.
Job status (auth)
| Thao tác | URL |
|---|---|
| Info ảnh | POST https://api.gommo.net/ai/info/image/{id_base} |
| Info video | POST https://api.gommo.net/ai/info/video/{id} |
| Info nhạc | POST https://api.gommo.net/ai/info/music/{id_base} |
Auth & profile (auth)
| Thao tác | URL |
|---|---|
| Login | POST https://api.gommo.net/api/apps/go-mmo/auth/login |
| Đăng ký (merchant, server) | POST https://api.gommo.net/api/apps/go-mmo/auth/register |
| Đổi mật khẩu | POST https://api.gommo.net/api/apps/go-mmo/auth/change-password |
| Chuyển credit | POST https://api.gommo.net/api/apps/go-mmo/users/sendBalances |
| Lịch sử giao dịch | POST https://api.gommo.net/api/apps/go-mmo/users/paymentsHistory |
| Me / credits | POST https://api.gommo.net/ai/me |
→ Đăng ký · Đổi mật khẩu · Chuyển credit · Lịch sử giao dịch · Thiết bị đăng nhập · Ticket hỗ trợ · Chương trình đối tác · Creator Rewards
Chat & audio (auth)
| Thao tác | URL |
|---|---|
| Chat / stream / models | POST https://api.gommo.net/api/v2/chat |
| Chat sessions (sync) | POST https://api.gommo.net/api/v2/ai-chat-sessions |
→ Chat reference | Voices / TTS | POST https://api.gommo.net/ai/audio |
Gommo Developer (dev tùy chọn)
Self-host (chỉ operator)
Repo có thể expose REST/proxy tùy chọn khi deploy — xem Deploy → Self-host nâng cao. Không phải đường tích hợp mặc định.
OpenAPI
Path public trong openapi.yaml, tag Gommo V2 và Gommo Platform. Path self-host (billing, /gateway/*, admin) tách tag riêng — xem Deploy → Self-host nâng cao.
