import{S as Br,i as Mr,s as Fr,e as o,k as f,w as pe,t as i,M as qr,c as a,d as r,m as h,a as n,x as de,h as s,b as l,N as nr,f as ft,G as e,g as u,y as me,q as ge,o as ve,B as _e,v as zr}from"../chunks/vendor-hf-doc-builder.js";import{T as Or}from"../chunks/Tip-hf-doc-builder.js";import{I as Fe}from"../chunks/IconCopyLink-hf-doc-builder.js";function jr(ye){let p,k,d,y,I;return{c(){p=o("p"),k=i("The Inference API is free to use, and rate limited. If you need an inference solution for production, check out our "),d=o("a"),y=i("Inference Endpoints"),I=i(" service. With Inference Endpoints, you can easily deploy any machine learning model on dedicated and fully managed infrastructure. Select the cloud, region, compute instance, autoscaling range and security level to match your model, latency, throughput, and compliance needs."),this.h()},l(v){p=a(v,"P",{});var m=n(p);k=s(m,"The Inference API is free to use, and rate limited. If you need an inference solution for production, check out our "),d=a(m,"A",{href:!0,rel:!0});var $=n(d);y=s($,"Inference Endpoints"),$.forEach(r),I=s(m," service. With Inference Endpoints, you can easily deploy any machine learning model on dedicated and fully managed infrastructure. Select the cloud, region, compute instance, autoscaling range and security level to match your model, latency, throughput, and compliance needs."),m.forEach(r),this.h()},h(){l(d,"href","https://huggingface.co/docs/inference-endpoints/index"),l(d,"rel","nofollow")},m(v,m){u(v,p,m),e(p,k),e(p,d),e(d,y),e(p,I)},d(v){v&&r(p)}}}function Dr(ye){let p,k,d,y,I,v,m,$,X,G,A,J,R,E,U;return{c(){p=o("p"),k=i("Please note however, that these models will not allow you ("),d=o("a"),y=i("tracking issue"),I=i("):"),v=f(),m=o("ul"),$=o("li"),X=i("To get full optimization"),G=f(),A=o("li"),J=i("To run private models"),R=f(),E=o("li"),U=i("To get access to GPU inference"),this.h()},l(g){p=a(g,"P",{});var _=n(p);k=s(_,"Please note however, that these models will not allow you ("),d=a(_,"A",{href:!0,rel:!0});var C=n(d);y=s(C,"tracking issue"),C.forEach(r),I=s(_,"):"),_.forEach(r),v=h(g),m=a(g,"UL",{});var b=n(m);$=a(b,"LI",{});var we=n($);X=s(we,"To get full optimization"),we.forEach(r),G=h(b),A=a(b,"LI",{});var O=n(A);J=s(O,"To run private models"),O.forEach(r),R=h(b),E=a(b,"LI",{});var $e=n(E);U=s($e,"To get access to GPU inference"),$e.forEach(r),b.forEach(r),this.h()},h(){l(d,"href","https://github.com/huggingface/huggingface_hub/issues/85"),l(d,"rel","nofollow")},m(g,_){u(g,p,_),e(p,k),e(p,d),e(d,y),e(p,I),u(g,v,_),u(g,m,_),e(m,$),e($,X),e(m,G),e(m,A),e(A,J),e(m,R),e(m,E),e(E,U)},d(g){g&&r(p),g&&r(v),g&&r(m)}}}function Qr(ye){let p,k,d,y,I,v,m,$,X,G,A,J,R,E,U,g,_,C,b,we,O,$e,qe,w,K,ht,ke,ut,pt,dt,Ae,mt,gt,V,vt,Pe,_t,yt,wt,Ee,$t,Te,Et,bt,Se,It,kt,Y,At,xe,Pt,Tt,ze,S,B,Le,Z,St,Ne,xt,je,M,ee,te,Lt,re,Nt,Ht,Gt,x,F,oe,Rt,Ut,ae,Ct,Ot,Bt,be,ne,Mt,Ft,qt,q,le,zt,jt,ie,Dt,Qt,Wt,He,se,Xt,ce,Jt,Kt,De,z,Qe,L,j,Ge,fe,Vt,Re,Yt,We,N,T,lr,Zt,Xe,Je,H,D,Ue,he,er,Ce,tr,Ke,Q,ir,Ve,W,sr,Ye;return v=new Fe({}),E=new Or({props:{$$slots:{default:[jr]},$$scope:{ctx:ye}}}),b=new Fe({}),Z=new Fe({}),z=new Or({props:{warning:!0,$$slots:{default:[Dr]},$$scope:{ctx:ye}}}),fe=new Fe({}),he=new Fe({}),{c(){p=o("meta"),k=f(),d=o("h1"),y=o("a"),I=o("span"),pe(v.$$.fragment),m=f(),$=o("span"),X=i("\u{1F917} Hosted Inference API"),G=f(),A=o("p"),J=i("Test and evaluate, for free, over 80,000 publicly accessible machine learning models, or your own private models, via simple HTTP requests, with fast inference hosted on Hugging Face shared infrastructure."),R=f(),pe(E.$$.fragment),U=f(),g=o("h2"),_=o("a"),C=o("span"),pe(b.$$.fragment),we=f(),O=o("span"),$e=i("Main features:"),qe=f(),w=o("ul"),K=o("li"),ht=i("Get predictions from "),ke=o("strong"),ut=i("80,000+ Transformers models"),pt=i(" (T5, Blenderbot, Bart, GPT-2, Pegasus...)"),dt=f(),Ae=o("li"),mt=i("Switch from one model to the next by just switching the model ID"),gt=f(),V=o("li"),vt=i("Use built-in integrations with "),Pe=o("strong"),_t=i("over 20 Open-Source libraries"),yt=i(" (spaCy, SpeechBrain, etc)."),wt=f(),Ee=o("li"),$t=i("Upload, manage and serve your "),Te=o("strong"),Et=i("own models privately"),bt=f(),Se=o("li"),It=i("Run Classification, Image Segmentation, Automatic Speech Recognition, NER, Conversational, Summarization, Translation, Question-Answering, Embeddings Extraction tasks"),kt=f(),Y=o("li"),At=i("Out of the box accelerated inference on "),xe=o("strong"),Pt=i("CPU"),Tt=i(" powered by Intel Xeon Ice Lake"),ze=f(),S=o("h2"),B=o("a"),Le=o("span"),pe(Z.$$.fragment),St=f(),Ne=o("span"),xt=i("Third-party library models:"),je=f(),M=o("ul"),ee=o("li"),te=o("p"),Lt=i("The "),re=o("a"),Nt=i("Hub"),Ht=i(" now supports many new libraries:"),Gt=f(),x=o("ul"),F=o("li"),oe=o("a"),Rt=i("SpaCy"),Ut=i(", "),ae=o("a"),Ct=i("AllenNLP"),Ot=i(","),Bt=f(),be=o("li"),ne=o("a"),Mt=i("Speechbrain"),Ft=i(","),qt=f(),q=o("li"),le=o("a"),zt=i("Timm"),jt=i(" and "),ie=o("a"),Dt=i("many others"),Qt=i("\u2026"),Wt=f(),He=o("li"),se=o("p"),Xt=i("Those models are enabled on the API thanks to some docker integration "),ce=o("a"),Jt=i("api-inference-community"),Kt=i("."),De=f(),pe(z.$$.fragment),Qe=f(),L=o("h2"),j=o("a"),Ge=o("span"),pe(fe.$$.fragment),Vt=f(),Re=o("span"),Yt=i("If you are looking for custom support from the Hugging Face team"),We=f(),N=o("a"),T=o("img"),Zt=f(),Xe=o("br"),Je=f(),H=o("h2"),D=o("a"),Ue=o("span"),pe(he.$$.fragment),er=f(),Ce=o("span"),tr=i("Hugging Face is trusted in production by over 10,000 companies"),Ke=f(),Q=o("img"),Ve=f(),W=o("img"),this.h()},l(t){const c=qr('[data-svelte="svelte-1phssyn"]',document.head);p=a(c,"META",{name:!0,content:!0}),c.forEach(r),k=h(t),d=a(t,"H1",{class:!0});var ue=n(d);y=a(ue,"A",{id:!0,class:!0,href:!0});var Oe=n(y);I=a(Oe,"SPAN",{});var cr=n(I);de(v.$$.fragment,cr),cr.forEach(r),Oe.forEach(r),m=h(ue),$=a(ue,"SPAN",{});var fr=n($);X=s(fr,"\u{1F917} Hosted Inference API"),fr.forEach(r),ue.forEach(r),G=h(t),A=a(t,"P",{});var hr=n(A);J=s(hr,"Test and evaluate, for free, over 80,000 publicly accessible machine learning models, or your own private models, via simple HTTP requests, with fast inference hosted on Hugging Face shared infrastructure."),hr.forEach(r),R=h(t),de(E.$$.fragment,t),U=h(t),g=a(t,"H2",{class:!0});var Ze=n(g);_=a(Ze,"A",{id:!0,class:!0,href:!0});var ur=n(_);C=a(ur,"SPAN",{});var pr=n(C);de(b.$$.fragment,pr),pr.forEach(r),ur.forEach(r),we=h(Ze),O=a(Ze,"SPAN",{});var dr=n(O);$e=s(dr,"Main features:"),dr.forEach(r),Ze.forEach(r),qe=h(t),w=a(t,"UL",{});var P=n(w);K=a(P,"LI",{});var et=n(K);ht=s(et,"Get predictions from "),ke=a(et,"STRONG",{});var mr=n(ke);ut=s(mr,"80,000+ Transformers models"),mr.forEach(r),pt=s(et," (T5, Blenderbot, Bart, GPT-2, Pegasus...)"),et.forEach(r),dt=h(P),Ae=a(P,"LI",{});var gr=n(Ae);mt=s(gr,"Switch from one model to the next by just switching the model ID"),gr.forEach(r),gt=h(P),V=a(P,"LI",{});var tt=n(V);vt=s(tt,"Use built-in integrations with "),Pe=a(tt,"STRONG",{});var vr=n(Pe);_t=s(vr,"over 20 Open-Source libraries"),vr.forEach(r),yt=s(tt," (spaCy, SpeechBrain, etc)."),tt.forEach(r),wt=h(P),Ee=a(P,"LI",{});var rr=n(Ee);$t=s(rr,"Upload, manage and serve your "),Te=a(rr,"STRONG",{});var _r=n(Te);Et=s(_r,"own models privately"),_r.forEach(r),rr.forEach(r),bt=h(P),Se=a(P,"LI",{});var yr=n(Se);It=s(yr,"Run Classification, Image Segmentation, Automatic Speech Recognition, NER, Conversational, Summarization, Translation, Question-Answering, Embeddings Extraction tasks"),yr.forEach(r),kt=h(P),Y=a(P,"LI",{});var rt=n(Y);At=s(rt,"Out of the box accelerated inference on "),xe=a(rt,"STRONG",{});var wr=n(xe);Pt=s(wr,"CPU"),wr.forEach(r),Tt=s(rt," powered by Intel Xeon Ice Lake"),rt.forEach(r),P.forEach(r),ze=h(t),S=a(t,"H2",{class:!0});var ot=n(S);B=a(ot,"A",{id:!0,class:!0,href:!0});var $r=n(B);Le=a($r,"SPAN",{});var Er=n(Le);de(Z.$$.fragment,Er),Er.forEach(r),$r.forEach(r),St=h(ot),Ne=a(ot,"SPAN",{});var br=n(Ne);xt=s(br,"Third-party library models:"),br.forEach(r),ot.forEach(r),je=h(t),M=a(t,"UL",{});var at=n(M);ee=a(at,"LI",{});var nt=n(ee);te=a(nt,"P",{});var lt=n(te);Lt=s(lt,"The "),re=a(lt,"A",{href:!0,rel:!0});var Ir=n(re);Nt=s(Ir,"Hub"),Ir.forEach(r),Ht=s(lt," now supports many new libraries:"),lt.forEach(r),Gt=h(nt),x=a(nt,"UL",{});var Ie=n(x);F=a(Ie,"LI",{});var Be=n(F);oe=a(Be,"A",{href:!0,rel:!0});var kr=n(oe);Rt=s(kr,"SpaCy"),kr.forEach(r),Ut=s(Be,", "),ae=a(Be,"A",{href:!0,rel:!0});var Ar=n(ae);Ct=s(Ar,"AllenNLP"),Ar.forEach(r),Ot=s(Be,","),Be.forEach(r),Bt=h(Ie),be=a(Ie,"LI",{});var or=n(be);ne=a(or,"A",{href:!0,rel:!0});var Pr=n(ne);Mt=s(Pr,"Speechbrain"),Pr.forEach(r),Ft=s(or,","),or.forEach(r),qt=h(Ie),q=a(Ie,"LI",{});var Me=n(q);le=a(Me,"A",{href:!0,rel:!0});var Tr=n(le);zt=s(Tr,"Timm"),Tr.forEach(r),jt=s(Me," and "),ie=a(Me,"A",{href:!0,rel:!0});var Sr=n(ie);Dt=s(Sr,"many others"),Sr.forEach(r),Qt=s(Me,"\u2026"),Me.forEach(r),Ie.forEach(r),nt.forEach(r),Wt=h(at),He=a(at,"LI",{});var xr=n(He);se=a(xr,"P",{});var it=n(se);Xt=s(it,"Those models are enabled on the API thanks to some docker integration "),ce=a(it,"A",{href:!0,rel:!0});var Lr=n(ce);Jt=s(Lr,"api-inference-community"),Lr.forEach(r),Kt=s(it,"."),it.forEach(r),xr.forEach(r),at.forEach(r),De=h(t),de(z.$$.fragment,t),Qe=h(t),L=a(t,"H2",{class:!0});var st=n(L);j=a(st,"A",{id:!0,class:!0,href:!0});var Nr=n(j);Ge=a(Nr,"SPAN",{});var Hr=n(Ge);de(fe.$$.fragment,Hr),Hr.forEach(r),Nr.forEach(r),Vt=h(st),Re=a(st,"SPAN",{});var Gr=n(Re);Yt=s(Gr,"If you are looking for custom support from the Hugging Face team"),Gr.forEach(r),st.forEach(r),We=h(t),N=a(t,"A",{target:!0,href:!0});var ar=n(N);T=a(ar,"IMG",{alt:!0,src:!0,style:!0}),Zt=h(ar),ar.forEach(r),Xe=a(t,"BR",{}),Je=h(t),H=a(t,"H2",{class:!0});var ct=n(H);D=a(ct,"A",{id:!0,class:!0,href:!0});var Rr=n(D);Ue=a(Rr,"SPAN",{});var Ur=n(Ue);de(he.$$.fragment,Ur),Ur.forEach(r),Rr.forEach(r),er=h(ct),Ce=a(ct,"SPAN",{});var Cr=n(Ce);tr=s(Cr,"Hugging Face is trusted in production by over 10,000 companies"),Cr.forEach(r),ct.forEach(r),Ke=h(t),Q=a(t,"IMG",{class:!0,src:!0,width:!0}),Ve=h(t),W=a(t,"IMG",{class:!0,src:!0,width:!0}),this.h()},h(){l(p,"name","hf:doc:metadata"),l(p,"content",JSON.stringify(Wr)),l(y,"id","hosted-inference-api"),l(y,"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"),l(y,"href","#hosted-inference-api"),l(d,"class","relative group"),l(_,"id","main-features:"),l(_,"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"),l(_,"href","#main-features:"),l(g,"class","relative group"),l(B,"id","third-party-library-models:"),l(B,"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"),l(B,"href","#third-party-library-models:"),l(S,"class","relative group"),l(re,"href","https://huggingface.co"),l(re,"rel","nofollow"),l(oe,"href","https://spacy.io/"),l(oe,"rel","nofollow"),l(ae,"href","https://allennlp.org/"),l(ae,"rel","nofollow"),l(ne,"href","https://speechbrain.github.io/"),l(ne,"rel","nofollow"),l(le,"href","https://pypi.org/project/timm/"),l(le,"rel","nofollow"),l(ie,"href","https://huggingface.co/docs/hub/libraries"),l(ie,"rel","nofollow"),l(ce,"href","https://github.com/huggingface/huggingface_hub/tree/main/api-inference-community"),l(ce,"rel","nofollow"),l(j,"id","if-you-are-looking-for-custom-support-from-the-hugging-face-team"),l(j,"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"),l(j,"href","#if-you-are-looking-for-custom-support-from-the-hugging-face-team"),l(L,"class","relative group"),l(T,"alt","HuggingFace Expert Acceleration Program"),nr(T.src,lr="https://cdn-media.huggingface.co/marketing/transformers/new-support-improved.png")||l(T,"src",lr),ft(T,"max-width","600px"),ft(T,"border","1px solid #eee"),ft(T,"border-radius","4px"),ft(T,"box-shadow","0 1px 2px 0 rgba(0, 0, 0, 0.05)"),l(N,"target","_blank"),l(N,"href","https://huggingface.co/support"),l(D,"id","hugging-face-is-trusted-in-production-by-over-10,000-companies"),l(D,"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"),l(D,"href","#hugging-face-is-trusted-in-production-by-over-10,000-companies"),l(H,"class","relative group"),l(Q,"class","block dark:hidden !shadow-none !border-0 !rounded-none"),nr(Q.src,ir="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/inference-api/companies-light.png")||l(Q,"src",ir),l(Q,"width","600"),l(W,"class","hidden dark:block !shadow-none !border-0 !rounded-none"),nr(W.src,sr="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/inference-api/companies-dark.png")||l(W,"src",sr),l(W,"width","600")},m(t,c){e(document.head,p),u(t,k,c),u(t,d,c),e(d,y),e(y,I),me(v,I,null),e(d,m),e(d,$),e($,X),u(t,G,c),u(t,A,c),e(A,J),u(t,R,c),me(E,t,c),u(t,U,c),u(t,g,c),e(g,_),e(_,C),me(b,C,null),e(g,we),e(g,O),e(O,$e),u(t,qe,c),u(t,w,c),e(w,K),e(K,ht),e(K,ke),e(ke,ut),e(K,pt),e(w,dt),e(w,Ae),e(Ae,mt),e(w,gt),e(w,V),e(V,vt),e(V,Pe),e(Pe,_t),e(V,yt),e(w,wt),e(w,Ee),e(Ee,$t),e(Ee,Te),e(Te,Et),e(w,bt),e(w,Se),e(Se,It),e(w,kt),e(w,Y),e(Y,At),e(Y,xe),e(xe,Pt),e(Y,Tt),u(t,ze,c),u(t,S,c),e(S,B),e(B,Le),me(Z,Le,null),e(S,St),e(S,Ne),e(Ne,xt),u(t,je,c),u(t,M,c),e(M,ee),e(ee,te),e(te,Lt),e(te,re),e(re,Nt),e(te,Ht),e(ee,Gt),e(ee,x),e(x,F),e(F,oe),e(oe,Rt),e(F,Ut),e(F,ae),e(ae,Ct),e(F,Ot),e(x,Bt),e(x,be),e(be,ne),e(ne,Mt),e(be,Ft),e(x,qt),e(x,q),e(q,le),e(le,zt),e(q,jt),e(q,ie),e(ie,Dt),e(q,Qt),e(M,Wt),e(M,He),e(He,se),e(se,Xt),e(se,ce),e(ce,Jt),e(se,Kt),u(t,De,c),me(z,t,c),u(t,Qe,c),u(t,L,c),e(L,j),e(j,Ge),me(fe,Ge,null),e(L,Vt),e(L,Re),e(Re,Yt),u(t,We,c),u(t,N,c),e(N,T),e(N,Zt),u(t,Xe,c),u(t,Je,c),u(t,H,c),e(H,D),e(D,Ue),me(he,Ue,null),e(H,er),e(H,Ce),e(Ce,tr),u(t,Ke,c),u(t,Q,c),u(t,Ve,c),u(t,W,c),Ye=!0},p(t,[c]){const ue={};c&2&&(ue.$$scope={dirty:c,ctx:t}),E.$set(ue);const Oe={};c&2&&(Oe.$$scope={dirty:c,ctx:t}),z.$set(Oe)},i(t){Ye||(ge(v.$$.fragment,t),ge(E.$$.fragment,t),ge(b.$$.fragment,t),ge(Z.$$.fragment,t),ge(z.$$.fragment,t),ge(fe.$$.fragment,t),ge(he.$$.fragment,t),Ye=!0)},o(t){ve(v.$$.fragment,t),ve(E.$$.fragment,t),ve(b.$$.fragment,t),ve(Z.$$.fragment,t),ve(z.$$.fragment,t),ve(fe.$$.fragment,t),ve(he.$$.fragment,t),Ye=!1},d(t){r(p),t&&r(k),t&&r(d),_e(v),t&&r(G),t&&r(A),t&&r(R),_e(E,t),t&&r(U),t&&r(g),_e(b),t&&r(qe),t&&r(w),t&&r(ze),t&&r(S),_e(Z),t&&r(je),t&&r(M),t&&r(De),_e(z,t),t&&r(Qe),t&&r(L),_e(fe),t&&r(We),t&&r(N),t&&r(Xe),t&&r(Je),t&&r(H),_e(he),t&&r(Ke),t&&r(Q),t&&r(Ve),t&&r(W)}}}const Wr={local:"hosted-inference-api",title:"\u{1F917} Hosted Inference API"};function Xr(ye){return zr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Yr extends Br{constructor(p){super();Mr(this,p,Xr,Qr,Fr,{})}}export{Yr as default,Wr as metadata};
