Small scripts that mirror the supported integration paths:
vercel-provider.mjs—generateText/streamTextfromai+createAIGatewayProviderfrom@macpaw/ai-sdknestjs/— copy-ready NestJS module / controller / service (uses@macpaw/ai-sdk/nestjs+@macpaw/ai-sdk)
From the repository root:
export AI_GATEWAY_TOKEN="your-token"
pnpm example:providerThe script runs pnpm build first so Node resolves the package like a consumer app.
Optional:
AI_GATEWAY_BASE_URL— custom gateway root instead ofenv: 'production'AI_GATEWAY_MODEL— defaultopenai/gpt-4.1-nano
The NestJS sample is documented in examples/nestjs/README.md; copy it into a real Nest app rather than running it from this repo alone.