huggingface_hub for Python and @huggingface/inference for JavaScript, accept an OpenAI-compatible base URL, so both call RunInfra today.
RunInfra is not a registered Hugging Face Inference Provider, so provider="runinfra" does not resolve. Use the base-URL forms below.
Python
stream=True, reading chunk.choices[0].delta.content.
JavaScript
PassendpointUrl in the client options and your RunInfra key as the token. The client appends /v1/chat/completions for you, so give it the host with or without /v1.
chatCompletionStream takes the same arguments and yields deltas.
Repository mappings
These clients normally take a Hugging Face repository id. In the base-URL forms above you pass the RunInfra model id, because you are talking to RunInfra directly.deepseek-v4-pro is also live for OpenAI-compatible chat completions. The table lists only the repository mappings currently published in these docs. Use GET /v1/models for the complete live catalog.
For the mappings above, the gateway also accepts the repository id in the
model field, so either string resolves. GET /v1/models returns the RunInfra ids and is the authoritative live list.
What each model does
Working snippets for the conditional JSON case are in Structured output.reasoning_effort is a plain top-level request field sent beside response_format in the same call.
Where the model’s thinking arrives
These models think before they answer. That text streams ondelta.reasoning and appears on message.reasoning, never on content.
Which client should you use
If you already live inside the Hugging Face ecosystem, the clients on this page work and nothing here changes later. Otherwise use the OpenAI client, which is the shortest path and what the rest of these docs assume. See OpenAI compatibility. Either way, calls are billed by RunInfra against your workspace balance at the per-token price on each model’s page. See Pricing and credits and Rate limits.Related
OpenAI compatibility
The shortest path, and what the rest of these docs assume.
Chat completions
The full request contract.
Pricing and credits
How these calls are billed.