# AI SDK Provider — BrandApp Playground

> Use generateText / streamText from the Vercel AI SDK against BrandApp via createBrandappProvider().

- Canonical page: https://brandapp-playground.vercel.app/ai/provider
- Markdown: https://brandapp-playground.vercel.app/ai/provider.md
- SDK module: `@reopt-ai/brandapp-sdk/ai-provider`

## Why

The provider makes BrandApp a drop-in model source for the Vercel AI SDK, so the same
patterns work regardless of the underlying provider. BrandApp-specific accounting is
still available through the standard `providerMetadata` field.

```ts
const brandapp = createBrandappProvider({ ... });

const { text, providerMetadata } = await generateText({
  model: brandapp("anthropic/claude-haiku-4.5"),
  prompt: "Hello!",
});

const cost = providerMetadata?.brandapp?.creditCost;
```

## Related

- [Text Completion](https://brandapp-playground.vercel.app/ai/complete.md)
- [Credits and Models](https://brandapp-playground.vercel.app/ai/credits.md)

---

Index of every document: https://brandapp-playground.vercel.app/llms.txt
Single-file copy: https://brandapp-playground.vercel.app/llms-full.txt
HTTP API description: https://brandapp-playground.vercel.app/openapi.json
