Fallback models
Sendmodels instead of a single model. The gateway tries each in order and the response reports which one answered.
model in the response, or the by_model rows in usage, to see where traffic landed.
Provider preferences
Theprovider object controls which providers serve a model:
usage.cost reflects the chosen provider’s price, so max_price bounds your credit spend per token. The :nitro variant is shorthand for throughput sorting.
Reasoning
reasoning (an object) and reasoning_effort (a string) request thinking on models that support it. Reasoning tokens are output tokens for billing.
Plugins and web search
plugins accepts web, file-parser, response-healing, and context-compression. web_search_options tunes the web plugin. Plugin costs are included in usage.cost.
Other pass-through fields
If you send
user, keep it stable per end user so abuse reports can be attributed. The gateway sets it when absent.
