> ## Documentation Index
> Fetch the complete documentation index at: https://narev.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenRouter chatbot with Polar billing

> Run the Narev SDK OpenRouter + Polar demo app to ship usage-based billing without building metering from scratch.

Fork the OpenRouter + Polar chatbot demo, add your API keys, and deploy it to ship usage-based billing without building metering from scratch.

## Live demo

<Card title="OpenRouter + Polar chatbot" icon="message" href="https://chatbot-with-billing-polar-three.vercel.app/">
  Chat UI with per-user usage tracking and Polar billing events.
</Card>

## Source repository

Fork and deploy from GitHub:

* Repo: [narevai/chatbot-with-billing-polar](https://github.com/narevai/chatbot-with-billing-polar)
* Stack: OpenRouter, `@ai-billing/openrouter`, `@ai-billing/polar`, `@ai-billing/nextjs`

## What the demo shows

* Vercel AI SDK chat route with Narev billing middleware
* `providerOptions['ai-billing-tags']` with a stable `userId` on every billed call
* Polar as the usage destination

## What to do next

* [Narev SDK quickstart](/docs/sdk/ai-billing/index)
* [Polar billing integration](/docs/platform/billing/integrations/billing-platforms/polar)
* [Next.js billing patterns](/docs/platform/billing/integrations/frameworks/nodejs)
