[{"data":1,"prerenderedAt":40},["ShallowReactive",2],{"docs:providers/baseten":3},{"title":4,"navTitle":5,"description":6,"api":7,"html":8,"toc":9,"path":29,"tab":30,"group":31,"prev":32,"next":35,"markdownUrl":38,"sourceUrl":39,"lastModified":7},"Baseten Model APIs","Baseten","Baseten Model APIs as an OpenAI-compatible provider for Standard Agents",null,"\u003Caside class=\"docs-callout\" data-kind=\"info\" role=\"note\">\u003Cp>\u003Cstrong>Enabled when\u003C/strong> \u003Ccode>BASETEN_API_KEY\u003C/code> is set in your environment.\u003C/p>\u003C/aside>\n\u003Ch2 id=\"overview\">\u003Ca class=\"docs-anchor\" href=\"#overview\" aria-label=\"Link to this section\">\u003C/a>Overview\u003C/h2>\n\u003Cp>Baseten Model APIs expose managed LLMs through an OpenAI-compatible chat\ncompletions endpoint. The local \u003Ccode>baseten\u003C/code> provider uses Chat Completions request\ntranslation with Baseten-specific connection config, provider icon, and model\ndiscovery.\u003C/p>\n\u003Cdiv class=\"docs-card\">\u003Cspan class=\"docs-icon\" data-icon=\"server\">\u003C/span>\u003Cspan class=\"docs-card-title\">Key Features\u003C/span>\u003Cdiv class=\"docs-card-body\">\u003Cul>\n\u003Cli>OpenAI-compatible chat completions via \u003Ccode>https://inference.baseten.co/v1\u003C/code>\u003C/li>\n\u003Cli>Model discovery from Baseten's Model APIs catalog\u003C/li>\n\u003Cli>Catalog pricing copied to model definitions for request cost logs\u003C/li>\n\u003Cli>Tool calling, JSON mode, and streaming capability hints\u003C/li>\n\u003Cli>Baseten provider icon with lab-specific model icons when catalog IDs identify the maker\u003C/li>\n\u003C/ul>\u003C/div>\u003C/div>\n\u003Ch2 id=\"environment-setup\">\u003Ca class=\"docs-anchor\" href=\"#environment-setup\" aria-label=\"Link to this section\">\u003C/a>Environment Setup\u003C/h2>\n\u003Cfigure class=\"docs-code\" data-docs=\"code\" data-lang=\"bash\">\u003Cfigcaption class=\"docs-code-title\">.dev.vars\u003C/figcaption>\u003Cpre class=\"shiki shiki-themes one-light github-dark\" style=\"--shiki-light:#383A42;--shiki-dark:#e1e4e8;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#24292e\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#E45649;--shiki-dark:#E1E4E8\">BASETEN_API_KEY\u003C/span>\u003Cspan style=\"--shiki-light:#383A42;--shiki-dark:#F97583\">=\u003C/span>\u003Cspan style=\"--shiki-light:#50A14F;--shiki-dark:#9ECBFF\">...\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\u003C/figure>\n\u003Cp>The provider targets Baseten's public inference and model catalog APIs.\u003C/p>\n\u003Ch2 id=\"provider-definition\">\u003Ca class=\"docs-anchor\" href=\"#provider-definition\" aria-label=\"Link to this section\">\u003C/a>Provider Definition\u003C/h2>\n\u003Cp>The provider lives in \u003Ccode>agents/providers/baseten.ts\u003C/code> and is auto-discovered by\nStandard Agents Builder:\u003C/p>\n\u003Cfigure class=\"docs-code\" data-docs=\"code\" data-lang=\"typescript\">\u003Cpre class=\"shiki shiki-themes one-light github-dark\" style=\"--shiki-light:#383A42;--shiki-dark:#e1e4e8;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#24292e\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#A626A4;--shiki-dark:#F97583\">import\u003C/span>\u003Cspan style=\"--shiki-light:#383A42;--shiki-dark:#E1E4E8\"> { \u003C/span>\u003Cspan style=\"--shiki-light:#E45649;--shiki-dark:#E1E4E8\">defineModel\u003C/span>\u003Cspan style=\"--shiki-light:#383A42;--shiki-dark:#E1E4E8\"> } \u003C/span>\u003Cspan style=\"--shiki-light:#A626A4;--shiki-dark:#F97583\">from\u003C/span>\u003Cspan style=\"--shiki-light:#50A14F;--shiki-dark:#9ECBFF\"> '@standardagents/spec'\u003C/span>\u003Cspan style=\"--shiki-light:#383A42;--shiki-dark:#E1E4E8\">;\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#A626A4;--shiki-dark:#F97583\">import\u003C/span>\u003Cspan style=\"--shiki-light:#E45649;--shiki-dark:#E1E4E8\"> baseten\u003C/span>\u003Cspan style=\"--shiki-light:#A626A4;--shiki-dark:#F97583\"> from\u003C/span>\u003Cspan style=\"--shiki-light:#50A14F;--shiki-dark:#9ECBFF\"> '../providers/baseten'\u003C/span>\u003Cspan style=\"--shiki-light:#383A42;--shiki-dark:#E1E4E8\">;\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#A626A4;--shiki-dark:#F97583\">export\u003C/span>\u003Cspan style=\"--shiki-light:#E45649;--shiki-dark:#F97583\"> default\u003C/span>\u003Cspan style=\"--shiki-light:#4078F2;--shiki-dark:#B392F0\"> defineModel\u003C/span>\u003Cspan style=\"--shiki-light:#383A42;--shiki-dark:#E1E4E8\">({\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#E45649;--shiki-dark:#E1E4E8\">  name\u003C/span>\u003Cspan style=\"--shiki-light:#0184BC;--shiki-dark:#E1E4E8\">:\u003C/span>\u003Cspan style=\"--shiki-light:#50A14F;--shiki-dark:#9ECBFF\"> 'baseten_deepseek_v4_pro'\u003C/span>\u003Cspan style=\"--shiki-light:#383A42;--shiki-dark:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#E45649;--shiki-dark:#E1E4E8\">  provider\u003C/span>\u003Cspan style=\"--shiki-light:#0184BC;--shiki-dark:#E1E4E8\">:\u003C/span>\u003Cspan style=\"--shiki-light:#E45649;--shiki-dark:#E1E4E8\"> baseten\u003C/span>\u003Cspan style=\"--shiki-light:#383A42;--shiki-dark:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#E45649;--shiki-dark:#E1E4E8\">  model\u003C/span>\u003Cspan style=\"--shiki-light:#0184BC;--shiki-dark:#E1E4E8\">:\u003C/span>\u003Cspan style=\"--shiki-light:#50A14F;--shiki-dark:#9ECBFF\"> 'deepseek-ai/DeepSeek-V4-Pro'\u003C/span>\u003Cspan style=\"--shiki-light:#383A42;--shiki-dark:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#383A42;--shiki-dark:#E1E4E8\">});\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\u003C/figure>\n\u003Ch2 id=\"model-discovery\">\u003Ca class=\"docs-anchor\" href=\"#model-discovery\" aria-label=\"Link to this section\">\u003C/a>Model Discovery\u003C/h2>\n\u003Cp>The provider fetches available models from Baseten's management API:\u003C/p>\n\u003Cfigure class=\"docs-code\" data-docs=\"code\" data-lang=\"text\">\u003Cpre class=\"shiki shiki-themes one-light github-dark\" style=\"--shiki-light:#383A42;--shiki-dark:#e1e4e8;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#24292e\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>GET https://api.baseten.co/v1/model_apis\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\u003C/figure>\n\u003Cp>The returned Model API catalog supplies model names, descriptions, context\nwindows, and pricing metadata. The provider uses the catalog model name as the\nmodel identifier sent to chat completions. Catalog prices are parsed from\n\u003Ccode>cost_per_million_input_tokens\u003C/code> and \u003Ccode>cost_per_million_output_tokens\u003C/code> and stored\nas \u003Ccode>inputPrice\u003C/code> and \u003Ccode>outputPrice\u003C/code> on generated model definitions.\u003C/p>\n\u003Ch2 id=\"request-routing\">\u003Ca class=\"docs-anchor\" href=\"#request-routing\" aria-label=\"Link to this section\">\u003C/a>Request Routing\u003C/h2>\n\u003Cp>Generation and streaming are delegated to the Chat Completions implementation\nusing Baseten's inference base URL:\u003C/p>\n\u003Cfigure class=\"docs-code\" data-docs=\"code\" data-lang=\"text\">\u003Cpre class=\"shiki shiki-themes one-light github-dark\" style=\"--shiki-light:#383A42;--shiki-dark:#e1e4e8;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#24292e\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>POST https://inference.baseten.co/v1/chat/completions\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\u003C/figure>\n\u003Ch2 id=\"related\">\u003Ca class=\"docs-anchor\" href=\"#related\" aria-label=\"Link to this section\">\u003C/a>Related\u003C/h2>\n\u003Cdiv class=\"docs-card-group\" data-cols=\"2\">\u003Ca class=\"docs-card\" href=\"/docs/providers/openai\">\u003Cspan class=\"docs-icon\" data-icon=\"brain\">\u003C/span>\u003Cspan class=\"docs-card-title\">OpenAI Provider\u003C/span>\u003Cdiv class=\"docs-card-body\">\u003Cp>Compare with the first-party OpenAI provider\u003C/p>\u003C/div>\u003C/a>\u003Ca class=\"docs-card\" href=\"/docs/api-reference/define/provider\">\u003Cspan class=\"docs-icon\" data-icon=\"code\">\u003C/span>\u003Cspan class=\"docs-card-title\">defineProvider\u003C/span>\u003Cdiv class=\"docs-card-body\">\u003Cp>Provider extension API\u003C/p>\u003C/div>\u003C/a>\u003C/div>",[10,14,17,20,23,26],{"id":11,"text":12,"depth":13},"overview","Overview",2,{"id":15,"text":16,"depth":13},"environment-setup","Environment Setup",{"id":18,"text":19,"depth":13},"provider-definition","Provider Definition",{"id":21,"text":22,"depth":13},"model-discovery","Model Discovery",{"id":24,"text":25,"depth":13},"request-routing","Request Routing",{"id":27,"text":28,"depth":13},"related","Related","providers/baseten","docs","Providers",{"path":33,"title":34,"navTitle":34},"providers/anthropic","@standardagents/anthropic",{"path":36,"title":37,"navTitle":37},"providers/cloudflare","@standardagents/cloudflare","/docs/providers/baseten.md","https://github.com/standardagents/agentbuilder/blob/main/docs/providers/baseten.mdx",1794580509635]