Additional inference clients
Updated
- Python
- JavaScript
- Repository mappings
- Model capabilities
- Where the model's thinking arrives
- Which client should you use
- Related
Both the model hub inference clients, huggingface_hub for Python and @huggingface/inference for JavaScript, accept a chat-compatible base URL, so both call the open-models service today.
| Connection | Value |
|---|---|
| API base | https://api.runinfra.ai/v1 |
| Workspace key | rp_... |
| Process variable | RUNINFRA_GATEWAY_KEY |
| Billing | The existing funding rules of your open-model account. |
Replace MODEL_ID with an available id from Open models; read current capabilities, limits and prices from GET /v1/models.
The open-models service is not a registered inference provider in the model hub, so provider="runinfra" does not resolve. Use the base-URL forms below.
Python
Streaming is the same call with stream=True, reading chunk. and skipping the usage frame, which has no choices.
JavaScript
Pass endpointUrl in the client options and the open-models service 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.
Do not combine endpointUrl with an explicit third-party provider. The client rejects that combination with Cannot use endpointUrl with a third-party provider. Pass endpointUrl alone.
Repository mappings
These clients normally take a model-hub repository id. In the base-URL forms above you pass the open-models service model id, because you are talking to the open-models service directly.
For the mappings verified in the dated source table, the gateway also accepts the repository id in the model field. For another model, use its id from the live model list unless alias support is explicitly documented. The source mappings were available on September 21, 2026; verify the current mapping before using it.
Model capabilities
Working JSON snippets are in Structured output. When a model needs a specific reasoning_effort for JSON output, the gateway applies it if you omit the field. When the gateway chooses an effort that the request did not name, its response header X- carries the applied value. A temporarily paused model is reported by the model list and on its Model Library page.
Where the model's thinking arrives
For the reasoning models described on their own pages, the model thinks before it answers. That text streams on delta.reasoning and appears on message.reasoning, never on content.
Which client should you use
If you already live inside the model hub ecosystem, the clients on this page work and nothing here changes later. Otherwise use the chat API client, which is the shortest path and what the rest of these docs assume. See Compatible clients.
Either way, these calls are billed like any other open-models service call. See Pricing and credits and Rate limits.