Skip to content

Effort

One optional knob biases any call toward latency, cost, or quality — no model swap and no code rewrite.

The preferred form is the X-DI-Effort header, which you can set once on the client so it applies to every request. A ?effort= query parameter works too.

client = OpenAI(
api_key="llm_live_...",
base_url="https://api.directinference.com/di/v1",
default_headers={"X-DI-Effort": "high"},
)

Lower levels bias toward cost and latency; higher levels bias toward quality — model order, retries, and repair budget. Effort tunes the chosen request type; it does not pick the type. Higher effort generally means more reasoning before the answer — see Reasoning output for how it appears in responses. Prefer a model id over a header? The catalog also lists di-saver and di-max — the same model with effort pinned — for model pickers and fast/smart slots (Listing models).

fastminimallowmediumhighxhighmax

cheaper / faster → higher quality

LevelBias
autoInferred from model intent and use case (the default).
fastLowest latency and cost; can keep simple work on cheaper models.
noneAlias for fast — OpenAI’s “disable reasoning” value, accepted anywhere fast is.
minimalMinimal spend; trims optional steps.
lowLeans cheaper and faster.
mediumBalanced cost and quality.
highLeans toward quality — model order and retries.
xhighStronger quality bias; more repair budget.
maxMaximum quality bias regardless of cost.

If several effort signals are present, the first one found wins, in this order:

  1. X-DI-Effort request header
  2. ?effort= query parameter
  3. OpenAI reasoning.effort or reasoning_effort
  4. Gemini thinking config
  5. Anthropic thinking.budget_tokens
  6. Model suffix, e.g. claude-sonnet-4-6@xhigh or gpt-5:fast
  7. Auto inference from model intent and use case

Already set a provider’s reasoning or thinking control? DI reads it as the effort signal — no X-DI-Effort needed. OpenAI reasoning_effort / reasoning.effort and Gemini thinkingConfig.thinkingLevel are used as the effort level directly (nonefast). Token budgets map to the nearest band:

Gemini thinkingBudgetEffort
0fast
1 – 2,048minimal
2,049 – 8,192low
8,193 – 16,384medium
16,385 – 32,768high
32,769 – 65,536xhigh
65,537+max
Anthropic budget_tokensEffort
disabled or ≤ 0auto
1 – 4,096low
4,097 – 8,192medium
8,193 – 16,384high
16,385 – 32,768xhigh
32,769+max