Install
Clone the example project and install dependencies:.env.local:
Use the provider
claude-4-5-sonnet, claude-4-5-haiku). You get streaming responses, tool calling, and error handling that match the Vercel AI SDK.
Deploy
Deploy the example to Heroku or any Node host:/api/chat and the provider forwards requests to Heroku AI behind the scenes.
Extend
- Swap the model name to use image generation (
stable-image-ultra) or embeddings (cohere-embed-multilingual). - Add tool definitions to the
streamTextcall to let your app invoke MCP servers hosted on Heroku. - Combine with Heroku Vibes to bootstrap full-stack apps that call Heroku AI via the SDK.