The Hub as a router
HF's Inference Providers is a routing layer: you pick a model, the platform shows you which providers serve it, and your InferenceClient(provider=...) request hits that provider via HF's edge. You pay HF, who pays the provider. Auth is your HF token.
Why route through HF and not direct
- One auth layer — one token, not five provider-specific keys.
- One billing surface — one invoice instead of five.
- Provider abstraction — if Provider A goes down, switching is changing one string.
- Free tier per provider — HF passes through provider-specific free credits for some accounts.
When to go direct
If you need provider features HF doesn't surface (custom JSON modes, adapter routing, region pinning), you'll occasionally drop down to the provider's native SDK. The InferenceClient escape hatch is the OpenAI-compatible mode — next lesson.