The client is the abstraction
huggingface_hub.InferenceClient is a single Python class that talks to: HF's hosted Inference API, third-party providers routed through HF (Together AI, Fireworks, Replicate, …), text-generation-inference (TGI) servers you run yourself, and any OpenAI-compatible endpoint. You construct it with provider= and model=, and call methods like chat_completion, text_generation, image_generation.
Why it matters
The same client code runs against a managed Hub endpoint in dev and against a TGI box in prod. Migration is changing two arguments. Compare to a hard-coded OpenAI client: you'd be rewriting the call site.