Buckets:
| <meta charset="utf-8" /><meta name="hf:doc:metadata" content="{"title":"Hub API","local":"hub-api","sections":[{"title":"List models","local":"list-models","sections":[],"depth":2},{"title":"Get model status","local":"get-model-status","sections":[],"depth":2},{"title":"List OpenAI-compatible models","local":"list-openai-compatible-models","sections":[],"depth":2},{"title":"Get model providers","local":"get-model-providers","sections":[],"depth":2}],"depth":1}"/> | |
| <link href="/docs/inference-providers/pr_2713/en/_app/immutable/entry/start.Yrr5IqWF.js" rel="modulepreload"> | |
| <link href="/docs/inference-providers/pr_2713/en/_app/immutable/chunks/8egz5TIQ.js" rel="modulepreload"> | |
| <link href="/docs/inference-providers/pr_2713/en/_app/immutable/chunks/D1YZhoAV.js" rel="modulepreload"> | |
| <link href="/docs/inference-providers/pr_2713/en/_app/immutable/entry/app.DLm95-7q.js" rel="modulepreload"> | |
| <link href="/docs/inference-providers/pr_2713/en/_app/immutable/chunks/Bee_Vm2K.js" rel="modulepreload"> | |
| <link href="/docs/inference-providers/pr_2713/en/_app/immutable/chunks/gYW7_7FM.js" rel="modulepreload"> | |
| <link href="/docs/inference-providers/pr_2713/en/_app/immutable/chunks/CGX_pgXJ.js" rel="modulepreload"> | |
| <link href="/docs/inference-providers/pr_2713/en/_app/immutable/chunks/DsnmJJEf.js" rel="modulepreload"> | |
| <link href="/docs/inference-providers/pr_2713/en/_app/immutable/nodes/0._NE7fJvp.js" rel="modulepreload"> | |
| <link href="/docs/inference-providers/pr_2713/en/_app/immutable/chunks/B5z72ZVn.js" rel="modulepreload"> | |
| <link href="/docs/inference-providers/pr_2713/en/_app/immutable/nodes/12.DhvyKpJg.js" rel="modulepreload"> | |
| <link href="/docs/inference-providers/pr_2713/en/_app/immutable/chunks/9o5l2gGg.js" rel="modulepreload"> | |
| <!--e3lg0d--><meta name="hf:doc:metadata" content="{"title":"Hub API","local":"hub-api","sections":[{"title":"List models","local":"list-models","sections":[],"depth":2},{"title":"Get model status","local":"get-model-status","sections":[],"depth":2},{"title":"List OpenAI-compatible models","local":"list-openai-compatible-models","sections":[],"depth":2},{"title":"Get model providers","local":"get-model-providers","sections":[],"depth":2}],"depth":1}"/><!----> | |
| <link href="/docs/inference-providers/pr_2713/en/_app/immutable/assets/0.tn0RQdqM.css" rel="modulepreload"> <!--[--><!--[0--><!--[--><!--[0--><!--[--><p></p> <div class="items-center shrink-0 min-w-[100px] max-sm:min-w-[50px] justify-end ml-auto flex" style="float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"><div class="inline-flex rounded-md max-sm:rounded-sm"><button class="inline-flex items-center gap-1 h-7 max-sm:h-7 px-2 max-sm:px-1.5 text-sm font-medium text-gray-800 border border-r-0 rounded-l-md max-sm:rounded-l-sm border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-live="polite"><span class="inline-flex items-center justify-center rounded-md p-0.5 max-sm:p-0 hover:text-gray-800 dark:hover:text-gray-200"><svg class="sm:size-3.5 size-3" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----></span> <span>Copy page</span></button> <button class="inline-flex items-center justify-center w-6 max-sm:w-5 h-7 max-sm:h-7 disabled:pointer-events-none text-sm text-gray-500 hover:text-gray-700 dark:hover:text-white rounded-r-md max-sm:rounded-r-sm border border-l transition border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-haspopup="menu" aria-expanded="false" aria-label="Open copy menu"><svg class="transition-transform text-gray-400 overflow-visible sm:size-3.5 size-3 rotate-0" width="1em" height="1em" viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L6 6L11 1" stroke="currentColor"></path></svg><!----></button></div> <!--[-1--><!--]--></div><!----> <!--[0--><h1 class="relative group"><a id="hub-api" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#hub-api"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span>Hub API</span></h1><!--]--><!----> <p>The Hub provides a few APIs to interact with Inference Providers. Here is a list of them:</p> <!--[1--><h2 class="relative group"><a id="list-models" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#list-models"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span>List models</span></h2><!--]--><!----> <p>To list models powered by a provider, use the <code>inference_provider</code> query parameter:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> Copied</div><!----></button><!----></div> <pre class="language-sh "><!----><span class="hljs-comment"># List all models served by Fireworks AI</span> | |
| ~ curl -s https://huggingface.co/api/models?inference_provider=fireworks-ai | jq <span class="hljs-string">".[].id"</span> | |
| <span class="hljs-string">"deepseek-ai/DeepSeek-V3-0324"</span> | |
| <span class="hljs-string">"deepseek-ai/DeepSeek-R1"</span> | |
| <span class="hljs-string">"Qwen/QwQ-32B"</span> | |
| <span class="hljs-string">"deepseek-ai/DeepSeek-V3"</span> | |
| ...<!----></pre></div><!----> <p>It can be combined with other filters to e.g. select only <code>text-to-image</code> models:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> Copied</div><!----></button><!----></div> <pre class="language-sh "><!----><span class="hljs-comment"># List text-to-image models served by Fal AI</span> | |
| ~ curl -s https://huggingface.co/api/models?inference_provider=fal-ai&pipeline_tag=text-to-image | jq <span class="hljs-string">".[].id"</span> | |
| <span class="hljs-string">"black-forest-labs/FLUX.1-dev"</span> | |
| <span class="hljs-string">"stabilityai/stable-diffusion-3.5-large"</span> | |
| <span class="hljs-string">"black-forest-labs/FLUX.1-schnell"</span> | |
| <span class="hljs-string">"stabilityai/stable-diffusion-3.5-large-turbo"</span> | |
| ...<!----></pre></div><!----> <p>Pass a comma-separated list of providers to select multiple:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> Copied</div><!----></button><!----></div> <pre class="language-sh "><!----><span class="hljs-comment"># List image-text-to-text models served by Novita or Nscale</span> | |
| ~ curl -s https://huggingface.co/api/models?inference_provider=nscale,novita&pipeline_tag=image-text-to-text | jq <span class="hljs-string">".[].id"</span> | |
| <span class="hljs-string">"meta-llama/Llama-3.2-11B-Vision-Instruct"</span> | |
| <span class="hljs-string">"meta-llama/Llama-3.2-90B-Vision-Instruct"</span> | |
| <span class="hljs-string">"Qwen/Qwen2-VL-72B-Instruct"</span><!----></pre></div><!----> <p>Finally, you can select all models served by at least one inference provider:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> Copied</div><!----></button><!----></div> <pre class="language-sh "><!----><span class="hljs-comment"># List text-to-video models served by any provider</span> | |
| ~ curl -s https://huggingface.co/api/models?inference_provider=all&pipeline_tag=text-to-video | jq <span class="hljs-string">".[].id"</span> | |
| <span class="hljs-string">"Wan-AI/Wan2.1-T2V-14B"</span> | |
| <span class="hljs-string">"Lightricks/LTX-Video"</span> | |
| <span class="hljs-string">"tencent/HunyuanVideo"</span> | |
| <span class="hljs-string">"Wan-AI/Wan2.1-T2V-1.3B"</span> | |
| <span class="hljs-string">"THUDM/CogVideoX-5b"</span> | |
| <span class="hljs-string">"genmo/mochi-1-preview"</span> | |
| <span class="hljs-string">"BagOu22/Lora_HKLPAZ"</span><!----></pre></div><!----> <p>The same filters are available from the terminal with the <a href="https://huggingface.co/docs/huggingface_hub/package_reference/cli#hf-models-list" rel="nofollow"><code>hf</code> CLI</a>:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> Copied</div><!----></button><!----></div> <pre class="language-bash "><!----><span class="hljs-comment"># List models served by at least one inference provider</span> | |
| hf models <span class="hljs-built_in">ls</span> --warm | |
| <span class="hljs-comment"># Search served models for GLM-5.2</span> | |
| hf models <span class="hljs-built_in">ls</span> --warm --search GLM-5.2 | |
| <span class="hljs-comment"># List text-to-image models served by Fal AI</span> | |
| hf models <span class="hljs-built_in">ls</span> --inference-provider fal-ai --pipeline-tag text-to-image | |
| <span class="hljs-comment"># List models served by Fireworks AI, most downloaded first</span> | |
| hf models <span class="hljs-built_in">ls</span> --inference-provider fireworks-ai --<span class="hljs-built_in">sort</span> downloads<!----></pre></div><!----> <p>Repeat <code>--inference-provider</code> to match models served by any of several providers. Add <code>--expand inferenceProviderMapping</code> to see which provider serves each model and the provider-specific model id, or <code>--json</code> for machine-readable output.</p> <!--[1--><h2 class="relative group"><a id="get-model-status" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#get-model-status"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span>Get model status</span></h2><!--]--><!----> <p>To find an inference provider for a specific model, request the <code>inference</code> attribute in the model info endpoint:</p> <div class="flex space-x-2 items-center my-1.5 mr-8 h-7 !pl-0 -mx-3 md:mx-0"><!--[--><div class="flex items-center border rounded-lg px-1.5 py-1 leading-none select-none text-smd border-gray-800 bg-black dark:bg-gray-700 text-white"><!--[--><svg class="mr-1.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M15.84.5a16.4,16.4,0,0,0-3.57.32C9.1,1.39,8.53,2.53,8.53,4.64V7.48H16v1H5.77a4.73,4.73,0,0,0-4.7,3.74,14.82,14.82,0,0,0,0,7.54c.57,2.28,1.86,3.82,4,3.82h2.6V20.14a4.73,4.73,0,0,1,4.63-4.63h7.38a3.72,3.72,0,0,0,3.73-3.73V4.64A4.16,4.16,0,0,0,19.65.82,20.49,20.49,0,0,0,15.84.5ZM11.78,2.77a1.39,1.39,0,0,1,1.38,1.46,1.37,1.37,0,0,1-1.38,1.38A1.42,1.42,0,0,1,10.4,4.23,1.44,1.44,0,0,1,11.78,2.77Z" fill="#5a9fd4"></path><path d="M16.16,31.5a16.4,16.4,0,0,0,3.57-.32c3.17-.57,3.74-1.71,3.74-3.82V24.52H16v-1H26.23a4.73,4.73,0,0,0,4.7-3.74,14.82,14.82,0,0,0,0-7.54c-.57-2.28-1.86-3.82-4-3.82h-2.6v3.41a4.73,4.73,0,0,1-4.63,4.63H12.35a3.72,3.72,0,0,0-3.73,3.73v7.14a4.16,4.16,0,0,0,3.73,3.82A20.49,20.49,0,0,0,16.16,31.5Zm4.06-2.27a1.39,1.39,0,0,1-1.38-1.46,1.37,1.37,0,0,1,1.38-1.38,1.42,1.42,0,0,1,1.38,1.38A1.44,1.44,0,0,1,20.22,29.23Z" fill="#ffd43b"></path></svg><!--]--> Python</div><div class="flex items-center border rounded-lg px-1.5 py-1 leading-none select-none text-smd text-gray-500 cursor-pointer opacity-90 hover:text-gray-700 dark:hover:text-gray-200 hover:shadow-sm"><!--[--><svg class="mr-1.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><rect width="32" height="32" rx="4" fill="#1683a5"></rect><path d="M6.71,14A5,5,0,0,1,8.82,9.29l2.64-2.2c1.67-1.37,2.52-1.41,4.6-1.41H21.7c1.19,0,2.45.27,2.45,1.79s-1.4,1.78-2.45,1.78H15.44a3.31,3.31,0,0,0-2,.89L11.24,12c-.55.44-1,.81-1,1.52v4.41c0,.7.41,1.07,1,1.52l2.16,1.82a3.34,3.34,0,0,0,2,.89H21.7c1.05,0,2.45.23,2.45,1.78s-1.26,1.78-2.45,1.78H16.06c-2.08,0-2.94,0-4.6-1.4L8.82,22.09A5.05,5.05,0,0,1,6.71,17.4Z" fill="#fff"></path></svg><!--]--> cURL</div><!--]--></div> <div class="language-select"><!--[0--><!--[--><p>In the <code>huggingface_hub</code>, use <code>model_info</code> with the expand parameter:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> Copied</div><!----></button><!----></div> <pre class="language-py "><!----><span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> model_info | |
| <span class="hljs-meta">>>> </span>info = model_info(<span class="hljs-string">"google/gemma-3-27b-it"</span>, expand=<span class="hljs-string">"inference"</span>) | |
| <span class="hljs-meta">>>> </span>info.inference | |
| <span class="hljs-string">'warm'</span><!----></pre></div><!----><!----><!--]--><!--]--> <!--[-1--><!--]--> <!--[-1--><!--]--></div><!----> <p>Inference status is either “warm” or undefined:</p> <div class="flex space-x-2 items-center my-1.5 mr-8 h-7 !pl-0 -mx-3 md:mx-0"><!--[--><div class="flex items-center border rounded-lg px-1.5 py-1 leading-none select-none text-smd border-gray-800 bg-black dark:bg-gray-700 text-white"><!--[--><svg class="mr-1.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M15.84.5a16.4,16.4,0,0,0-3.57.32C9.1,1.39,8.53,2.53,8.53,4.64V7.48H16v1H5.77a4.73,4.73,0,0,0-4.7,3.74,14.82,14.82,0,0,0,0,7.54c.57,2.28,1.86,3.82,4,3.82h2.6V20.14a4.73,4.73,0,0,1,4.63-4.63h7.38a3.72,3.72,0,0,0,3.73-3.73V4.64A4.16,4.16,0,0,0,19.65.82,20.49,20.49,0,0,0,15.84.5ZM11.78,2.77a1.39,1.39,0,0,1,1.38,1.46,1.37,1.37,0,0,1-1.38,1.38A1.42,1.42,0,0,1,10.4,4.23,1.44,1.44,0,0,1,11.78,2.77Z" fill="#5a9fd4"></path><path d="M16.16,31.5a16.4,16.4,0,0,0,3.57-.32c3.17-.57,3.74-1.71,3.74-3.82V24.52H16v-1H26.23a4.73,4.73,0,0,0,4.7-3.74,14.82,14.82,0,0,0,0-7.54c-.57-2.28-1.86-3.82-4-3.82h-2.6v3.41a4.73,4.73,0,0,1-4.63,4.63H12.35a3.72,3.72,0,0,0-3.73,3.73v7.14a4.16,4.16,0,0,0,3.73,3.82A20.49,20.49,0,0,0,16.16,31.5Zm4.06-2.27a1.39,1.39,0,0,1-1.38-1.46,1.37,1.37,0,0,1,1.38-1.38,1.42,1.42,0,0,1,1.38,1.38A1.44,1.44,0,0,1,20.22,29.23Z" fill="#ffd43b"></path></svg><!--]--> Python</div><div class="flex items-center border rounded-lg px-1.5 py-1 leading-none select-none text-smd text-gray-500 cursor-pointer opacity-90 hover:text-gray-700 dark:hover:text-gray-200 hover:shadow-sm"><!--[--><svg class="mr-1.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><rect width="32" height="32" rx="4" fill="#1683a5"></rect><path d="M6.71,14A5,5,0,0,1,8.82,9.29l2.64-2.2c1.67-1.37,2.52-1.41,4.6-1.41H21.7c1.19,0,2.45.27,2.45,1.79s-1.4,1.78-2.45,1.78H15.44a3.31,3.31,0,0,0-2,.89L11.24,12c-.55.44-1,.81-1,1.52v4.41c0,.7.41,1.07,1,1.52l2.16,1.82a3.34,3.34,0,0,0,2,.89H21.7c1.05,0,2.45.23,2.45,1.78s-1.26,1.78-2.45,1.78H16.06c-2.08,0-2.94,0-4.6-1.4L8.82,22.09A5.05,5.05,0,0,1,6.71,17.4Z" fill="#fff"></path></svg><!--]--> cURL</div><!--]--></div> <div class="language-select"><!--[0--><!--[--><p>In the <code>huggingface_hub</code>, use <code>model_info</code> with the expand parameter:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> Copied</div><!----></button><!----></div> <pre class="language-py "><!----><span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> model_info | |
| <span class="hljs-meta">>>> </span>info = model_info(<span class="hljs-string">"manycore-research/SpatialLM-Llama-1B"</span>, expand=<span class="hljs-string">"inference"</span>) | |
| <span class="hljs-meta">>>> </span>info.inference | |
| <span class="hljs-literal">None</span><!----></pre></div><!----><!----><!--]--><!--]--> <!--[-1--><!--]--> <!--[-1--><!--]--></div><!----> <!--[1--><h2 class="relative group"><a id="list-openai-compatible-models" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#list-openai-compatible-models"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span>List OpenAI-compatible models</span></h2><!--]--><!----> <p>The router exposes an OpenAI-compatible endpoint to list chat-completion models served by Inference Providers, together with provider metadata used for routing and comparison:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> Copied</div><!----></button><!----></div> <pre class="language-sh "><!---->~ curl -s https://router.huggingface.co/v1/models | jq <span class="hljs-string">'.data'</span> | |
| { | |
| <span class="hljs-string">"id"</span>: <span class="hljs-string">"deepseek-ai/DeepSeek-V4-Pro"</span>, | |
| <span class="hljs-string">"object"</span>: <span class="hljs-string">"model"</span>, | |
| <span class="hljs-string">"created"</span>: 1776837885, | |
| <span class="hljs-string">"owned_by"</span>: <span class="hljs-string">"deepseek-ai"</span>, | |
| <span class="hljs-string">"architecture"</span>: { | |
| <span class="hljs-string">"input_modalities"</span>: [ | |
| <span class="hljs-string">"text"</span> | |
| ], | |
| <span class="hljs-string">"output_modalities"</span>: [ | |
| <span class="hljs-string">"text"</span> | |
| ] | |
| }, | |
| <span class="hljs-string">"providers"</span>: [ | |
| { | |
| <span class="hljs-string">"provider"</span>: <span class="hljs-string">"novita"</span>, | |
| <span class="hljs-string">"status"</span>: <span class="hljs-string">"live"</span>, | |
| <span class="hljs-string">"context_length"</span>: 1048576, | |
| <span class="hljs-string">"pricing"</span>: { | |
| <span class="hljs-string">"input"</span>: 1.69, | |
| <span class="hljs-string">"output"</span>: 3.38 | |
| }, | |
| <span class="hljs-string">"supports_tools"</span>: <span class="hljs-literal">true</span>, | |
| <span class="hljs-string">"supports_structured_output"</span>: <span class="hljs-literal">false</span>, | |
| <span class="hljs-string">"first_token_latency_ms"</span>: 1490, | |
| <span class="hljs-string">"throughput"</span>: 24.69124008437934, | |
| <span class="hljs-string">"is_model_author"</span>: <span class="hljs-literal">false</span> | |
| }, | |
| { | |
| <span class="hljs-string">"provider"</span>: <span class="hljs-string">"together"</span>, | |
| <span class="hljs-string">"status"</span>: <span class="hljs-string">"live"</span>, | |
| <span class="hljs-string">"context_length"</span>: 512000, | |
| <span class="hljs-string">"pricing"</span>: { | |
| <span class="hljs-string">"input"</span>: 2.1, | |
| <span class="hljs-string">"output"</span>: 4.4 | |
| }, | |
| <span class="hljs-string">"supports_tools"</span>: <span class="hljs-literal">true</span>, | |
| <span class="hljs-string">"supports_structured_output"</span>: <span class="hljs-literal">true</span>, | |
| <span class="hljs-string">"first_token_latency_ms"</span>: 611, | |
| <span class="hljs-string">"throughput"</span>: 40.13113557470821, | |
| <span class="hljs-string">"is_model_author"</span>: <span class="hljs-literal">false</span> | |
| }, | |
| { | |
| <span class="hljs-string">"provider"</span>: <span class="hljs-string">"fireworks-ai"</span>, | |
| <span class="hljs-string">"status"</span>: <span class="hljs-string">"live"</span>, | |
| <span class="hljs-string">"context_length"</span>: 1048576, | |
| <span class="hljs-string">"supports_tools"</span>: <span class="hljs-literal">true</span>, | |
| <span class="hljs-string">"supports_structured_output"</span>: <span class="hljs-literal">true</span>, | |
| <span class="hljs-string">"first_token_latency_ms"</span>: 588.4, | |
| <span class="hljs-string">"throughput"</span>: 45.42948747753918, | |
| <span class="hljs-string">"is_model_author"</span>: <span class="hljs-literal">false</span> | |
| }, | |
| { | |
| <span class="hljs-string">"provider"</span>: <span class="hljs-string">"featherless-ai"</span>, | |
| <span class="hljs-string">"status"</span>: <span class="hljs-string">"live"</span>, | |
| <span class="hljs-string">"is_model_author"</span>: <span class="hljs-literal">false</span> | |
| }, | |
| { | |
| <span class="hljs-string">"provider"</span>: <span class="hljs-string">"deepinfra"</span>, | |
| <span class="hljs-string">"status"</span>: <span class="hljs-string">"live"</span>, | |
| <span class="hljs-string">"context_length"</span>: 65536, | |
| <span class="hljs-string">"pricing"</span>: { | |
| <span class="hljs-string">"input"</span>: 1.74, | |
| <span class="hljs-string">"output"</span>: 3.48 | |
| }, | |
| <span class="hljs-string">"supports_tools"</span>: <span class="hljs-literal">true</span>, | |
| <span class="hljs-string">"supports_structured_output"</span>: <span class="hljs-literal">true</span>, | |
| <span class="hljs-string">"first_token_latency_ms"</span>: 525.8, | |
| <span class="hljs-string">"throughput"</span>: 34.615908579189465, | |
| <span class="hljs-string">"is_model_author"</span>: <span class="hljs-literal">false</span> | |
| } | |
| ] | |
| } | |
| ...<!----></pre></div><!----> <p>To retrieve a single model, append its model id to the endpoint:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> Copied</div><!----></button><!----></div> <pre class="language-sh "><!---->~ curl -s https://router.huggingface.co/v1/models/deepseek-ai/DeepSeek-V4-Pro | jq <span class="hljs-string">'.'</span><!----></pre></div><!----> <p>Each provider entry may include the following fields:</p> <table><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>provider</code></td><td>string</td><td>Provider identifier</td></tr><tr><td><code>status</code></td><td>string</td><td><code>live</code> or <code>error</code></td></tr><tr><td><code>context_length</code></td><td>number</td><td>Maximum context length supported by this provider for the model, when available</td></tr><tr><td><code>pricing</code></td><td>object</td><td><code>input</code> and <code>output</code> prices in USD per million tokens, when available</td></tr><tr><td><code>is_free</code></td><td>boolean</td><td>Whether the model is currently free of charge on this provider (temporary promo), when applicable</td></tr><tr><td><code>supports_tools</code></td><td>boolean</td><td>Whether the provider supports tool calling, when available</td></tr><tr><td><code>supports_structured_output</code></td><td>boolean</td><td>Whether the provider supports structured output, when available</td></tr><tr><td><code>first_token_latency_ms</code></td><td>number</td><td>Time to first token in milliseconds from the latest validation probe, when available</td></tr><tr><td><code>throughput</code></td><td>number</td><td>Output throughput in tokens per second from the latest validation probe, when available</td></tr><tr><td><code>is_model_author</code></td><td>boolean</td><td>Whether the model was published by this provider</td></tr></tbody></table> <p>These metrics are the same provider performance signals shown in the <a href="https://huggingface.co/inference/models" rel="nofollow">provider comparison table</a>. They are optional because some providers or models may not have the latest probe data available.</p> <!--[1--><h2 class="relative group"><a id="get-model-providers" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#get-model-providers"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span>Get model providers</span></h2><!--]--><!----> <p>If you are interested by a specific model and want to check the list of providers serving it, you can request the <code>inferenceProviderMapping</code> attribute in the model info endpoint:</p> <div class="flex space-x-2 items-center my-1.5 mr-8 h-7 !pl-0 -mx-3 md:mx-0"><!--[--><div class="flex items-center border rounded-lg px-1.5 py-1 leading-none select-none text-smd border-gray-800 bg-black dark:bg-gray-700 text-white"><!--[--><svg class="mr-1.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M15.84.5a16.4,16.4,0,0,0-3.57.32C9.1,1.39,8.53,2.53,8.53,4.64V7.48H16v1H5.77a4.73,4.73,0,0,0-4.7,3.74,14.82,14.82,0,0,0,0,7.54c.57,2.28,1.86,3.82,4,3.82h2.6V20.14a4.73,4.73,0,0,1,4.63-4.63h7.38a3.72,3.72,0,0,0,3.73-3.73V4.64A4.16,4.16,0,0,0,19.65.82,20.49,20.49,0,0,0,15.84.5ZM11.78,2.77a1.39,1.39,0,0,1,1.38,1.46,1.37,1.37,0,0,1-1.38,1.38A1.42,1.42,0,0,1,10.4,4.23,1.44,1.44,0,0,1,11.78,2.77Z" fill="#5a9fd4"></path><path d="M16.16,31.5a16.4,16.4,0,0,0,3.57-.32c3.17-.57,3.74-1.71,3.74-3.82V24.52H16v-1H26.23a4.73,4.73,0,0,0,4.7-3.74,14.82,14.82,0,0,0,0-7.54c-.57-2.28-1.86-3.82-4-3.82h-2.6v3.41a4.73,4.73,0,0,1-4.63,4.63H12.35a3.72,3.72,0,0,0-3.73,3.73v7.14a4.16,4.16,0,0,0,3.73,3.82A20.49,20.49,0,0,0,16.16,31.5Zm4.06-2.27a1.39,1.39,0,0,1-1.38-1.46,1.37,1.37,0,0,1,1.38-1.38,1.42,1.42,0,0,1,1.38,1.38A1.44,1.44,0,0,1,20.22,29.23Z" fill="#ffd43b"></path></svg><!--]--> Python</div><div class="flex items-center border rounded-lg px-1.5 py-1 leading-none select-none text-smd text-gray-500 cursor-pointer opacity-90 hover:text-gray-700 dark:hover:text-gray-200 hover:shadow-sm"><!--[--><svg class="mr-1.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><rect width="32" height="32" rx="4" fill="#1683a5"></rect><path d="M6.71,14A5,5,0,0,1,8.82,9.29l2.64-2.2c1.67-1.37,2.52-1.41,4.6-1.41H21.7c1.19,0,2.45.27,2.45,1.79s-1.4,1.78-2.45,1.78H15.44a3.31,3.31,0,0,0-2,.89L11.24,12c-.55.44-1,.81-1,1.52v4.41c0,.7.41,1.07,1,1.52l2.16,1.82a3.34,3.34,0,0,0,2,.89H21.7c1.05,0,2.45.23,2.45,1.78s-1.26,1.78-2.45,1.78H16.06c-2.08,0-2.94,0-4.6-1.4L8.82,22.09A5.05,5.05,0,0,1,6.71,17.4Z" fill="#fff"></path></svg><!--]--> cURL</div><!--]--></div> <div class="language-select"><!--[0--><!--[--><p>In the <code>huggingface_hub</code>, use <code>model_info</code> with the expand parameter:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> Copied</div><!----></button><!----></div> <pre class="language-py "><!----><span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> model_info | |
| <span class="hljs-meta">>>> </span>info = model_info(<span class="hljs-string">"google/gemma-3-27b-it"</span>, expand=<span class="hljs-string">"inferenceProviderMapping"</span>) | |
| <span class="hljs-meta">>>> </span>info.inference_provider_mapping | |
| { | |
| <span class="hljs-string">'featherless-ai'</span>: InferenceProviderMapping(status=<span class="hljs-string">'live'</span>, provider_id=<span class="hljs-string">'google/gemma-3-27b-it'</span>, task=<span class="hljs-string">'conversational'</span>), | |
| <span class="hljs-string">'scaleway'</span>: InferenceProviderMapping(status=<span class="hljs-string">'live'</span>, provider_id=<span class="hljs-string">'google/gemma-3-27b-it-fast'</span>, task=<span class="hljs-string">'conversational'</span>), | |
| }<!----></pre></div><!----><!----><!--]--><!--]--> <!--[-1--><!--]--> <!--[-1--><!--]--></div><!----> <p>Each provider serving the model shows a status (<code>staging</code> or <code>live</code>), the related task (here, <code>conversational</code>) and the providerId. In practice, this information is relevant for the JS and Python clients.</p> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/huggingface/hub-docs/blob/main/docs/inference-providers/hub-api.md" target="_blank"><svg class="mr-1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M31,16l-7,7l-1.41-1.41L28.17,16l-5.58-5.59L24,9l7,7z"></path><path d="M1,16l7-7l1.41,1.41L3.83,16l5.58,5.59L8,23l-7-7z"></path><path d="M12.419,25.484L17.639,6.552l1.932,0.518L14.351,26.002z"></path></svg><!----> <span><span class="underline">Update</span> on GitHub</span></a><!----> <p></p><!--]--><!----><!--]--><!--]--><!--]--> <!--[-1--><!--]--><!--]--> | |
| <script> | |
| { | |
| __sveltekit_1hi8cnu = { | |
| base: "/docs/inference-providers/pr_2713/en", | |
| assets: "/docs/inference-providers/pr_2713/en" | |
| }; | |
| const element = document.currentScript.parentElement; | |
| Promise.all([ | |
| import("/docs/inference-providers/pr_2713/en/_app/immutable/entry/start.Yrr5IqWF.js"), | |
| import("/docs/inference-providers/pr_2713/en/_app/immutable/entry/app.DLm95-7q.js") | |
| ]).then(([kit, app]) => { | |
| kit.start(app, element, { | |
| node_ids: [0, 12], | |
| data: [null,null], | |
| form: null, | |
| error: null | |
| }); | |
| }); | |
| } | |
| </script> | |
Xet Storage Details
- Size:
- 45.4 kB
- Xet hash:
- 625e06736318c9a02273289fbce80057990b83faf96210d579d447f288705b04
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.