Models
Gommo Developer client
Client Gommo Developer TypeScript — npm alias @ai-gateway/client เรียก Gommo public API (api.gommo.net, v2.api.gommo.net)
typescript
import { GommoClient, parseModelsList, modelSlug, pickFirstRatio } from '@ai-gateway/client';
const client = new GommoClient({ baseUrl, accessToken });
const envelope = await client.models.list({ type: 'image' });
const models = parseModelsList(envelope);
for (const m of models) {
console.log(modelSlug(m), m.name, m.ratios);
}
const first = models[0];
const slug = modelSlug(first);
const ratio = pickFirstRatio(first); // ห้าม hard-code ratioประเภท job
type ตรงกับประเภท job ของ Gommo: image, video, music, tts, image-upscale, remove-bg, video-upscale, …
WARNING
ratio, mode, resolution, duration ต้องมาจากรายการโมเดล นี้ — ดู Models guide
