> ## Documentation Index
> Fetch the complete documentation index at: https://runinfra.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Hugging Face clients

> Call RunInfra Model APIs from huggingface_hub and @huggingface/inference by passing a base URL, with the verified model id mapping and capability matrix.

Both Hugging Face inference clients, `huggingface_hub` for Python and `@huggingface/inference` for JavaScript, accept an OpenAI-compatible base URL, so both call RunInfra today.

<Warning>
  **RunInfra is not a registered Hugging Face Inference Provider.** Passing `provider="runinfra"` fails in both clients with a "provider not supported" error. Use the base-URL forms below. If that changes, this page is where the routed forms will appear.
</Warning>

## Python

```bash theme={"dark"}
pip install "huggingface_hub>=1.0"
export RUNINFRA_GATEWAY_KEY="rp_your_key_here"
```

```python theme={"dark"}
import os
from huggingface_hub import InferenceClient

client = InferenceClient(
    base_url="https://api.runinfra.ai/v1",
    api_key=os.environ["RUNINFRA_GATEWAY_KEY"],
)

completion = client.chat.completions.create(
    model="deepseek-v4-flash",
    messages=[{"role": "user", "content": "Write a TypeScript retry helper."}],
    max_tokens=16384,
)

print(completion.choices[0].message.content)
```

Streaming is the same call with `stream=True`, reading `chunk.choices[0].delta.content`.

<Note>
  Verified on 2026-08-16 with `huggingface_hub` 1.27.0 against `https://api.runinfra.ai/v1`, non-streaming and streaming.
</Note>

## JavaScript

Pass `endpointUrl` 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`.

```bash theme={"dark"}
npm install @huggingface/inference
export RUNINFRA_GATEWAY_KEY="rp_your_key_here"
```

```javascript theme={"dark"}
import { InferenceClient } from "@huggingface/inference";

const client = new InferenceClient(process.env.RUNINFRA_GATEWAY_KEY, {
  endpointUrl: "https://api.runinfra.ai",
});

const completion = await client.chatCompletion({
  model: "deepseek-v4-flash",
  messages: [{ role: "user", content: "Write a TypeScript retry helper." }],
  max_tokens: 16384,
});

console.log(completion.choices[0].message.content);
```

`chatCompletionStream` takes the same arguments and yields deltas.

<Warning>
  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.
</Warning>

<Note>
  Verified on 2026-08-16 with `@huggingface/inference` 4.13.26, non-streaming and streaming.
</Note>

## Model ids

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.

| RunInfra model id            | Hugging Face repository                             |
| ---------------------------- | --------------------------------------------------- |
| `deepseek-v4-flash`          | `deepseek-ai/DeepSeek-V4-Flash-0731`                |
| `nemotron-3-5-lightning-30b` | `nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16` |
| `qwen3-8-27b`                | `Qwen/Qwen3.8-27B`                                  |
| `qwen3-8-2-4t-a95b`          | `Inferact/Qwen3.8-2.4T-A95B-NVFP4`                  |

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

<div className="block dark:hidden">
  <svg viewBox="0 0 720 276" width="100%" role="img" aria-label="A capability matrix for the five live models: all five stream, all but nemotron-3-5-lightning-30b call tools, deepseek-v4-flash and nemotron-3-5-lightning-30b hold a JSON schema only with reasoning turned off, qwen3-8-27b and deepseek-v4-pro hold one directly, qwen3-8-2-4t-a95b has no JSON mode and cannot turn reasoning off, and deepseek-v4-pro answers without reasoning so there is nothing to turn off." fill="none" xmlns="http://www.w3.org/2000/svg"><text x="24" y="16" fill="#9a998e" fontFamily="Consolas, Menlo, monospace" fontSize="9" fontWeight="500" letterSpacing="0.3">What each live model does</text><text x="696" y="16" fill="#78786f" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0" textAnchor="end">GET /v1/models is the live list</text><text x="38" y="44" fill="#9a998e" fontFamily="Consolas, Menlo, monospace" fontSize="9" fontWeight="500" letterSpacing="0.3">Model</text><text x="262" y="44" fill="#9a998e" fontFamily="Consolas, Menlo, monospace" fontSize="9" fontWeight="500" letterSpacing="0.3">Streaming</text><text x="374" y="44" fill="#9a998e" fontFamily="Consolas, Menlo, monospace" fontSize="9" fontWeight="500" letterSpacing="0.3">Tool calling</text><text x="486" y="44" fill="#9a998e" fontFamily="Consolas, Menlo, monospace" fontSize="9" fontWeight="500" letterSpacing="0.3">JSON mode</text><text x="598" y="44" fill="#9a998e" fontFamily="Consolas, Menlo, monospace" fontSize="9" fontWeight="500" letterSpacing="0.3">Reasoning off</text><line x1="24" y1="54" x2="696" y2="54" stroke="#e8e8e3" strokeWidth="1" strokeDasharray="3 3" /><rect x="21.5" y="51.5" width="5" height="5" fill="#bbb9b1" shapeRendering="crispEdges" /><rect x="693.5" y="51.5" width="5" height="5" fill="#bbb9b1" shapeRendering="crispEdges" /><text x="38" y="75" fill="#0f0f0e" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">deepseek-v4-flash</text><rect x="262" y="67" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="276" y="75" fill="#5a8f00" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="374" y="67" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="388" y="75" fill="#5a8f00" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="486" y="67" width="5" height="5" fill="#b07f24" shapeRendering="crispEdges" /><text x="500" y="75" fill="#b07f24" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">conditional</text><rect x="598" y="67" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="612" y="75" fill="#5a8f00" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><line x1="24" y1="88" x2="696" y2="88" stroke="#e8e8e3" strokeWidth="1" strokeDasharray="3 3" /><text x="38" y="109" fill="#0f0f0e" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">deepseek-v4-pro</text><rect x="262" y="101" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="276" y="109" fill="#5a8f00" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="374" y="101" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="388" y="109" fill="#5a8f00" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="486" y="101" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="500" y="109" fill="#5a8f00" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="598" y="101" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="612" y="109" fill="#5a8f00" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">already off</text><line x1="24" y1="122" x2="696" y2="122" stroke="#e8e8e3" strokeWidth="1" strokeDasharray="3 3" /><text x="38" y="143" fill="#0f0f0e" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">qwen3-8-27b</text><rect x="262" y="135" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="276" y="143" fill="#5a8f00" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="374" y="135" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="388" y="143" fill="#5a8f00" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="486" y="135" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="500" y="143" fill="#5a8f00" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="598" y="135" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="612" y="143" fill="#5a8f00" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><line x1="24" y1="156" x2="696" y2="156" stroke="#e8e8e3" strokeWidth="1" strokeDasharray="3 3" /><text x="38" y="177" fill="#0f0f0e" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">qwen3-8-2-4t-a95b</text><rect x="262" y="169" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="276" y="177" fill="#5a8f00" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="374" y="169" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="388" y="177" fill="#5a8f00" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="486" y="169" width="5" height="5" fill="#9a998e" shapeRendering="crispEdges" /><text x="500" y="177" fill="#78786f" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">no</text><rect x="598" y="169" width="5" height="5" fill="#9a998e" shapeRendering="crispEdges" /><text x="612" y="177" fill="#78786f" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">no</text><line x1="24" y1="190" x2="696" y2="190" stroke="#e8e8e3" strokeWidth="1" strokeDasharray="3 3" /><text x="38" y="211" fill="#0f0f0e" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">nemotron-3-5-lightning-30b</text><rect x="262" y="203" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="276" y="211" fill="#5a8f00" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="374" y="203" width="5" height="5" fill="#9a998e" shapeRendering="crispEdges" /><text x="388" y="211" fill="#78786f" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">no</text><rect x="486" y="203" width="5" height="5" fill="#b07f24" shapeRendering="crispEdges" /><text x="500" y="211" fill="#b07f24" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">conditional</text><rect x="598" y="203" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="612" y="211" fill="#5a8f00" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><line x1="24" y1="224" x2="696" y2="224" stroke="#e8e8e3" strokeWidth="1" strokeDasharray="3 3" /><rect x="21.5" y="221.5" width="5" height="5" fill="#bbb9b1" shapeRendering="crispEdges" /><rect x="693.5" y="221.5" width="5" height="5" fill="#bbb9b1" shapeRendering="crispEdges" /><line x1="248" y1="54" x2="248" y2="224" stroke="#e8e8e3" strokeWidth="1" strokeDasharray="3 3" /><rect x="245.5" y="51.5" width="5" height="5" fill="#bbb9b1" shapeRendering="crispEdges" /><rect x="245.5" y="221.5" width="5" height="5" fill="#bbb9b1" shapeRendering="crispEdges" /><line x1="360" y1="54" x2="360" y2="224" stroke="#e8e8e3" strokeWidth="1" strokeDasharray="3 3" /><rect x="357.5" y="51.5" width="5" height="5" fill="#bbb9b1" shapeRendering="crispEdges" /><rect x="357.5" y="221.5" width="5" height="5" fill="#bbb9b1" shapeRendering="crispEdges" /><line x1="472" y1="54" x2="472" y2="224" stroke="#e8e8e3" strokeWidth="1" strokeDasharray="3 3" /><rect x="469.5" y="51.5" width="5" height="5" fill="#bbb9b1" shapeRendering="crispEdges" /><rect x="469.5" y="221.5" width="5" height="5" fill="#bbb9b1" shapeRendering="crispEdges" /><line x1="584" y1="54" x2="584" y2="224" stroke="#e8e8e3" strokeWidth="1" strokeDasharray="3 3" /><rect x="581.5" y="51.5" width="5" height="5" fill="#bbb9b1" shapeRendering="crispEdges" /><rect x="581.5" y="221.5" width="5" height="5" fill="#bbb9b1" shapeRendering="crispEdges" /><text x="24" y="248" fill="#6e6d64" fontFamily="'Helvetica Neue', Helvetica, Arial, sans-serif" fontSize="10.5" letterSpacing="0">conditional means the model cannot hold a response format while it reasons: send reasoning\_effort "none"</text><text x="24" y="262" fill="#6e6d64" fontFamily="'Helvetica Neue', Helvetica, Arial, sans-serif" fontSize="10.5" letterSpacing="0">in the same request as response\_format. A feature a model does not offer is refused with 400, never ignored.</text></svg>
</div>

<div className="hidden dark:block">
  <svg viewBox="0 0 720 276" width="100%" role="img" aria-label="A capability matrix for the five live models: all five stream, all but nemotron-3-5-lightning-30b call tools, deepseek-v4-flash and nemotron-3-5-lightning-30b hold a JSON schema only with reasoning turned off, qwen3-8-27b and deepseek-v4-pro hold one directly, qwen3-8-2-4t-a95b has no JSON mode and cannot turn reasoning off, and deepseek-v4-pro answers without reasoning so there is nothing to turn off." fill="none" xmlns="http://www.w3.org/2000/svg"><text x="24" y="16" fill="#6e6d64" fontFamily="Consolas, Menlo, monospace" fontSize="9" fontWeight="500" letterSpacing="0.3">What each live model does</text><text x="696" y="16" fill="#9a998e" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0" textAnchor="end">GET /v1/models is the live list</text><text x="38" y="44" fill="#6e6d64" fontFamily="Consolas, Menlo, monospace" fontSize="9" fontWeight="500" letterSpacing="0.3">Model</text><text x="262" y="44" fill="#6e6d64" fontFamily="Consolas, Menlo, monospace" fontSize="9" fontWeight="500" letterSpacing="0.3">Streaming</text><text x="374" y="44" fill="#6e6d64" fontFamily="Consolas, Menlo, monospace" fontSize="9" fontWeight="500" letterSpacing="0.3">Tool calling</text><text x="486" y="44" fill="#6e6d64" fontFamily="Consolas, Menlo, monospace" fontSize="9" fontWeight="500" letterSpacing="0.3">JSON mode</text><text x="598" y="44" fill="#6e6d64" fontFamily="Consolas, Menlo, monospace" fontSize="9" fontWeight="500" letterSpacing="0.3">Reasoning off</text><line x1="24" y1="54" x2="696" y2="54" stroke="#383833" strokeWidth="1" strokeDasharray="3 3" /><rect x="21.5" y="51.5" width="5" height="5" fill="#6e6d64" shapeRendering="crispEdges" /><rect x="693.5" y="51.5" width="5" height="5" fill="#6e6d64" shapeRendering="crispEdges" /><text x="38" y="75" fill="#f0efe2" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">deepseek-v4-flash</text><rect x="262" y="67" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="276" y="75" fill="#8fd400" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="374" y="67" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="388" y="75" fill="#8fd400" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="486" y="67" width="5" height="5" fill="#d9a64a" shapeRendering="crispEdges" /><text x="500" y="75" fill="#d9a64a" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">conditional</text><rect x="598" y="67" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="612" y="75" fill="#8fd400" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><line x1="24" y1="88" x2="696" y2="88" stroke="#383833" strokeWidth="1" strokeDasharray="3 3" /><text x="38" y="109" fill="#f0efe2" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">deepseek-v4-pro</text><rect x="262" y="101" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="276" y="109" fill="#8fd400" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="374" y="101" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="388" y="109" fill="#8fd400" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="486" y="101" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="500" y="109" fill="#8fd400" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="598" y="101" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="612" y="109" fill="#8fd400" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">already off</text><line x1="24" y1="122" x2="696" y2="122" stroke="#383833" strokeWidth="1" strokeDasharray="3 3" /><text x="38" y="143" fill="#f0efe2" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">qwen3-8-27b</text><rect x="262" y="135" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="276" y="143" fill="#8fd400" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="374" y="135" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="388" y="143" fill="#8fd400" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="486" y="135" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="500" y="143" fill="#8fd400" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="598" y="135" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="612" y="143" fill="#8fd400" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><line x1="24" y1="156" x2="696" y2="156" stroke="#383833" strokeWidth="1" strokeDasharray="3 3" /><text x="38" y="177" fill="#f0efe2" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">qwen3-8-2-4t-a95b</text><rect x="262" y="169" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="276" y="177" fill="#8fd400" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="374" y="169" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="388" y="177" fill="#8fd400" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="486" y="169" width="5" height="5" fill="#6e6d64" shapeRendering="crispEdges" /><text x="500" y="177" fill="#9a998e" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">no</text><rect x="598" y="169" width="5" height="5" fill="#6e6d64" shapeRendering="crispEdges" /><text x="612" y="177" fill="#9a998e" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">no</text><line x1="24" y1="190" x2="696" y2="190" stroke="#383833" strokeWidth="1" strokeDasharray="3 3" /><text x="38" y="211" fill="#f0efe2" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">nemotron-3-5-lightning-30b</text><rect x="262" y="203" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="276" y="211" fill="#8fd400" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><rect x="374" y="203" width="5" height="5" fill="#6e6d64" shapeRendering="crispEdges" /><text x="388" y="211" fill="#9a998e" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">no</text><rect x="486" y="203" width="5" height="5" fill="#d9a64a" shapeRendering="crispEdges" /><text x="500" y="211" fill="#d9a64a" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">conditional</text><rect x="598" y="203" width="5" height="5" fill="#76b900" shapeRendering="crispEdges" /><text x="612" y="211" fill="#8fd400" fontFamily="Consolas, Menlo, monospace" fontSize="10.5" letterSpacing="0">yes</text><line x1="24" y1="224" x2="696" y2="224" stroke="#383833" strokeWidth="1" strokeDasharray="3 3" /><rect x="21.5" y="221.5" width="5" height="5" fill="#6e6d64" shapeRendering="crispEdges" /><rect x="693.5" y="221.5" width="5" height="5" fill="#6e6d64" shapeRendering="crispEdges" /><line x1="248" y1="54" x2="248" y2="224" stroke="#383833" strokeWidth="1" strokeDasharray="3 3" /><rect x="245.5" y="51.5" width="5" height="5" fill="#6e6d64" shapeRendering="crispEdges" /><rect x="245.5" y="221.5" width="5" height="5" fill="#6e6d64" shapeRendering="crispEdges" /><line x1="360" y1="54" x2="360" y2="224" stroke="#383833" strokeWidth="1" strokeDasharray="3 3" /><rect x="357.5" y="51.5" width="5" height="5" fill="#6e6d64" shapeRendering="crispEdges" /><rect x="357.5" y="221.5" width="5" height="5" fill="#6e6d64" shapeRendering="crispEdges" /><line x1="472" y1="54" x2="472" y2="224" stroke="#383833" strokeWidth="1" strokeDasharray="3 3" /><rect x="469.5" y="51.5" width="5" height="5" fill="#6e6d64" shapeRendering="crispEdges" /><rect x="469.5" y="221.5" width="5" height="5" fill="#6e6d64" shapeRendering="crispEdges" /><line x1="584" y1="54" x2="584" y2="224" stroke="#383833" strokeWidth="1" strokeDasharray="3 3" /><rect x="581.5" y="51.5" width="5" height="5" fill="#6e6d64" shapeRendering="crispEdges" /><rect x="581.5" y="221.5" width="5" height="5" fill="#6e6d64" shapeRendering="crispEdges" /><text x="24" y="248" fill="#9a998e" fontFamily="'Helvetica Neue', Helvetica, Arial, sans-serif" fontSize="10.5" letterSpacing="0">conditional means the model cannot hold a response format while it reasons: send reasoning\_effort "none"</text><text x="24" y="262" fill="#9a998e" fontFamily="'Helvetica Neue', Helvetica, Arial, sans-serif" fontSize="10.5" letterSpacing="0">in the same request as response\_format. A feature a model does not offer is refused with 400, never ignored.</text></svg>
</div>

Working snippets for the conditional JSON case are in [Structured output](/docs/cookbook/structured-output). `reasoning_effort` is a plain top-level request field sent beside `response_format` in the same call; if your installed client's type definitions predate the `"none"` value, widen the literal at the call site, because the request that goes out is unchanged.

## Two behaviours worth knowing

**Reasoning arrives on a `reasoning` field.** These models think before they answer. That text streams on `delta.reasoning` and appears on `message.reasoning`, never on `content`. With a small `max_tokens` a model can spend the whole budget reasoning and return `content: null` with `finish_reason: "length"`. In one measurement, `nemotron-3-5-lightning-30b` returned no answer at `max_tokens: 96` and the complete answer at `max_tokens: 1200`.

**`deepseek-v4-flash` runs at maximum reasoning effort by default.** With no `reasoning_effort` sent, RunInfra sends the maximum for that model, so the id answers the same workload the public benchmarks of that name measure. On that same model, `high` and `xhigh` are also sent as maximum, because the serving stack accepts the intermediate values and then does not apply them. Both behaviours are specific to that one model, and it is the difference to control for if you are comparing hosts.

## 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](/docs/tools-sdks/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](/docs/introduction/plans) and [Rate limits](/docs/api-reference/rate-limits).

## Related

<Columns cols={3}>
  <Card title="OpenAI compatibility" icon="plug" href="/docs/tools-sdks/openai-compatibility">
    The shortest path, and what the rest of these docs assume.
  </Card>

  <Card title="Chat completions" icon="braces" href="/docs/api-reference/chat-completions">
    The full request contract.
  </Card>

  <Card title="Pricing and credits" icon="credit-card" href="/docs/introduction/plans">
    How these calls are billed.
  </Card>
</Columns>
