1 USD ≈ 27,000 credits · display only
Reference rate may change over time.
1 USD ≈ 27,000 credits · display only
Reference rate may change over time.
Gommo Developer client
Official Gommo Developer TypeScript client — npm alias @ai-gateway/client. Calls Gommo public API (api.gommo.net, v2.api.gommo.net).
Failed requests throw GatewayError:
import { GommoClient, GatewayError } from '@ai-gateway/client';
try {
await client.jobs.create({ type: 'image', modelSlug: '', fields: {} });
} catch (err) {
if (err instanceof GatewayError) {
console.log(err.status); // 400
console.log(err.code); // VALIDATION_ERROR
console.log(err.message);
}
}| Code | Typical cause |
|---|---|
UNAUTHORIZED | Missing or invalid Bearer token |
VALIDATION_ERROR | Bad body / query |
NOT_CONFIGURED | Server env missing (admin/merchant; PayOS only for legacy topup) |
UPSTREAM_ERROR | Gommo upstream failure |
INSUFFICIENT_CREDITS | Merchant balance / topup reserve |
INTERNAL_ERROR | Server error |
Gateway JSON shape: { success: false, message, code }.