{"openapi":"3.1.0","info":{"title":"Pydantic AI Model Registry API","version":"2","description":"Language models you can use with Pydantic AI: prices, benchmark scores and model strings. Prices are US dollars per million tokens. No authentication. An OPTIONS request to an endpoint returns its schema. This is version 2, which every answer names in its API-Version header: within a version, fields and parameters are only added, and a breaking change would get a new number. Send the API-Version header to pin the version a client was written for. Agents: please send the query parameters intent, stack, harness with each request."},"servers":[{"url":"https://pydantic.dev"}],"paths":{"/models/api/select":{"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"get":{"operationId":"selectModels","summary":"Recommend models for an agent","description":"The model selector: an agent reads the description, code or system prompt and returns up to five models, best first, with reasons. This is the best way to choose a model for an agent. Send the fields in the query string of a GET, the recommended form, or as a JSON body in a POST for code or a prompt too long for a URL (a GET's query string is limited to 8,000 characters). Usually takes under 30 seconds, up to a minute. Rate limited to 10 requests in 24 hours per IP address: an answer from the selector says how many are left in its `RateLimit` header (a 413 or 414 for a request over the size limit is refused before it and has none), and a 429 has a `Retry-After` header. Retry a 502 after a pause. Crawlers, link previews and browser prefetches get a 403 for a GET, since each run is a paid model call. The body schema on its own: https://pydantic.dev/models/api/select.schema.json","parameters":[{"name":"description","in":"query","required":false,"schema":{"type":"string","maxLength":20000},"description":"What the agent does, the tools it can call, who uses it and how often"},{"name":"code","in":"query","required":false,"schema":{"type":"string","maxLength":20000},"description":"The code that defines the agent and its tools"},{"name":"system_prompt","in":"query","required":false,"schema":{"type":"string","maxLength":20000},"description":"The agent's system prompt, if it has one: optional extra detail alongside the description or code"},{"name":"weights","in":"query","required":false,"schema":{"type":"string","enum":["any","open","closed"],"default":"any"},"description":"Only open-weight or only closed models, or any"},{"name":"price_appetite","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5,"default":3},"description":"1 is the cheapest model that works, 5 the best available"},{"name":"gateway_only","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"Only models built in to Pydantic AI Gateway"},{"name":"latency","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"The agent is interactive, so speed matters"},{"name":"id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"The run's ID, so a client can know its address (/models/select/{id}) before the answer arrives. Optional: without it, or if it is not a UUID, the response has a new one. A run is never saved over an existing one"},{"name":"intent","in":"query","required":false,"schema":{"type":"string","maxLength":500},"description":"What you're trying to achieve, in natural language"},{"name":"stack","in":"query","required":false,"schema":{"type":"string","maxLength":500},"description":"The language/framework context you are working in"},{"name":"harness","in":"query","required":false,"schema":{"type":"string","maxLength":500},"description":"The agent harness and model you are running"},{"name":"organization","in":"query","required":false,"schema":{"type":"string","maxLength":500},"description":"The organization or company you are working on behalf of, if known"}],"responses":{"200":{"description":"The recommendations: one Selection as JSON, or for Accept: text/event-stream, server-sent events. Events, in order: `start`: `{\"id\": \"<run id>\", \"selectors\": [\"<model name>\", ...]}`: the run and the models ranking; `progress`: `{\"selector\": \"<model name>\", \"text\": \"<what it is checking>\"}`: a step one of the models took, any number of times; `update`: a full response with status `partial`, then `summarising`, then `done`. Use the last one; `error`: `{\"error\": \"...\"}`, sent instead of a final `update` when every selector fails. The stream then ends. Each `update` is a Selection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Selection"}},"text/event-stream":{"schema":{"type":"string"}}},"headers":{"RateLimit-Policy":{"description":"The limit: `10;w=86400` is 10 requests in a window of 86400 seconds, per IP address","schema":{"type":"string"}},"RateLimit":{"description":"`limit`, the requests `remaining` in the window, and `reset`, the seconds until one is given back, as `limit=10, remaining=7, reset=3600`","schema":{"type":"string"}}}},"400":{"description":"The body is not JSON, or does not match the request schema, in which case `details` lists the problems; or a GET has no description, code or system_prompt","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"A GET from a crawler, link preview or browser prefetch, which do not run the selector: each run is a paid model call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is over 100,000 bytes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"414":{"description":"A GET's query string is over 8,000 characters; send a POST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No models pass the weights and gateway_only constraints","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate limit of 10 requests in 24 hours per IP address; the `Retry-After` header gives the seconds until the next one is allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Policy":{"description":"The limit: `10;w=86400` is 10 requests in a window of 86400 seconds, per IP address","schema":{"type":"string"}},"RateLimit":{"description":"`limit`, the requests `remaining` in the window, and `reset`, the seconds until one is given back, as `limit=10, remaining=7, reset=3600`","schema":{"type":"string"}},"Retry-After":{"description":"Seconds until the next request is allowed","schema":{"type":"integer"}}}},"502":{"description":"The selector failed to produce an answer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The selector's budget for recommendations is used up, or it is not configured. Retrying soon will not help","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"selectModelsPost","summary":"Recommend models for an agent","description":"The model selector: an agent reads the description, code or system prompt and returns up to five models, best first, with reasons. This is the best way to choose a model for an agent. Send the fields in the query string of a GET, the recommended form, or as a JSON body in a POST for code or a prompt too long for a URL (a GET's query string is limited to 8,000 characters). Usually takes under 30 seconds, up to a minute. Rate limited to 10 requests in 24 hours per IP address: an answer from the selector says how many are left in its `RateLimit` header (a 413 or 414 for a request over the size limit is refused before it and has none), and a 429 has a `Retry-After` header. Retry a 502 after a pause. Crawlers, link previews and browser prefetches get a 403 for a GET, since each run is a paid model call. The body schema on its own: https://pydantic.dev/models/api/select.schema.json","parameters":[{"name":"intent","in":"query","required":false,"schema":{"type":"string","maxLength":500},"description":"What you're trying to achieve, in natural language"},{"name":"stack","in":"query","required":false,"schema":{"type":"string","maxLength":500},"description":"The language/framework context you are working in"},{"name":"harness","in":"query","required":false,"schema":{"type":"string","maxLength":500},"description":"The agent harness and model you are running"},{"name":"organization","in":"query","required":false,"schema":{"type":"string","maxLength":500},"description":"The organization or company you are working on behalf of, if known"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectRequest"}}}},"responses":{"200":{"description":"The recommendations: one Selection as JSON, or for Accept: text/event-stream, server-sent events. Events, in order: `start`: `{\"id\": \"<run id>\", \"selectors\": [\"<model name>\", ...]}`: the run and the models ranking; `progress`: `{\"selector\": \"<model name>\", \"text\": \"<what it is checking>\"}`: a step one of the models took, any number of times; `update`: a full response with status `partial`, then `summarising`, then `done`. Use the last one; `error`: `{\"error\": \"...\"}`, sent instead of a final `update` when every selector fails. The stream then ends. Each `update` is a Selection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Selection"}},"text/event-stream":{"schema":{"type":"string"}}},"headers":{"RateLimit-Policy":{"description":"The limit: `10;w=86400` is 10 requests in a window of 86400 seconds, per IP address","schema":{"type":"string"}},"RateLimit":{"description":"`limit`, the requests `remaining` in the window, and `reset`, the seconds until one is given back, as `limit=10, remaining=7, reset=3600`","schema":{"type":"string"}}}},"400":{"description":"The body is not JSON, or does not match the request schema, in which case `details` lists the problems; or a GET has no description, code or system_prompt","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"A GET from a crawler, link preview or browser prefetch, which do not run the selector: each run is a paid model call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is over 100,000 bytes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"414":{"description":"A GET's query string is over 8,000 characters; send a POST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No models pass the weights and gateway_only constraints","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate limit of 10 requests in 24 hours per IP address; the `Retry-After` header gives the seconds until the next one is allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Policy":{"description":"The limit: `10;w=86400` is 10 requests in a window of 86400 seconds, per IP address","schema":{"type":"string"}},"RateLimit":{"description":"`limit`, the requests `remaining` in the window, and `reset`, the seconds until one is given back, as `limit=10, remaining=7, reset=3600`","schema":{"type":"string"}},"Retry-After":{"description":"Seconds until the next request is allowed","schema":{"type":"integer"}}}},"502":{"description":"The selector failed to produce an answer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The selector's budget for recommendations is used up, or it is not configured. Retrying soon will not help","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"options":{"operationId":"selectModelsSchema","summary":"The schema of GET /models/api/select","description":"The parameters, body and responses of this endpoint as JSON Schema.","responses":{"200":{"description":"The schema","content":{"application/schema+json":{"schema":{"type":"object"}}}}}}},"/models/api/search":{"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"get":{"operationId":"searchModels","summary":"Search models by name","description":"Models whose name, family, slug or Pydantic AI model string contains the text, best match first: a name that starts with it, then the earliest match, then the most used. It matches names, not descriptions: to find a model for a task use GET /models/api/select?description=<what the agent does>, and to filter by price or capability use /models/api/models.","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string","minLength":1},"description":"The text to search for. Required, as `query` or `search`"},{"name":"search","in":"query","required":false,"schema":{"type":"string","minLength":1},"description":"Another name for `query`"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":10},"description":"Models per response"},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["json","md"]},"description":"The response format. Without it, `Accept: text/markdown` gets Markdown and anything else JSON"},{"name":"intent","in":"query","required":false,"schema":{"type":"string","maxLength":500},"description":"What you're trying to achieve, in natural language"},{"name":"stack","in":"query","required":false,"schema":{"type":"string","maxLength":500},"description":"The language/framework context you are working in"},{"name":"harness","in":"query","required":false,"schema":{"type":"string","maxLength":500},"description":"The agent harness and model you are running"},{"name":"organization","in":"query","required":false,"schema":{"type":"string","maxLength":500},"description":"The organization or company you are working on behalf of, if known"}],"responses":{"200":{"description":"The matching models","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"}},"text/markdown":{"schema":{"type":"string"}}}},"400":{"description":"There is no `query`, or a parameter is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"options":{"operationId":"searchModelsSchema","summary":"The schema of GET /models/api/search","description":"The parameters, body and responses of this endpoint as JSON Schema.","responses":{"200":{"description":"The schema","content":{"application/schema+json":{"schema":{"type":"object"}}}}}}},"/models/api/models":{"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"get":{"operationId":"listModels","summary":"List, filter and sort models","description":"Every model in the registry, 50 at a time unless `limit` says otherwise. Filters combine with AND. Prices are US dollars per million tokens.","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Text contained in the model name, family name or slug"},{"name":"slug","in":"query","required":false,"schema":{"type":"string"},"description":"One or more model slugs, comma-separated: these models only"},{"name":"family","in":"query","required":false,"schema":{"type":"string","enum":["claude","openai","gemini","xai","deepseek","moonshot","zai","minimax","qwen","muse","mistral","nvidia","tencent","xiaomi","stepfun","bytedance","nova","microsoft","cohere","perplexity","thinkingmachines","reflection","liquid","typesafe","cloudflare","ibm","upstage"]},"description":"The model family, by its id"},{"name":"developer","in":"query","required":false,"schema":{"type":"string"},"description":"The company behind the family, such as Anthropic; case is ignored"},{"name":"provider","in":"query","required":false,"schema":{"type":"string","enum":["anthropic","openai","google","aws","groq","azure","x-ai","deepseek","mistral","moonshotai","zai","zhipuai","minimax","meta","openai-decisions","typesafe","cohere","perplexity","fireworks","together","cerebras","doubleword","novita","baseten","cloudflare","ovhcloud","openrouter"]},"description":"An inference provider that serves the model"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["preview","active","deprecated","retired"]},"description":"Where the model is in its life"},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["general","decision"]},"description":"general: models that write text. decision: decision models, which answer typed questions (yes/no, choice, score) instead"},{"name":"weights","in":"query","required":false,"schema":{"type":"string","enum":["open","closed"]},"description":"Open-weight or closed models only"},{"name":"gateway","in":"query","required":false,"schema":{"type":"boolean"},"description":"Whether the model is built in to Pydantic AI Gateway"},{"name":"byok","in":"query","required":false,"schema":{"type":"boolean"},"description":"Whether the model can be used in Gateway with your own provider key"},{"name":"reasoning","in":"query","required":false,"schema":{"type":"boolean"},"description":"Whether the model reasons before it answers"},{"name":"tools","in":"query","required":false,"schema":{"type":"boolean"},"description":"Whether the model can call tools"},{"name":"structured_output","in":"query","required":false,"schema":{"type":"boolean"},"description":"Whether the model supports structured output"},{"name":"modality","in":"query","required":false,"schema":{"type":"string"},"description":"Something the model accepts as input: text, image, file, audio or video"},{"name":"output_modality","in":"query","required":false,"schema":{"type":"string"},"description":"Something the model produces: text, image, audio, video or decisions"},{"name":"snapshots","in":"query","required":false,"schema":{"type":"boolean"},"description":"false leaves out dated snapshots of another model"},{"name":"released_after","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Released on or after this date"},{"name":"released_before","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Released on or before this date"},{"name":"updated_after","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"A benchmark score changed on or after this date"},{"name":"min_context","in":"query","required":false,"schema":{"type":"integer","minimum":0},"description":"Smallest acceptable context window, in tokens"},{"name":"max_context","in":"query","required":false,"schema":{"type":"integer","minimum":0},"description":"Largest acceptable context window, in tokens"},{"name":"max_input_price","in":"query","required":false,"schema":{"type":"number","minimum":0},"description":"Highest input price"},{"name":"max_output_price","in":"query","required":false,"schema":{"type":"number","minimum":0},"description":"Highest output price"},{"name":"max_price","in":"query","required":false,"schema":{"type":"number","minimum":0},"description":"Highest blended price (three input tokens per output token)"},{"name":"min_speed","in":"query","required":false,"schema":{"type":"number","minimum":0},"description":"Lowest output speed, in tokens per second"},{"name":"min_index","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Intelligence index: Our composite of the benchmarks below, 0-100"},{"name":"min_pydantic_ai","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Pydantic AI Combined: The mean of the six Pydantic AI benchmarks; code mode is compared over the four that have a code mode run"},{"name":"min_billing_ops","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Pydantic AI - Billing ops: Questions about and changes to a tutoring agency's books, checked to the penny"},{"name":"min_customer_support","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Pydantic AI - Customer support: Replying to real, anonymised customer-support conversations, with citations"},{"name":"min_sql_data_analysis","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Pydantic AI - SQL data analysis: Planning journeys by querying a real Dresden public transport timetable with SQL, with an SVG map of each answer"},{"name":"min_research_deck","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Pydantic AI - Research & deck: Questioning a founder and writing an eight-slide investor deck from a data room"},{"name":"min_structured_output","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Pydantic AI - Structured output: Extracting UK company accounts into a nested Pydantic model, checked against the filer's tags"},{"name":"min_llm_judge","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Pydantic AI - LLM Judge: How often the model agrees with a panel of judge models on yes-or-no rubric questions"},{"name":"min_cyber_willing","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Pydantic AI - Cyber Willing: The share of 12 security requests about our own code and systems that a model answers rather than refuses"},{"name":"min_gpqa","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on GPQA Diamond: Graduate-level science questions, multiple choice"},{"name":"min_aime","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on OTIS Mock AIME: Competition mathematics problems with exact answers"},{"name":"min_frontiermath","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on FrontierMath: Original research-level mathematics problems, tiers 1 to 3"},{"name":"min_arc_agi_2","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on ARC-AGI-2: Abstract visual puzzles that test learning a new rule from a few examples"},{"name":"min_simpleqa","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on SimpleQA Verified: Short factual questions answered from memory, without search"},{"name":"min_scicode","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on SciCode: Scientific programming problems written by researchers"},{"name":"min_apex","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on APEX-Agents: Long professional tasks (banking, consulting, law) passed on the first attempt"},{"name":"min_lmarena","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on LMArena text: Rating from blind human votes between pairs of chat responses"},{"name":"min_frontiermath_t4","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on FrontierMath Tier 4: Research-level mathematics problems, the hardest tier, with checkable answers"},{"name":"min_chess","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Chess Puzzles: Find the single best move in a chess position"},{"name":"min_mystery_game","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Mystery Game Puzzles: Best-move puzzles in an undisclosed well-known game"},{"name":"min_furniture","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Furniture Assembly: Spot assembly mistakes in photos of flat-pack furniture builds"},{"name":"min_simplebench","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on SimpleBench: Six-option trick questions that test common sense"},{"name":"min_ale_bench","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on ALE-Bench: Hard optimisation contest problems, as a rating against human contestants"},{"name":"min_browser_use","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Browser Use Bench: Tasks on live websites, scored 0-100 against a weighted rubric by an LLM judge"},{"name":"min_eci","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Epoch Capabilities Index: Epoch AI's own composite across about 40 benchmarks; shown for comparison, not part of our index"},{"name":"min_pydantic_ai_decision","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Pydantic AI Decision Combined: The mean of the six Pydantic AI decision benchmarks that a decision model can answer"},{"name":"min_accounts_facts","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Pydantic AI - Company accounts: Twelve typed questions about a set of real UK company accounts, checked against the figures the filer tagged"},{"name":"min_trip_request","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Pydantic AI - Trip requests: A customer's message asking for flights, filled in as a booking of 11 typed fields"},{"name":"min_browser_steps","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Pydantic AI - Browser steps: The next step a browser agent's driver should take on a page, from real runs"},{"name":"min_email_triage","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Pydantic AI - Email triage: Six typed questions about each of 516 real emails from one inbox: what to do with it, whether it needs a reply, whether it is phishing"},{"name":"min_reply_quality","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Pydantic AI - Reply quality: Whether a support answer worked, judged from what the customer wrote next, in five typed questions"},{"name":"min_ui_compose","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Pydantic AI - Dashboard builder: A request for a dashboard, built by choosing how to show each metric, the layout, the period and the filters"},{"name":"min_invoice_fields","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Pydantic AI - Invoice fields: The fields of 87 real invoices as free values: names, dates, amounts and whether it is paid"},{"name":"min_aa_decision_index","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on AA Decision Index: Artificial Analysis's composite for decision models: six evaluations of typed answers, partly on private data"},{"name":"min_jev_decision_index","in":"query","required":false,"schema":{"type":"number"},"description":"Lowest score on Jev Decision Index: An independent suite of 37 public benchmarks recast as typed questions, run on each decision model by its maintainer"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["intelligence","pydantic_ai_projected","cost","time","latency","popularity","efficiency","speed","price","input","output","released","updated","context","name","family","top","index","pydantic_ai","billing_ops","customer_support","sql_data_analysis","research_deck","structured_output","llm_judge","cyber_willing","gpqa","aime","frontiermath","arc_agi_2","simpleqa","scicode","apex","lmarena","frontiermath_t4","chess","mystery_game","furniture","simplebench","ale_bench","browser_use","eci","pydantic_ai_decision","accounts_facts","trip_request","browser_steps","email_triage","reply_quality","ui_compose","invoice_fields","aa_decision_index","jev_decision_index"],"default":"intelligence"},"description":"What to order by: one of the named sorts, or a benchmark id for its score. Models with no value sort last"},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]},"description":"Defaults to best first for the chosen sort (cheapest for prices, highest for scores)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Models per response"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Models to skip, for paging"},{"name":"fields","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated fields of a model to return; slug is always included"},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["json","md"]},"description":"The response format. Without it, `Accept: text/markdown` gets Markdown and anything else JSON"},{"name":"intent","in":"query","required":false,"schema":{"type":"string","maxLength":500},"description":"What you're trying to achieve, in natural language"},{"name":"stack","in":"query","required":false,"schema":{"type":"string","maxLength":500},"description":"The language/framework context you are working in"},{"name":"harness","in":"query","required":false,"schema":{"type":"string","maxLength":500},"description":"The agent harness and model you are running"},{"name":"organization","in":"query","required":false,"schema":{"type":"string","maxLength":500},"description":"The organization or company you are working on behalf of, if known"}],"responses":{"200":{"description":"The matching models","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelList"}},"text/markdown":{"schema":{"type":"string"}}}},"400":{"description":"A parameter is unknown or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"options":{"operationId":"listModelsSchema","summary":"The schema of GET /models/api/models","description":"The parameters, body and responses of this endpoint as JSON Schema.","responses":{"200":{"description":"The schema","content":{"application/schema+json":{"schema":{"type":"object"}}}}}}},"/models/api/models/{slug}":{"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The model's slug, such as claude-opus-5.5"},{"$ref":"#/components/parameters/ApiVersion"}],"get":{"operationId":"getModel","summary":"One model in full","description":"Everything on the model page: description, strengths and weaknesses, per-provider prices and model strings, benchmarks and example code. Slugs come from /models/api/models and /models/api/search.","parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["json","md"]},"description":"The response format. Without it, `Accept: text/markdown` gets Markdown and anything else JSON"}],"responses":{"200":{"description":"The model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelDetail"}},"text/markdown":{"schema":{"type":"string"}}}},"404":{"description":"No such model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"options":{"operationId":"getModelSchema","summary":"The schema of GET /models/api/models/{slug}","description":"The parameters, body and responses of this endpoint as JSON Schema.","responses":{"200":{"description":"The schema","content":{"application/schema+json":{"schema":{"type":"object"}}}}}}},"/models/api/ask":{"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"get":{"operationId":"askRegistry","summary":"Ask a question about the registry","description":"A question in natural language, answered by an agent from the registry's data: prices, context windows, benchmark scores, which models have open weights or are on Pydantic AI Gateway, what a benchmark measures. Use it for a question the filters of /models/api/models do not express; to choose a model for an agent, /models/api/select ranks every model for it. Takes a few seconds. A POST with the JSON body `{\"query\": \"...\"}` does the same. Rate limited to 10 questions in 24 hours per IP address, counted apart from the selector's: an answer says how many are left in its `RateLimit` header, and a 429 has a `Retry-After` header. The same agent answers NLWeb requests at https://pydantic.dev/models/ask.","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":2000},"description":"The question. Required"},{"name":"streaming","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"Send the answer as server-sent events while it is written, as Accept: text/event-stream does"},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["json","md"]},"description":"The response format. Without it, `Accept: text/markdown` gets Markdown and anything else JSON"},{"name":"intent","in":"query","required":false,"schema":{"type":"string","maxLength":500},"description":"What you're trying to achieve, in natural language"},{"name":"stack","in":"query","required":false,"schema":{"type":"string","maxLength":500},"description":"The language/framework context you are working in"},{"name":"harness","in":"query","required":false,"schema":{"type":"string","maxLength":500},"description":"The agent harness and model you are running"},{"name":"organization","in":"query","required":false,"schema":{"type":"string","maxLength":500},"description":"The organization or company you are working on behalf of, if known"}],"responses":{"200":{"description":"The answer, and the models it is about. Streamed, it is server-sent events: `start`, then an `update` each time the answer grows, an AskAnswer with `status` `partial` and no models yet, and last an `update` with `status` `done` and the models; or an `error` event with `{\"error\": \"...\"}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskAnswer"}},"text/markdown":{"schema":{"type":"string"}},"text/event-stream":{"schema":{"type":"string"}}},"headers":{"RateLimit-Policy":{"description":"The limit: `10;w=86400` is 10 requests in a window of 86400 seconds, per IP address","schema":{"type":"string"}},"RateLimit":{"description":"`limit`, the requests `remaining` in the window, and `reset`, the seconds until one is given back, as `limit=10, remaining=7, reset=3600`","schema":{"type":"string"}}}},"400":{"description":"There is no `query`, or it is over 2,000 characters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate limit of 10 questions in 24 hours per IP address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Policy":{"description":"The limit: `10;w=86400` is 10 requests in a window of 86400 seconds, per IP address","schema":{"type":"string"}},"RateLimit":{"description":"`limit`, the requests `remaining` in the window, and `reset`, the seconds until one is given back, as `limit=10, remaining=7, reset=3600`","schema":{"type":"string"}},"Retry-After":{"description":"Seconds until the next request is allowed","schema":{"type":"integer"}}}},"502":{"description":"The agent did not produce an answer; try again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The agent is starting up, or its budget is used up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"options":{"operationId":"askRegistrySchema","summary":"The schema of GET /models/api/ask","description":"The parameters, body and responses of this endpoint as JSON Schema.","responses":{"200":{"description":"The schema","content":{"application/schema+json":{"schema":{"type":"object"}}}}}}},"/models/api/select/runs/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/ApiVersion"}],"get":{"operationId":"getSelectionRun","summary":"A saved model-selector run","description":"A finished run with recommendations, saved for 30 days, with the request that was sent. Each model is returned as it is now, or null if it has left the registry. Anyone with the id can read it.","responses":{"200":{"description":"The run","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Selection"},{"type":"object","required":["created_at","expires_at","request"],"properties":{"created_at":{"type":"integer","description":"When the run finished, in unix seconds"},"expires_at":{"type":"integer","description":"When the run will be deleted, in unix seconds: 30 days after created_at"},"request":{"$ref":"#/components/schemas/SelectRequest"}}}]}}}},"400":{"description":"The id is not a UUID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such run, or it has expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteSelectionRun","summary":"Delete a saved model-selector run","responses":{"204":{"description":"Deleted"},"400":{"description":"The id is not a UUID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"What went wrong, in words"},"details":{"type":"array","description":"For a request that fails validation: one entry per problem","items":{"type":"object","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"The kind of error, such as string_too_long or missing"},"loc":{"type":"array","items":{"type":["string","integer"]},"description":"Where in the request the problem is, such as [\"price_appetite\"]"},"msg":{"type":"string","description":"What is wrong, in words"}}}}}},"Model":{"type":"object","properties":{"slug":{"type":"string","description":"The id of the model in this registry, as in /models/api/models/{slug}"},"name":{"type":"string"},"family":{"type":"string","description":"The model family's id: claude, openai, gemini, xai, deepseek, moonshot, zai, minimax, qwen, muse, mistral, nvidia, tencent, xiaomi, stepfun, bytedance, nova, microsoft, cohere, perplexity, thinkingmachines, reflection, liquid, typesafe, cloudflare, ibm, upstage"},"kind":{"type":"string","enum":["general","decision"],"description":"general: writes text. decision: answers typed questions (yes/no, choice, score) with probabilities"},"family_name":{"type":"string"},"developer":{"type":"string","description":"The company behind the family"},"status":{"type":"string","enum":["preview","active","deprecated","retired"]},"released":{"type":"string","format":"date"},"updated":{"type":["string","null"],"format":"date","description":"When a benchmark score last changed"},"snapshot_of":{"type":["string","null"],"description":"The slug of the model this is a dated snapshot of. Snapshots are left out of the ranks"},"open":{"type":"boolean","description":"Open weights"},"context":{"type":["integer","null"],"description":"Context window in tokens"},"speed":{"type":["number","null"],"description":"Output tokens per second"},"latency":{"type":["number","null"],"description":"Seconds to the first token"},"short":{"type":"string","description":"Two-sentence description"},"gateway":{"type":"boolean","description":"Built in to Pydantic AI Gateway"},"byok":{"type":"boolean","description":"Usable in Gateway with your own provider key"},"string":{"type":["string","null"],"description":"Model string to pass to a Pydantic AI Agent. null: Pydantic AI has no provider for it"},"input":{"type":"number","description":"US dollars per million input tokens"},"output":{"type":"number","description":"US dollars per million output tokens"},"blended":{"type":"number","description":"Price of three input tokens to one output token, per million"},"efficiency":{"type":["number","null"],"description":"Intelligence index divided by blended price"},"bench":{"type":"object","additionalProperties":{"type":"number"},"description":"Scores by benchmark id: index, pydantic_ai, billing_ops, customer_support, sql_data_analysis, research_deck, structured_output, llm_judge, cyber_willing, gpqa, aime, frontiermath, arc_agi_2, simpleqa, scicode, apex, lmarena, frontiermath_t4, chess, mystery_game, furniture, simplebench, ale_bench, browser_use, eci, pydantic_ai_decision, accounts_facts, trip_request, browser_steps, email_triage, reply_quality, ui_compose, invoice_fields, aa_decision_index, jev_decision_index"},"bench_cost":{"type":"object","additionalProperties":{"type":"number"},"description":"Mean cost of one task in US dollars, for benchmarks that publish it"},"ranks":{"type":"object","additionalProperties":{"type":["integer","null"]},"description":"1 is best: intelligence, popularity, efficiency, speed, price"},"top_score":{"type":"number","description":"Blend of popularity, capability and price"},"pydantic_ai_score":{"type":["number","null"],"description":"Pydantic AI Combined score, or for a model not yet run the score projected from its other benchmarks (sort=pydantic_ai_projected)"},"pydantic_ai_projected":{"type":"boolean","description":"Whether pydantic_ai_score is a projection"},"modalities":{"type":"array","items":{"type":"string"},"description":"What the model accepts as input"},"output_modalities":{"type":"array","items":{"type":"string"}},"reasoning":{"type":["boolean","null"],"description":"null: unknown"},"tools":{"type":["boolean","null"],"description":"Tool calling. null: unknown"},"structured_output":{"type":["boolean","null"],"description":"null: unknown"},"providers":{"type":"array","items":{"type":"string"},"description":"Ids of the providers that serve it"}}},"ModelList":{"type":"object","properties":{"total":{"type":"integer","description":"Models matching the filters"},"registry_total":{"type":"integer","description":"Models in the registry"},"count":{"type":"integer","description":"Models in this response"},"limit":{"type":"integer"},"offset":{"type":"integer"},"sort":{"type":"string"},"order":{"type":"string","enum":["asc","desc"]},"generated":{"type":"string","format":"date","description":"When the data was built"},"notice":{"type":"string","description":"Present when the request left out intent, stack or harness: asks for them next time"},"models":{"type":"array","items":{"$ref":"#/components/schemas/Model"}}}},"SearchResult":{"type":"object","properties":{"query":{"type":"string"},"count":{"type":"integer","description":"Models in this response"},"generated":{"type":"string","format":"date","description":"When the data was built"},"notice":{"type":"string","description":"Present when the request left out intent, stack or harness: asks for them next time"},"models":{"type":"array","items":{"$ref":"#/components/schemas/Model"},"description":"Best match first"}}},"AskAnswer":{"type":"object","required":["query","answer","models","off_topic","answered_by","status"],"properties":{"query":{"type":"string","description":"The question, as it was asked"},"answer":{"type":["string","null"],"description":"The answer in plain text; null when the question is off topic"},"models":{"type":"array","items":{"$ref":"#/components/schemas/Model"},"description":"The models the answer is about, most relevant first"},"off_topic":{"type":["string","null"],"description":"When the question is not about language models or the registry: what to ask instead"},"answered_by":{"type":"string","description":"The model that answered, as a Pydantic AI model string"},"status":{"type":"string","enum":["partial","done"],"description":"done, except in the events of a stream"}}},"ModelDetail":{"allOf":[{"$ref":"#/components/schemas/Model"},{"type":"object","description":"Everything on the model page","properties":{"knowledge_cutoff":{"type":["string","null"]},"max_output":{"type":["integer","null"],"description":"Largest response in tokens"},"cache_read":{"type":["number","null"],"description":"US dollars per million cached input tokens"},"huggingface":{"type":["string","null"]},"long":{"type":"string","description":"The full description"},"strengths":{"type":"array","items":{"type":"string"}},"weaknesses":{"type":"array","items":{"type":"string"}},"best_for":{"type":"string"},"quirks":{"type":"array","description":"What to know when calling it, found running the Pydantic AI benchmarks: requests a provider refuses, settings it needs, behaviour that looks like a low score","items":{"type":"object","required":["text","checked"],"properties":{"text":{"type":"string","description":"What happens and what to do about it, as Markdown"},"host":{"type":"string","description":"The provider it was seen on; absent when it applies on every provider"},"checked":{"type":"string","format":"date","description":"When it was last seen"}}}},"offers":{"type":"array","items":{"type":"object"},"description":"Each provider that serves the model, with its prices and model string"},"about":{"type":"array","items":{"type":"string"},"description":"The description as paragraphs"},"examples":{"type":"array","items":{"type":"object"},"description":"Example code"},"benchmarks":{"type":"array","items":{"type":"object"},"description":"The benchmarks it has scores on"}}}]},"SelectRequest":{"type":"object","description":"Describe an agent with at least one of description, code or system_prompt, each containing more than whitespace. A description or the code is usually enough; add the system prompt for more detail.","properties":{"description":{"type":["string","null"],"maxLength":20000,"description":"What the agent does, the tools it can call, who uses it and how often"},"code":{"type":["string","null"],"maxLength":20000,"description":"The code that defines the agent and its tools"},"system_prompt":{"type":["string","null"],"maxLength":20000,"description":"The agent's system prompt, if it has one: optional extra detail alongside the description or code"},"weights":{"type":"string","enum":["any","open","closed"],"default":"any","description":"Only open-weight or only closed models, or any"},"price_appetite":{"type":"integer","minimum":1,"maximum":5,"default":3,"description":"1 is the cheapest model that works, 5 the best available"},"gateway_only":{"type":"boolean","default":false,"description":"Only models built in to Pydantic AI Gateway"},"latency":{"type":"boolean","default":false,"description":"The agent is interactive, so speed matters"},"id":{"type":"string","format":"uuid","description":"The run's ID, so a client can know its address (/models/select/{id}) before the answer arrives. Optional: without it, or if it is not a UUID, the response has a new one. A run is never saved over an existing one"}},"anyOf":[{"required":["description"],"properties":{"description":{"type":"string","pattern":"\\S"}}},{"required":["code"],"properties":{"code":{"type":"string","pattern":"\\S"}}},{"required":["system_prompt"],"properties":{"system_prompt":{"type":"string","pattern":"\\S"}}}],"examples":[{"description":"Answers customer questions from our help centre and escalates refund requests","price_appetite":3}]},"Selection":{"type":"object","required":["needs","recommendations","summary","more_input","considered","selected_by","status","id"],"properties":{"needs":{"type":"array","items":{"type":"string"},"description":"What the agent needs from a model"},"recommendations":{"type":"array","maxItems":5,"description":"Best fit first. Empty when more_input is set","items":{"type":"object","required":["slug","score","reasons","model"],"properties":{"slug":{"type":"string","description":"The model's slug, as in /models.json"},"score":{"type":"integer","minimum":0,"maximum":100,"description":"How well the model fits, 100 being ideal"},"reasons":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Short reasons, each citing a fact"},"model":{"description":"The model as it is now. null only in a saved run (GET /models/api/select/runs/{id}) when the model has left the registry","oneOf":[{"$ref":"#/components/schemas/Model"},{"type":"null"}]}}}},"summary":{"type":["string","null"],"description":"Two or three sentences on what the agent needs and why the first model fits. null while status is summarising, and when more_input is set"},"more_input":{"type":["string","null"],"description":"Set when the input does not describe an agent: what to send instead. There are then no recommendations"},"considered":{"type":"integer","description":"Models that passed the weights and gateway_only constraints"},"selected_by":{"type":"string","description":"The models that made the selection, joined with +. Their rankings are averaged"},"status":{"type":"string","enum":["partial","summarising","done"],"description":"Always done in a JSON response. In an event stream: partial while some models are still ranking, summarising when the ranking is final, then done"},"id":{"type":"string","format":"uuid","description":"The run. A finished run with recommendations is saved for 30 days: GET /models/api/select/runs/{id} returns it, DELETE deletes it, and /select/{id} shows it"}}}},"parameters":{"ApiVersion":{"name":"API-Version","in":"header","required":false,"schema":{"type":"string","enum":["2"],"default":"2"},"description":"The version of the API the client was written for. Optional: without it the current version, 2, answers. A version the API no longer speaks gets a 400. Every answer has the same header."}}}}