{"_id":"@aiendpoint/next","_rev":"3-5e873b8705929f4939ff0a79edd7d045","name":"@aiendpoint/next","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@aiendpoint/next","version":"0.1.0","keywords":["aiendpoint","nextjs","next","ai","api","middleware"],"license":"Apache-2.0","_id":"@aiendpoint/next@0.1.0","maintainers":[{"name":"bejoyfuuul","email":"bejoyfuuul@gmail.com"}],"homepage":"https://aiendpoint.dev","bugs":{"url":"https://github.com/aiendpoint/platform/issues"},"dist":{"shasum":"be35b797ea65870a97f1d7546cedc1b5b3121748","tarball":"https://registry.npmjs.org/@aiendpoint/next/-/next-0.1.0.tgz","fileCount":5,"integrity":"sha512-k5oL/3EkVpcNkUBlRpGojSmUSj7VDZw8jkoBaCGYTYUmNKmcSK6E5ua8DTqB0Mawfrx1WbIx2zeGJ87i4oKKag==","signatures":[{"sig":"MEYCIQCMdngSairCytksdrUtd7CkfwLvVu03cQl8xHkUpnNvVwIhANB8gZPo8YqgBKbVja/JBUdmsDGxXLk6qfCSrJOZq7di","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4269},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18"},"gitHead":"c717355969004870c4a85c1143fd244158b1c6ef","scripts":{"build":"tsc","clean":"rm -rf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"bejoyfuuul","email":"bejoyfuuul@gmail.com"},"deprecated":"Use @aiendpoint/serve/next instead","repository":{"url":"git+https://github.com/aiendpoint/platform.git","type":"git","directory":"packages/next"},"_npmVersion":"11.8.0","description":"Serve your /ai endpoint from Next.js App Router in one line","directories":{},"_nodeVersion":"24.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"next":"^16.0.0","typescript":"^5.7.2","@types/node":"^22.10.0"},"peerDependencies":{"next":">=14"},"_npmOperationalInternal":{"tmp":"tmp/next_0.1.0_1774712260482_0.8473378795989153","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"_id":"@aiendpoint/next@0.1.1","bugs":{"url":"https://github.com/aiendpoint/platform/issues"},"dist":{"shasum":"67801d6f55cd2cfad2448d1e12bc10c302515208","tarball":"https://registry.npmjs.org/@aiendpoint/next/-/next-0.1.1.tgz","fileCount":6,"integrity":"sha512-SFXs3ljJ0m9xb6TWHr83WTYD2LH6oYCbBCSpgVASN3gxxas6c1EFo/xM5jJEvbr99D5J9AzmDgJj2whvS5anjQ==","signatures":[{"sig":"MEQCIEMPMBTOnvOsW/MgvXG2iWc1o/qZdSq4KnZrArkbwcOiAiAOHD+GALO9the9SAEWTSnK4Z5STySb2xH1fMDwPKw+zw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGXHgwe40bj1JCf3svhtL7MyyI6uZCoypg9/hIWsLJ4zAiAaN0hZi+OuiP1kKxiRLIT9zoS1469JNjWvioUHFA/8MA=="}],"unpackedSize":15503},"main":"dist/index.js","name":"@aiendpoint/next","type":"module","_from":"file:/tmp/aiendpoint-release-m362HV/aiendpoint-next-0.1.1.tgz","types":"dist/index.d.ts","engines":{"node":">=18"},"license":"Apache-2.0","scripts":{"build":"tsc","clean":"rm -rf dist"},"version":"0.1.1","_npmUser":{"name":"bejoyfuuul","email":"bejoyfuuul@gmail.com"},"homepage":"https://aiendpoint.dev","keywords":["aiendpoint","nextjs","next","ai","api","middleware"],"_resolved":"/tmp/aiendpoint-release-m362HV/aiendpoint-next-0.1.1.tgz","_integrity":"sha512-SFXs3ljJ0m9xb6TWHr83WTYD2LH6oYCbBCSpgVASN3gxxas6c1EFo/xM5jJEvbr99D5J9AzmDgJj2whvS5anjQ==","repository":{"url":"git+https://github.com/aiendpoint/platform.git","type":"git","directory":"packages/next"},"_npmVersion":"11.16.0","description":"Serve your /ai endpoint from Next.js App Router in one line","directories":{},"maintainers":[{"name":"bejoyfuuul","email":"bejoyfuuul@gmail.com"}],"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"next":"16.3.3","typescript":"^5.7.2","@types/node":"^22.10.0"},"peerDependencies":{"next":">=14"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/next_0.1.1_1789447561716_0.865983015946953"}}},"time":{"created":"2026-03-28T15:37:40.404Z","modified":"2026-09-15T04:46:02.003Z","0.1.0":"2026-03-28T15:37:40.652Z","0.1.1":"2026-09-15T04:46:01.812Z"},"bugs":{"url":"https://github.com/aiendpoint/platform/issues"},"license":"Apache-2.0","homepage":"https://aiendpoint.dev","keywords":["aiendpoint","nextjs","next","ai","api","middleware"],"repository":{"url":"git+https://github.com/aiendpoint/platform.git","type":"git","directory":"packages/next"},"description":"Serve your /ai endpoint from Next.js App Router in one line","maintainers":[{"name":"bejoyfuuul","email":"bejoyfuuul@gmail.com"}],"readme":"# @aiendpoint/next\n\nServe your `/ai` endpoint from Next.js App Router in one line.\n\n## Install\n\n```bash\nnpm install @aiendpoint/next\n```\n\n## Usage\n\nCreate `app/ai/route.ts`:\n\n```ts\nimport { aiendpoint } from '@aiendpoint/next'\n\nexport const GET = aiendpoint({ spec: './ai.json' })\n```\n\nThat's it. Your service now has a `/ai` endpoint.\n\n## Options\n\n```ts\naiendpoint({\n  spec: './ai.json',  // path to spec file, or inline object\n  maxAge: 3600,       // Cache-Control max-age (default: 3600)\n})\n```\n\n## Generate ai.json\n\n```bash\nnpx @aiendpoint/cli init --openapi https://your-api.com/openapi.json\n```\n\n## Links\n\n- [AIEndpoint spec](https://aiendpoint.dev/docs)\n- [@aiendpoint/cli](https://www.npmjs.com/package/@aiendpoint/cli)\n- [GitHub](https://github.com/aiendpoint/platform)\n\n## Both discovery paths\n\n`/.well-known/ai` is preferred; `/ai` remains a compatibility alias. CLI codegen\ncreates both routes. Express/Fastify/Hono serve adapters map both by default.\nIn Next.js, keep the handler in `app/ai/route.ts` and add:\n\n```ts\n// app/.well-known/ai/route.ts\nexport { GET } from '../../ai/route'\n```\n\nUse the same layout under `src/app` if that is where your routes live. An existing\nrewrite from `/.well-known/ai` to `/ai` is equally valid. There is no copied JSON\nfile to keep in sync.\n","readmeFilename":"README.md"}