Skip to main content
Pydantic AI is a Python agent framework from the Pydantic team, with typed structured outputs and tool calling. Its OpenAI model class takes a custom provider, so you can point it at the ScitiX Model Inference API. Default model here is glm-5.2; see the Models page for the full list and pricing.

Configure

Create an API key on the ScitiX API Keys page and export it:
Build an OpenAIChatModel with an OpenAIProvider whose base_url is the ScitiX endpoint:
The class name is version-sensitive. Import the one that matches your installed version. Choose a model with native tool calling for Pydantic AI’s tool/structured-output features.

Verify

Run a prompt — a normal reply confirms the connection (verified on Pydantic AI 2.27.1):
A model’s self-identification is unreliable; it may name a different family. Routing is set by the model ID you pass, and the ScitiX endpoint returns the requested model.