From a10a09db6f3eabf9008900f73227e6ca9945b47e Mon Sep 17 00:00:00 2001 From: burtenshaw Date: Tue, 1 Jul 2025 11:01:28 +0200 Subject: [PATCH 1/4] restructure index page --- docs/inference-providers/index.md | 57 ++++++++++++++++++------------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/docs/inference-providers/index.md b/docs/inference-providers/index.md index c3970c044..6683c4109 100644 --- a/docs/inference-providers/index.md +++ b/docs/inference-providers/index.md @@ -9,26 +9,11 @@ Hugging Face’s Inference Providers give developers streamlined, unified access To learn more about the launch of Inference Providers, check out our [announcement blog post](https://huggingface.co/blog/inference-providers). -## Partners +## Inference Playground -Here is the complete list of partners integrated with Inference Providers, and the supported tasks for each of them: +To get started quickly with [Chat Completion models](http://huggingface.co/models?inference_provider=all&sort=trending&other=conversational), use the [Inference Playground](https://huggingface.co/playground) to easily test and compare models with your prompts. -| Provider | Chat completion (LLM) | Chat completion (VLM) | Feature Extraction | Text to Image | Text to video | -| ---------------------------------------- | :-------------------: | :-------------------: | :----------------: | :-----------: | :-----------: | -| [Cerebras](./providers/cerebras) | ✅ | | | | | -| [Cohere](./providers/cohere) | ✅ | ✅ | | | | -| [Fal AI](./providers/fal-ai) | | | | ✅ | ✅ | -| [Featherless AI](./providers/featherless-ai) | ✅ | ✅ | | | | -| [Fireworks](./providers/fireworks-ai) | ✅ | ✅ | | | | -| [Groq](./providers/groq) | ✅ | | | | | -| [HF Inference](./providers/hf-inference) | ✅ | ✅ | ✅ | ✅ | | -| [Hyperbolic](./providers/hyperbolic) | ✅ | ✅ | | | | -| [Nebius](./providers/nebius) | ✅ | ✅ | ✅ | ✅ | | -| [Novita](./providers/novita) | ✅ | ✅ | | | ✅ | -| [Nscale](./providers/nscale) | ✅ | ✅ | | ✅ | | -| [Replicate](./providers/replicate) | | | | ✅ | ✅ | -| [SambaNova](./providers/sambanova) | ✅ | | ✅ | | | -| [Together](./providers/together) | ✅ | ✅ | | ✅ | | + ## Why use Inference Providers? @@ -49,12 +34,26 @@ Inference Providers offers a fast and simple way to explore thousands of models - **🔧 Developer-Friendly**: Simple requests, fast responses, and a consistent developer experience across Python and JavaScript clients. - **💰 Cost-Effective**: No extra markup on provider rates. -## Inference Playground - -To get started quickly with [Chat Completion models](http://huggingface.co/models?inference_provider=all&sort=trending&other=conversational), use the [Inference Playground](https://huggingface.co/playground) to easily test and compare models with your prompts. +## Partners +Here is the complete list of partners integrated with Inference Providers, and the supported tasks for each of them: - +| Provider | Chat completion (LLM) | Chat completion (VLM) | Feature Extraction | Text to Image | Text to video | +| ---------------------------------------- | :-------------------: | :-------------------: | :----------------: | :-----------: | :-----------: | +| [Cerebras](./providers/cerebras) | ✅ | | | | | +| [Cohere](./providers/cohere) | ✅ | ✅ | | | | +| [Fal AI](./providers/fal-ai) | | | | ✅ | ✅ | +| [Featherless AI](./providers/featherless-ai) | ✅ | ✅ | | | | +| [Fireworks](./providers/fireworks-ai) | ✅ | ✅ | | | | +| [Groq](./providers/groq) | ✅ | | | | | +| [HF Inference](./providers/hf-inference) | ✅ | ✅ | ✅ | ✅ | | +| [Hyperbolic](./providers/hyperbolic) | ✅ | ✅ | | | | +| [Nebius](./providers/nebius) | ✅ | ✅ | ✅ | ✅ | | +| [Novita](./providers/novita) | ✅ | ✅ | | | ✅ | +| [Nscale](./providers/nscale) | ✅ | ✅ | | ✅ | | +| [Replicate](./providers/replicate) | | | | ✅ | ✅ | +| [SambaNova](./providers/sambanova) | ✅ | | ✅ | | | +| [Together](./providers/together) | ✅ | ✅ | | ✅ | | ## Get Started @@ -72,6 +71,9 @@ Inference Providers requires passing a user token in the request headers. You ca For more details about user tokens, check out [this guide](https://huggingface.co/docs/hub/en/security-tokens). + + + ### cURL Let's start with a cURL command highlighting the raw HTTP request. You can adapt this request to be run with the tool of your choice. @@ -92,6 +94,9 @@ curl https://router.huggingface.co/novita/v3/openai/chat/completions \ }' ``` + + + ### Python In Python, you can use the `requests` library to make raw requests to the API: @@ -140,11 +145,13 @@ completion = client.chat.completions.create( print(completion.choices[0].message) ``` + + + ### JavaScript In JS, you can use the `fetch` library to make raw requests to the API: - ```js import fetch from "node-fetch"; @@ -173,7 +180,6 @@ console.log(await response.json()); For convenience, the JS library `@huggingface/inference` provides an [`InferenceClient`](https://huggingface.co/docs/huggingface.js/inference/classes/InferenceClient) that handles inference for you. You can install it with `npm install @huggingface/inference`. - ```js import { InferenceClient } from "@huggingface/inference"; @@ -193,6 +199,9 @@ const chatCompletion = await client.chatCompletion({ console.log(chatCompletion.choices[0].message); ``` + + + ## Next Steps In this introduction, we've covered the basics of Inference Providers. To learn more about this service, check out our guides and API Reference: From 99773d7b29ff6ad3df2962058201a30a3491d42f Mon Sep 17 00:00:00 2001 From: burtenshaw Date: Tue, 1 Jul 2025 11:04:29 +0200 Subject: [PATCH 2/4] move playground back down --- docs/inference-providers/index.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/inference-providers/index.md b/docs/inference-providers/index.md index 6683c4109..727e6e8a9 100644 --- a/docs/inference-providers/index.md +++ b/docs/inference-providers/index.md @@ -9,12 +9,6 @@ Hugging Face’s Inference Providers give developers streamlined, unified access To learn more about the launch of Inference Providers, check out our [announcement blog post](https://huggingface.co/blog/inference-providers). -## Inference Playground - -To get started quickly with [Chat Completion models](http://huggingface.co/models?inference_provider=all&sort=trending&other=conversational), use the [Inference Playground](https://huggingface.co/playground) to easily test and compare models with your prompts. - - - ## Why use Inference Providers? Inference Providers offers a fast and simple way to explore thousands of models for a variety of tasks. Whether you're experimenting with ML capabilities or building a new application, this API gives you instant access to high-performing models across multiple domains: @@ -34,6 +28,12 @@ Inference Providers offers a fast and simple way to explore thousands of models - **🔧 Developer-Friendly**: Simple requests, fast responses, and a consistent developer experience across Python and JavaScript clients. - **💰 Cost-Effective**: No extra markup on provider rates. +## Inference Playground + +To get started quickly with [Chat Completion models](http://huggingface.co/models?inference_provider=all&sort=trending&other=conversational), use the [Inference Playground](https://huggingface.co/playground) to easily test and compare models with your prompts. + + + ## Partners Here is the complete list of partners integrated with Inference Providers, and the supported tasks for each of them: From 55d4123425a1b3a67d1809e55bd42c495d54a3da Mon Sep 17 00:00:00 2001 From: burtenshaw Date: Tue, 1 Jul 2025 14:41:56 +0200 Subject: [PATCH 3/4] move partners table back to the top --- docs/inference-providers/index.md | 42 +++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/inference-providers/index.md b/docs/inference-providers/index.md index 727e6e8a9..197dadd4d 100644 --- a/docs/inference-providers/index.md +++ b/docs/inference-providers/index.md @@ -9,6 +9,27 @@ Hugging Face’s Inference Providers give developers streamlined, unified access To learn more about the launch of Inference Providers, check out our [announcement blog post](https://huggingface.co/blog/inference-providers). +## Partners + +Here is the complete list of partners integrated with Inference Providers, and the supported tasks for each of them: + +| Provider | Chat completion (LLM) | Chat completion (VLM) | Feature Extraction | Text to Image | Text to video | +| ---------------------------------------- | :-------------------: | :-------------------: | :----------------: | :-----------: | :-----------: | +| [Cerebras](./providers/cerebras) | ✅ | | | | | +| [Cohere](./providers/cohere) | ✅ | ✅ | | | | +| [Fal AI](./providers/fal-ai) | | | | ✅ | ✅ | +| [Featherless AI](./providers/featherless-ai) | ✅ | ✅ | | | | +| [Fireworks](./providers/fireworks-ai) | ✅ | ✅ | | | | +| [Groq](./providers/groq) | ✅ | | | | | +| [HF Inference](./providers/hf-inference) | ✅ | ✅ | ✅ | ✅ | | +| [Hyperbolic](./providers/hyperbolic) | ✅ | ✅ | | | | +| [Nebius](./providers/nebius) | ✅ | ✅ | ✅ | ✅ | | +| [Novita](./providers/novita) | ✅ | ✅ | | | ✅ | +| [Nscale](./providers/nscale) | ✅ | ✅ | | ✅ | | +| [Replicate](./providers/replicate) | | | | ✅ | ✅ | +| [SambaNova](./providers/sambanova) | ✅ | | ✅ | | | +| [Together](./providers/together) | ✅ | ✅ | | ✅ | | + ## Why use Inference Providers? Inference Providers offers a fast and simple way to explore thousands of models for a variety of tasks. Whether you're experimenting with ML capabilities or building a new application, this API gives you instant access to high-performing models across multiple domains: @@ -34,27 +55,6 @@ To get started quickly with [Chat Completion models](http://huggingface.co/model -## Partners - -Here is the complete list of partners integrated with Inference Providers, and the supported tasks for each of them: - -| Provider | Chat completion (LLM) | Chat completion (VLM) | Feature Extraction | Text to Image | Text to video | -| ---------------------------------------- | :-------------------: | :-------------------: | :----------------: | :-----------: | :-----------: | -| [Cerebras](./providers/cerebras) | ✅ | | | | | -| [Cohere](./providers/cohere) | ✅ | ✅ | | | | -| [Fal AI](./providers/fal-ai) | | | | ✅ | ✅ | -| [Featherless AI](./providers/featherless-ai) | ✅ | ✅ | | | | -| [Fireworks](./providers/fireworks-ai) | ✅ | ✅ | | | | -| [Groq](./providers/groq) | ✅ | | | | | -| [HF Inference](./providers/hf-inference) | ✅ | ✅ | ✅ | ✅ | | -| [Hyperbolic](./providers/hyperbolic) | ✅ | ✅ | | | | -| [Nebius](./providers/nebius) | ✅ | ✅ | ✅ | ✅ | | -| [Novita](./providers/novita) | ✅ | ✅ | | | ✅ | -| [Nscale](./providers/nscale) | ✅ | ✅ | | ✅ | | -| [Replicate](./providers/replicate) | | | | ✅ | ✅ | -| [SambaNova](./providers/sambanova) | ✅ | | ✅ | | | -| [Together](./providers/together) | ✅ | ✅ | | ✅ | | - ## Get Started You can use Inference Providers with your preferred tools, such as Python, JavaScript, or cURL. To simplify integration, we offer both a Python SDK (`huggingface_hub`) and a JavaScript SDK (`huggingface.js`). From a4e37c057b3cb9ee19eff362532485762359916c Mon Sep 17 00:00:00 2001 From: burtenshaw Date: Tue, 1 Jul 2025 18:18:16 +0200 Subject: [PATCH 4/4] use shared title for quick start --- docs/inference-providers/index.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/inference-providers/index.md b/docs/inference-providers/index.md index 197dadd4d..82f14c84a 100644 --- a/docs/inference-providers/index.md +++ b/docs/inference-providers/index.md @@ -71,10 +71,12 @@ Inference Providers requires passing a user token in the request headers. You ca For more details about user tokens, check out [this guide](https://huggingface.co/docs/hub/en/security-tokens). +### Quick Start + -### cURL +**cURL** Let's start with a cURL command highlighting the raw HTTP request. You can adapt this request to be run with the tool of your choice. @@ -97,7 +99,7 @@ curl https://router.huggingface.co/novita/v3/openai/chat/completions \ -### Python +**Python** In Python, you can use the `requests` library to make raw requests to the API: @@ -148,7 +150,7 @@ print(completion.choices[0].message) -### JavaScript +**JavaScript** In JS, you can use the `fetch` library to make raw requests to the API: