PydanticAI
title: PydanticAI subtitle: Using OpenRouter with PydanticAI headline: ‘PydanticAI Integration | OpenRouter SDK Support’ canonical-url: https://openrouter.ai/docs/guides/community/pydantic-ai og:site_name: OpenRouter Documentation og:title: ‘PydanticAI Integration - OpenRouter SDK Support’ og:description: ‘Integrate OpenRouter using PydanticAI framework. Complete guide for PydanticAI integration with OpenRouter for Python applications.’ og:image: https://openrouter.ai/dynamic-og?title=PydanticAI&description=PydanticAI%20Integration og:image:width: 1200 og:image:height: 630 twitter:card: summary_large_image twitter:site: ‘@OpenRouterAI’ noindex: false nofollow: false
Using PydanticAI
PydanticAI provides a high-level interface for working with various LLM providers, including OpenRouter.
Installation
Configuration
You can use OpenRouter with PydanticAI through its OpenAI-compatible interface:
For more details about using PydanticAI with OpenRouter, see the PydanticAI documentation.