Skip to content

Gommo client SDKs ​

Gommo Developer client

Official Gommo Developer TypeScript client — npm alias @ai-gateway/client. Integrate against Gommo public API (api.gommo.net, v2.api.gommo.net).

→ Gommo public API · Roadmap

The Gommo Developer client gives typed helpers and built-in job polling on Gommo public hosts.

npm alias

Published on npm as @ai-gateway/client. API class: GommoClient. Future rename to @gommo/client when the @gommo org exists on npm.

HostUse for
https://v2.api.gommo.netModels, media jobs, upload
https://api.gommo.netLogin, profile, chat, audio

→ Quickstart · Request lifecycle · Authentication

Five-minute path (TypeScript) ​

Same golden path as the REST Quickstart: login (or env token) → list models → one image job → result URL. The client runs the poll loop for you on v2.api.gommo.net (3.5s, max 80) — there is no job-completion webhook on Tier A (Webhooks).

StepWhat to do
1npm install @ai-gateway/client (below)
2Server env: GOMMO_ACCESS_TOKEN + registration domain — API credentials
3client.models.list({ type: 'image' }) — use catalog ratio / mode only
4client.jobs.createAndWait({ ... }) — create + client poll until resultUrl
5Troubleshoot: Common errors · manual poll: Jobs (pollUntilDone, createAndPoll)

REST equivalent (curl/PowerShell): Quickstart step 4 · Cookbook: async job + poll.

Installation ​

LanguagePackageStatus
TypeScript / JavaScript@ai-gateway/clientv1.0.0 on npm
Python—Use OpenAPI generate
Go—Planned
bash
npm install @ai-gateway/client

Requires Node 18+ (native fetch) or pass custom fetch in options.

Contributors (this repo)

Source: packages/gateway-client. Local dev: npm run client:build then npm install ./packages/gateway-client in your app.

When to use the client ​

Agent SDK

Multi-turn agents: use client.chat + your orchestration, or MCP & agents for Cursor IDE tools.

Quick example (step 4) ​

typescript
import {
  GommoClient,
  modelSlug,
  parseModelsList,
  pickFirstRatio,
} from '@ai-gateway/client';

const client = new GommoClient({
  accessToken: process.env.GOMMO_ACCESS_TOKEN,
  domain: process.env.GOMMO_DOMAIN ?? 'YOUR_REGISTRATION_DOMAIN',
});

const catalog = await client.models.list({ type: 'image' });
const models = parseModelsList(catalog);
const m = models[0];
const slug = modelSlug(m);
const ratio = pickFirstRatio(m);

const job = await client.jobs.createAndWait({
  type: 'image',
  modelSlug: slug,
  fields: { prompt: 'A red apple', ratio },
});

console.log(job.data?.resultUrl);

createAndWait is create({ wait: true }): async create on Gommo, then SDK pollUntilDone with default 3500ms / 80 attempts.

Auth and chat use api.gommo.net — see Authentication.

TypeScript SDK ​

GuideTopics
OverviewResources map
Installationnpm, env, hosts
Authenticationlogin, register (gateway), change password, Bearer, me
Modelslist, catalog helpers
Jobscreate, wait, poll
Chatsend, stream SSE
Uploadimage, video multipart
Audiovoices, TTS, lists
BillingSelf-host /billing/* only — Coming to Gommo platform
ErrorsGatewayError, codes

Client SDKs vs Cookbook ​

Client SDKCookbook
FocusTyped Gommo API surfaceEnd-to-end tasks
Use whenBuilding an appLearning / one-off scripts
LanguagesTypeScript (npm)curl + PowerShell
Poll helpersBuilt-inManual loops

Next steps ​