{"slug": "jev-is-now-available-in-pydantic-ai-gateway", "title": "Jev is now available in Pydantic AI Gateway", "summary": "Pydantic AI Gateway now supports Jev, TypeSafe's classification model, letting applications call Jev through a single gateway key alongside their language models. Jev takes text plus typed questions and returns an answer and probability for each, priced at $0.042 per million input tokens, and speaks TypeSafe's System One API rather than the OpenAI chat format. The integration adds metered cost and usage tracking, input guardrails on state, instructions and criteria, and one-key access, with support in the TypeSafe Python SDK and Pydantic AI's TypeSafeModel.", "body_md": "You can now call [Jev](https://typesafe.ai), TypeSafe's classification model, through **Pydantic AI Gateway**. Your application keeps one gateway key, and Jev requests show up next to your language models in the same spend view, limits, and guardrails.\n\nJev isn't a chat model. It takes a piece of text and a set of typed questions, and returns an answer and a probability for each. [David Montague](https://github.com/dmontagu) already showed [how to use it as a judge in Pydantic Evals](https://pydantic.dev/articles/jev-evals), at $0.042 per million input tokens.\n\n## \n\nTypeSafe is a bring-your-own-key provider. In Pydantic [Logfire](https://pydantic.dev/logfire), go to **Gateway**, then **Providers**, and add a provider. Pick **TypeSafe AI**:\n\nPaste your TypeSafe API key and click **Test & continue**. The Gateway asks TypeSafe for its models with that key, so a bad key fails here and not on your first request:\n\nName the provider and you're done. The **Connect** dialog defaults to `jev-latest` and gives you a snippet with your gateway key filled in.\n\nJev speaks TypeSafe's System One API, not the OpenAI chat format, so the Gateway forwards it natively. Here's the request with `curl`:\n\n```\ncurl https://gateway-us.pydantic.dev/proxy/typesafe/v1/systemone \\\n  -H \"Authorization: Bearer $PYDANTIC_AI_GATEWAY_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"jev-latest\",\n    \"state\": \"Help! My payouts have been failing for 3 days.\",\n    \"questions\": {\n      \"is_urgent\": {\n        \"type\": \"noul\",\n        \"instructions\": \"Does this convey urgency?\"\n      }\n    }\n  }'\n```\n\n`typesafe` in the URL is the route name you gave the provider. `state` is the material being judged, and each entry in `questions` is one question about it.\n\nThe TypeSafe Python SDK works too. Install it:\n\n```\nuv add typesafe-sdk\n```\n\nThen point `base_url` at the Gateway:\n\n``` python\nfrom typesafe_sdk import Noul, TypeSafeClient\n\nwith TypeSafeClient(\n    api_key='<your gateway key>',\n    base_url='https://gateway-us.pydantic.dev/proxy/typesafe',\n    model='jev-latest',\n) as client:\n    response = client.system_one(\n        state='Help! My payouts have been failing for 3 days.',\n        questions={'is_urgent': Noul(instructions='Does this convey urgency?')},\n    )\n\nprint(response.answers['is_urgent'].noul)\n```\n\n## \n\nThe Gateway doesn't change what Jev costs or how fast it answers. It adds what you already get for every other provider:\n\n- **Cost and usage.** Every request is metered, so Jev shows up in the same spend view and limits as your language models.\n- **Guardrails.** Input guardrails run on the`state` , the instructions, and the criteria before the request goes upstream.\n- **One key.** Your application holds a gateway key, not a TypeSafe key.\n\n## \n\nPydantic AI can run an agent on Jev with [`TypeSafeModel`](https://pydantic.dev/docs/ai/models/typesafe/): each field of the output type becomes a question. Install it with the `typesafe` extra:\n\n```\nuv add \"pydantic-ai-slim[typesafe]\"\n```\n\nTo send it through the Gateway, give the provider your gateway key and URL:\n\n``` python\nfrom typing import Literal\n\nfrom pydantic import BaseModel, Field\n\nfrom pydantic_ai import Agent\nfrom pydantic_ai.models.typesafe import TypeSafeModel\nfrom pydantic_ai.providers.typesafe import TypeSafeProvider\n\nclass Ticket(BaseModel):\n    \"\"\"Triage a support ticket.\"\"\"\n\n    urgent: bool = Field(description='Does this need a reply within the hour?')\n    area: Literal['billing', 'bug', 'account', 'other'] = Field(description='Which team owns it?')\n\nprovider = TypeSafeProvider(\n    api_key='<your gateway key>',\n    base_url='https://gateway-us.pydantic.dev/proxy/typesafe',\n)\nagent = Agent(TypeSafeModel('jev-latest', provider=provider), output_type=Ticket)\nresult = agent.run_sync('You have charged me twice and my account is now overdrawn.')\nprint(result.output)\n#> urgent=True area='billing'\n```\n\nIf you try it and something doesn't work the way you expect, [open an issue](https://github.com/pydantic/pydantic-ai/issues) or tell us in [Slack](https://pydantic.dev/docs/logfire/join-slack/).", "url": "https://wpnews.pro/news/jev-is-now-available-in-pydantic-ai-gateway", "canonical_source": "https://pydantic.dev/articles/jev-pydantic-ai-gateway", "published_at": "2026-09-25 09:00:00+00:00", "updated_at": "2026-09-25 19:02:23.161980+00:00", "lang": "en", "topics": ["ai-products", "ai-tools", "large-language-models", "developer-tools", "ai-infrastructure"], "entities": ["Pydantic AI Gateway", "Jev", "TypeSafe", "David Montague", "Pydantic Evals", "Logfire", "TypeSafeModel", "typesafe-sdk"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/jev-is-now-available-in-pydantic-ai-gateway", "markdown": "https://wpnews.pro/news/jev-is-now-available-in-pydantic-ai-gateway.md", "text": "https://wpnews.pro/news/jev-is-now-available-in-pydantic-ai-gateway.txt", "jsonld": "https://wpnews.pro/news/jev-is-now-available-in-pydantic-ai-gateway.jsonld"}}