Pydantic AI Gateway is Moving to Logfire
We're consolidating the Pydantic AI Gateway into Pydantic Logfire.
gateway.pydantic.dev is being deprecated, and going forward the gateway is managed entirely through your Logfire account.
Why merge the two?
When we launched Pydantic AI Gateway (PAIG), one of our stated goals was tighter integration with the rest of the Pydantic stack. Logfire was the obvious home for that. It already handles the observability side of your LLM applications, and the gateway is fundamentally about controlling and understanding how those applications use models.
Keeping them separate created unnecessary friction. You had one account for routing your LLM calls and a completely different account to observe what those calls actually did. That split made it harder to get a coherent picture of your application, and it meant maintaining two separate billing relationships, two sets of API keys, and two dashboards to check.
Bringing the gateway into Logfire closes that gap. The result is a single place to route, observe, and reason about your LLM usage.
Observability and gateway, side by side
The most immediate benefit of this consolidation is that your gateway traffic and your application traces live in the same place.
Every request routed through the gateway can be correlated with the broader trace it belongs to: the agent steps, tool calls, validation results, and anything else your application is doing. You're not jumping between tools or cross-referencing separate dashboards to piece together what happened.
You can query across gateway metrics and application traces together, build dashboards that show cost, latency, and errors side by side, and drill down from a high-level summary to an individual span in a few clicks. That kind of end-to-end visibility is what makes it actually useful when something goes wrong in production.
LLM Playground
One of the features that works particularly well in this combined setup is our recently launched LLM playground in Logfire.
The Playground lets you test prompts directly against the models available through your gateway, using your gateway API key. Because it sits inside Logfire, every request you make from the Playground is automatically traced. You can see exactly what the model received, what it returned, and how long it took, without any extra setup. It's a fast feedback loop for iterating on prompts and comparing model behaviour, with the same observability you'd have in production.
Enterprise capabilities, included
Because the gateway now lives inside Logfire, it inherits Logfire's full set of enterprise access controls: SSO, custom roles, fine-grained permissions, and security group mapping. If your organisation already uses these features in Logfire, the gateway gets them for free.
For teams that care about who has access to what, and especially for teams operating under compliance requirements, this is a meaningful improvement over what we could offer in a standalone gateway product.
One account, one billing relationship
We're working towards consolidating gateway usage with your other Logfire charges in a single account — one invoice, one place to manage payment, and one view of what you're spending across observability and gateway together.
Moving over
Migration is straightforward. The gateway works the same way; you just generate a new API key from Logfire instead of gateway.pydantic.dev. If you're using Pydantic AI with the gateway/ provider prefix, the only change is swapping the key:
export PYDANTIC_AI_GATEWAY_API_KEY="pylf_v..."
For the full step-by-step walkthrough and answers to common questions, see the migration guide.
If you have questions or need help, reach out at [email protected].