Đọc catalog
Mọi field job media (ratio, mode, resolution, duration, model id) phải lấy từ POST https://v2.api.gommo.net/ai/models?type=…. Trang này giải thích JSON trước create + poll.
| Bước | Doc |
|---|---|
| List + chọn field | Trang này |
| Tham số | Parameters |
| HTTP create/poll | Media & jobs · Hướng dẫn tích hợp |
| Xem live | Models catalog |
Không đoán enum
Copy từ docs, model khác, hoặc screenshot sẽ fail upstream. Luôn dùng response list của model đó.
Gọi catalog
POST https://v2.api.gommo.net/ai/models?type=image
Authorization: Bearer {access_token}
Content-Type: application/x-www-form-urlencoded
type=image&domain=%REGISTRATION_DOMAIN%type theo job types. domain đăng ký user — Authentication.
Shape response (điển hình)
{
"success": true,
"data": [
{
"model": "example_slug",
"name": "Tên hiển thị",
"ratios": [{ "value": "1:1", "label": "Square" }],
"modes": [{ "value": "low", "label": "Low" }],
"resolutions": [{ "value": "2k", "label": "2K" }]
}
]
}Không phải model nào cũng có mọi mảng — bỏ field không có trong row.
Chọn model id (URL create)
POST …/ai/jobs/{type}/{model_id} — JSON có thể là model, slug, model_id, id_base.
Đọc ratios, modes, resolutions, duration
| Catalog | Form job | Cách đọc |
|---|---|---|
ratios[] | ratio | Thường { value, label } — gửi value |
modes[] | mode | Giống ratios |
resolutions[] | resolution | Giống ratios |
durations | duration | Video/nhạc — chỉ giây trong list |
| — | prompt | App của bạn |
TypeScript: SDK lộ trình 5 phút.
Model tool / đặc biệt
Upscale, remove-bg… có thể dùng url, image thay prompt. Xem row model và Playground.
Mô tả tiếng Anh (?lang=en)
Cache mô tả EN không thay thế validation enum — ratio/mode vẫn từ POST /ai/models. Maintainer: doc/CATALOG-TEST.md.
Sau khi có slug + field
- Create — Media reference
- Poll — Vòng đời request
- Lỗi — Lỗi thường gặp
Tiếp theo
→ Parameters · Job types · Quickstart
