Supported tools
The gateway prices these hosted tools when the provider and model offer them:web_search,web_fetch,url_context,image_search, andx_searchcode_executionandcode_interpreterfile_searchimage_generationmaps
How hosted tools are billed
Credits pay for a hosted tool in the unit the provider bills, such as a search call, a generated image, or an hour of container time. Some tools also bill tokens, such as the search results a model reads or the tokens an image model uses. Some tools cost nothing beyond the model’s tokens. Those tools have no separate rate, and their usage bills at the model’s token rates. The tokens a hosted tool adds to the prompt also count toward the processing fee. Free allowances a provider grants, such as free container hours, don’t reduce what credits pay. Credits pay for every hosted-tool call at the listed rate.Find a tool’s price
The List Models API returns each tool’s rates inproviders[].pricing.rates, next to the model’s token rates.
A hosted-tool rate has the tool name as its type.
gpt-4o lists two web search rates:
currency per unit.
Common hosted-tool units are request, image, hour, gb_day, query, grounded_prompt, and container_session.
When a tool has more than one rate, conditions says which requests each rate applies to:
A tool that bills only through the model’s tokens has no rate of its own in the list.
Limits and availability
If a model’s price list doesn’t include a hosted tool, you can’t pay for that tool with credits on that model. The gateway rejects the request withERR_NGROK_27238 before it reaches the provider.
To use the tool, remove it from the request, pick another model, or attach your own provider key.
Custom providers don’t use hosted-tool rates, because you set their pricing yourself.
Next steps
- Credits: Buy credits and see what they pay for
- Pay with credits: Call models with only an access key
- List Models API: Read model and hosted-tool pricing