AI SDK
Overview
Build AI applications on LLM Gateway with the AI SDK
This section is for developers building applications on top of LLM Gateway — with a focus on the Vercel AI SDK and our first-party provider package, @llmgateway/ai-sdk-provider.
Why the AI SDK
The AI SDK gives you one TypeScript interface for text generation, streaming, tool calling, and image generation. Combined with LLM Gateway, a single provider instance and one API key reach every model in the catalog — see the models page for what's available.
Guides
- Using the AI SDK — Install the provider, generate and stream text, call tools, and wire up Next.js routes
- Image Generation with the AI SDK — Generate images with
generateImageand stream image output through chat
Other ways to integrate
If you're not using the AI SDK:
- Use any OpenAI-compatible SDK against
https://api.llmgateway.io/v1— see the Quickstart - Use the Anthropic SDK against the Anthropic-compatible endpoint
- Call the REST API directly — see the API reference in the sidebar
How is this guide?
Last updated on