Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/inference-providers/guides/first-api-call.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ Visit the [Hugging Face Hub](https://huggingface.co/models?pipeline_tag=text-to-

For this example, we'll use [FLUX.1-schnell](https://huggingface.co/black-forest-labs/FLUX.1-schnell), a powerful text-to-image model. Next, navigate to the model page and scroll down to find the inference widget on the right side.

> [!TIP]
> You can also do this step from the terminal — or have a coding agent do it for you. The `hf` CLI (installed with `huggingface_hub`) supports the same filters:
>
> ```bash
> hf models ls --pipeline-tag text-to-image --warm --sort trending_score
> ```
>
> Swap `--warm` for `--inference-provider fal-ai` to narrow to a specific provider, or add `--json` for machine-readable output. See the [Hub API page](https://huggingface.co/docs/inference-providers/hub-api) for the full set of filters.

## Step 2: Try the Interactive Widget

Before writing any code, try the widget directly on the [model page](https://huggingface.co/black-forest-labs/FLUX.1-dev?inference_provider=fal-ai):
Expand Down
18 changes: 18 additions & 0 deletions docs/inference-providers/hub-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,24 @@ Finally, you can select all models served by at least one inference provider:
"BagOu22/Lora_HKLPAZ"
```

The same filters are available from the terminal with the [`hf` CLI](https://huggingface.co/docs/huggingface_hub/package_reference/cli#hf-models-list):

```bash
# List models served by at least one inference provider
hf models ls --warm

# Search served models for GLM-5.2
hf models ls --warm --search GLM-5.2

# List text-to-image models served by Fal AI
hf models ls --inference-provider fal-ai --pipeline-tag text-to-image

# List models served by Fireworks AI, most downloaded first
hf models ls --inference-provider fireworks-ai --sort downloads
```

Repeat `--inference-provider` to match models served by any of several providers. Add `--expand inferenceProviderMapping` to see which provider serves each model and the provider-specific model id, or `--json` for machine-readable output.

## Get model status

To find an inference provider for a specific model, request the `inference` attribute in the model info endpoint:
Expand Down
2 changes: 2 additions & 0 deletions docs/inference-providers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ Before diving into integration, explore models interactively with our [Inference

<a href="https://huggingface.co/playground" target="blank"><img src="https://cdn-uploads.huggingface.co/production/uploads/5f17f0a0925b9863e28ad517/9_Tgf0Tv65srhBirZQMTp.png" alt="Inference Playground thumbnail" style="max-width: 550px; width: 100%;"/></a>

Prefer the terminal? Run `hf models ls --warm` with the [`hf` CLI](https://huggingface.co/docs/huggingface_hub/package_reference/cli#hf-models-list) to list every model served by at least one provider, and add `--json` for scripts and agents. See the [Hub API](./hub-api) page for the full set of filters.

### Authentication

You'll need a Hugging Face token to authenticate your requests. Create one by visiting your [token settings](https://huggingface.co/settings/tokens/new?ownUserPermissions=inference.serverless.write&tokenType=fineGrained) and generating a `fine-grained` token with `Make calls to Inference Providers` permissions.
Expand Down
Loading