{"_id":"@ai-gateway/client","_rev":"2-65be96e8b12ef8810a987f77129d30c1","name":"@ai-gateway/client","dist-tags":{"latest":"1.0.0"},"versions":{"0.1.0":{"name":"@ai-gateway/client","version":"0.1.0","keywords":["ai-gateway","gommo","api-client"],"license":"MIT","_id":"@ai-gateway/client@0.1.0","maintainers":[{"name":"brunohao","email":"nhathao97vn@gmail.com"}],"homepage":"https://github.com/bruno-hao97/ai-gateway#readme","bugs":{"url":"https://github.com/bruno-hao97/ai-gateway/issues"},"dist":{"shasum":"5e7fa58cb973e1a182670091a824fe67cc46d908","tarball":"https://registry.npmjs.org/@ai-gateway/client/-/client-0.1.0.tgz","fileCount":8,"integrity":"sha512-g1/CyUNzk+QgD5NsQp9O3xBTO7pqLQf9d7u8QmejiNRG84bAD8JgTacjDY9bskkD0ThhzEfBq9D4XEHDtccBKg==","signatures":[{"sig":"MEUCIQC3SLLL9Gz79ttK5fqy403mgKIUsLXD7Hcbh7QUGTBf+QIgXq4xStkdaGqiRtIjQHkDnB1uVZWXOs7wYDQfCHGL5Ow=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":140533},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"21286272f9680acbd2c09036ab042676c92a3a46","scripts":{"dev":"tsup --watch","test":"node --import tsx --test test/poll.test.ts","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"brunohao","email":"nhathao97vn@gmail.com"},"repository":{"url":"git+https://github.com/bruno-hao97/ai-gateway.git","type":"git","directory":"packages/gateway-client"},"_npmVersion":"10.8.2","description":"TypeScript client for AI Gateway REST API (/gateway, /billing)","directories":{},"_nodeVersion":"20.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.4","tsup":"^8.5.0","typescript":"^5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/client_0.1.0_1787631538087_0.46776196580355744","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"_id":"@ai-gateway/client@1.0.0","bugs":{"url":"https://github.com/bruno-hao97/ai-gateway/issues"},"dist":{"shasum":"ed3213e5112277a8c1d0da6217ed3999370a3f64","tarball":"https://registry.npmjs.org/@ai-gateway/client/-/client-1.0.0.tgz","fileCount":8,"integrity":"sha512-Wkoo6q18WQjQ4ZdIFuR0756CYJ4ydygEs/V+LUSAdbC8gwr6JHBcfWtrCI3d+lFfZ0PM0DcXwjw1JnnKSnT8YA==","signatures":[{"sig":"MEQCIE01hejG5U0h02Wx6S7/MCuRPBacnyMr8+3Y9bkFvwM9AiB9gup2r5UQ2rTUcKlNQwVjyGheAb0SnZfkA7y8RwWB1w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCXlr8kPj08FNvsEkgGKkymL5VBsHtRr4JL5i8ZTU+JCgIhANtqR7FS05IsTXA60yL0e4JD5M63v2fQgsFSzNYuxCae"}],"unpackedSize":256315},"main":"./dist/index.cjs","name":"@ai-gateway/client","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"c60ef56e3d73ba02d5646d6a4d41a9425396ebb6","license":"MIT","scripts":{"dev":"tsup --watch","test":"node --import tsx --test test/poll.test.ts","build":"tsup","prepublishOnly":"npm run build"},"version":"1.0.0","_npmUser":{"name":"brunohao","email":"nhathao97vn@gmail.com"},"homepage":"https://github.com/bruno-hao97/ai-gateway#readme","keywords":["gommo","79ai","api-client","ai-gateway"],"repository":{"url":"git+https://github.com/bruno-hao97/ai-gateway.git","type":"git","directory":"packages/gateway-client"},"_npmVersion":"11.12.1","description":"Gommo TypeScript client — public API (v2.api.gommo.net + api.gommo.net); optional self-hosted gateway mode","directories":{},"maintainers":[{"name":"brunohao","email":"nhathao97vn@gmail.com"}],"_nodeVersion":"24.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.4","tsup":"^8.5.0","typescript":"^5.8.3"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/client_1.0.0_1789548830984_0.7342327916461617"}}},"time":{"created":"2026-08-25T04:18:57.935Z","modified":"2026-09-16T08:53:51.335Z","0.1.0":"2026-08-25T04:18:58.225Z","1.0.0":"2026-09-16T08:53:51.081Z"},"bugs":{"url":"https://github.com/bruno-hao97/ai-gateway/issues"},"license":"MIT","homepage":"https://github.com/bruno-hao97/ai-gateway#readme","keywords":["gommo","79ai","api-client","ai-gateway"],"repository":{"url":"git+https://github.com/bruno-hao97/ai-gateway.git","type":"git","directory":"packages/gateway-client"},"description":"Gommo TypeScript client — public API (v2.api.gommo.net + api.gommo.net); optional self-hosted gateway mode","maintainers":[{"name":"brunohao","email":"nhathao97vn@gmail.com"}],"readme":"# @ai-gateway/client\r\n\r\n**Gommo TypeScript client** on npm — default transport calls Gommo public API (`v2.api.gommo.net` + `api.gommo.net`).\r\n\r\n**npm:** [@ai-gateway/client](https://www.npmjs.com/package/@ai-gateway/client) · current version **1.0.0**\r\n\r\n> **Product name:** Gommo client (`GommoClient`). npm may rename to `@ai-gateway/client` when the `@gommo` org exists on npm.\r\n\r\n## Install\r\n\r\n```bash\r\nnpm install @ai-gateway/client\r\n```\r\n\r\nRequires **Node 18+** (native `fetch`) or any runtime with `fetch`.\r\n\r\n### Contributors (monorepo)\r\n\r\n```bash\r\nnpm run client:build\r\nnpm install ./packages/gateway-client\r\n```\r\n\r\n## Quick start (Gommo public API)\r\n\r\n```typescript\r\nimport { GommoClient, modelSlug, parseModelsList, pickFirstRatio } from '@ai-gateway/client';\r\n\r\nconst client = new GommoClient({\r\n  accessToken: process.env.GOMMO_ACCESS_TOKEN,\r\n  domain: '79ai.net',\r\n});\r\n\r\nawait client.auth.login({\r\n  email: 'you@example.com',\r\n  password: 'secret',\r\n});\r\n\r\nconst catalog = await client.models.list({ type: 'image' });\r\nconst models = parseModelsList(catalog);\r\nconst m = models[0];\r\n\r\nconst job = await client.jobs.createAndWait({\r\n  type: 'image',\r\n  modelSlug: modelSlug(m),\r\n  fields: { prompt: 'A red apple', ratio: pickFirstRatio(m) },\r\n});\r\n\r\nconsole.log(job.data?.resultUrl);\r\n```\r\n\r\n## Self-hosted gateway (optional)\r\n\r\n```typescript\r\nconst devClient = new GommoClient({\r\n  transport: 'gateway',\r\n  baseUrl: 'http://localhost:3001',\r\n  accessToken: process.env.GATEWAY_TOKEN,\r\n});\r\n```\r\n\r\n## Exports\r\n\r\n- **`GommoClient`** — primary client class\r\n- **`GatewayClient`** — deprecated alias\r\n- **`GommoClientOptions`** / `GatewayClientOptions`\r\n\r\nDocs: [Client SDKs](https://github.com/bruno-hao97/ai-gateway/blob/main/docs/sdk/index.md)\r\n\r\n## License\r\n\r\nMIT\r\n","readmeFilename":"README.md"}