You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/inference-providers/guides/first-api-call.md
+106Lines changed: 106 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,6 +124,112 @@ Nice work! You've successfully used a production-grade AI model without any comp
124
124
125
125
The model you just used runs on professional infrastructure, handling scaling, optimization, and reliability automatically.
126
126
127
+
## Dive Deeper: Provider Selection
128
+
129
+
You might have noticed the `provider="auto"` parameter in the code examples above. This is a key feature of Inference Providers that gives you control over which infrastructure provider handles your request.
130
+
131
+
`auto` is powerful because:
132
+
133
+
1. It makes it easy to switch between providers, and to test different providers' performance for your use case.
134
+
2. It also gives a fallback mechanism in case a provider is unavailable.
135
+
136
+
But if you want to be more specific, you can also specify a provider. Let's see how.
137
+
138
+
### Understanding Provider Selection
139
+
140
+
When you use `provider="auto"` (which is the default), the system automatically selects the first available provider for your chosen model based on your preference order in your [Inference Provider settings](https://hf.co/settings/inference-providers). This provides:
141
+
142
+
-**Automatic failover**: If one provider is unavailable, the system tries the next one
143
+
-**Simplified setup**: No need to research which providers support your model
144
+
-**Optimal routing**: The system handles provider selection for you
145
+
146
+
### Specifying a Specific Provider
147
+
148
+
Alternatively, you can explicitly choose a provider if you have specific requirements:
0 commit comments