Skip to main content
Use Pydantic AI with Eden AI to build type-safe agents on 500+ AI models through one API.

Overview

Pydantic AI is a type-safe, structured-output agent framework for Python. It works with any OpenAI-compatible endpoint through OpenAIChatModel + OpenAIProvider, so you can point it at Eden AI’s V3 API and access models from OpenAI, Anthropic, Google, Cohere, Meta, and more — behind one key, with EU-based, GDPR-aligned inference.

Installation

Quick Start

Point Pydantic AI’s OpenAI model at Eden AI:

Available Models

Access models from multiple providers using the provider/model format: OpenAI
  • openai/gpt-5.5
  • openai/gpt-5-mini
Anthropic
  • anthropic/claude-sonnet-5
  • anthropic/claude-opus-4-8
  • anthropic/claude-haiku-4-5
Google
  • google/gemini-2.5-pro
  • google/gemini-3.5-flash
Mistral
  • mistral/mistral-large-2512
  • mistral/mistral-small-2603

Structured Output

Pydantic AI’s signature feature works unchanged — define a Pydantic output_type and the agent returns a validated object, whichever Eden AI model you choose:

Multi-Turn Conversations

Keep conversation history across runs with message_history:

Error Handling

Environment Variables

Next Steps