Frameworks Overview

Using OpenRouter with Popular Frameworks

OpenRouter integrates seamlessly with popular AI frameworks and SDKs. Choose your preferred framework below for detailed integration guides:

Available Framework Integrations

  • OpenAI SDK - Direct integration using the official OpenAI SDK for Python and TypeScript
  • LangChain - Integration with LangChain for Python and JavaScript applications
  • PydanticAI - High-level interface for Python applications using PydanticAI
  • Vercel AI SDK - Integration with Next.js applications using the Vercel AI SDK
  • Mastra - Unified interface for AI model access through Mastra framework

You can also find additional examples in our GitHub repository.