Developers
Overview
Build AI applications on OffRail with MCP and the AI SDK
This section is for developers building applications on top of OffRail — with the MCP server and the Vercel AI SDK through @ai-sdk/openai.
Guides
- Model Context Protocol (MCP) — Use OffRail as an MCP server from Claude Code, Cursor, and other MCP clients
- 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
Why the AI SDK
The AI SDK gives you one TypeScript interface for text generation, streaming, tool calling, and image generation. Combined with OffRail, a single provider instance and one API key reach every model in the catalog — see the models page for what's available.
Other ways to integrate
If you're not using the AI SDK:
- Use any OpenAI-compatible SDK against
https://api.offrail.ai/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?