Skip to content

Installation ​

Gommo Developer client

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

→ Gommo public API · Roadmap

bash
npm install @ai-gateway/client

Package: @ai-gateway/client on npm (current v1.0.0).

Pin a version in production:

bash
npm install @ai-gateway/[email protected]

Verify registry:

bash
npm view @ai-gateway/client version

From this monorepo (contributors) ​

When developing the gateway repo itself:

bash
npm run client:build
npm install ./packages/gateway-client

Environment ​

typescript
import { GommoClient } from '@ai-gateway/client';

const client = new GommoClient({
  accessToken: process.env.GOMMO_ACCESS_TOKEN,
  domain: process.env.GOMMO_DOMAIN ?? 'YOUR_REGISTRATION_DOMAIN',
  // optional overrides:
  // v2BaseUrl: process.env.GOMMO_V2_BASE_URL ?? 'https://v2.api.gommo.net',
  // authBaseUrl: process.env.GOMMO_AUTH_BASE_URL ?? 'https://api.gommo.net',
});
OptionDefaultDescription
v2BaseUrlhttps://v2.api.gommo.netModels, jobs, upload
authBaseUrlhttps://api.gommo.netLogin, me, chat, audio
domain<registration-domain>Gommo registration domain
projectIddefaultGommo project id
accessToken—Bearer token
fetchglobalThis.fetchCustom fetch (Node/Bun/Deno)

Self-host (operators) ​

Only when deploying this repo — see Deploy → Self-host (advanced). SDK transport: 'gateway' is for dev/portal, not the Gommo public contract.

Verify ​

typescript
// Recommended — proves token + registration domain:
const me = await client.auth.me();
console.log(me.balancesInfo?.credits_ai);

// Gommo mode only: synthetic ok (does not validate the token):
const health = await client.health();
console.log(health.data?.ok);