Quote a call
/v1/tools/{tool}/quote Needs an API keyPrice a call before making it: the provider that would serve it, and what it would cost.
Takes the same body as POST /v1/tools/{tool}/calls. A tool, input, provider or require the call would refuse is refused with the same error. No provider is called, nothing is charged or reserved, and no call is recorded. cost is what the call would charge you if the serving provider serves it. max_cost is the most the call can be charged if a fallback provider serves it: what your balance reserves while the call runs.
Unlike a call, a quote ignores your balance, reuse_within and label, and any API key may ask for one, read-only and test keys included.
Path parameters
toolstringRequiredThe tool's ID, such as google.serp.organic.
Request body
What to call a tool with.
inputobjectRequiredThe tool's input, as its input schema describes.
providerstringServe the call from this provider only. Omit to use the cheapest that can.
1 or more characters.
Can be null.
requirearray of stringOutputs the serving provider must return, by name. Only providers that return each optional one are used; a required one is always returned, so naming it changes nothing.
Each item: 1 or more characters.
Can be null.
reuse_withinintegerReuse a result instead of calling again: if your workspace has a succeeded call with the same tool, input, provider and require made within this many seconds (1 to 2592000, 30 days), the newest such call is returned with reused: true. No provider is called, nothing is charged and no call is recorded; id and cost are that earlier call's. Omit to always make a new call.
From 1 to 2592000.
Can be null.
labelstringA name of your choosing for the call, 1 to 100 characters, to find it again by. Not unique. Ignored when the answer is a reused or replayed call.
1 to 100 characters.
Can be null.
waitintegerSeconds to wait for the call to finish, 0 to 50. A call that finishes in time is answered with its result. One still running is answered with status: "pending": it goes on running, and reading the call again by its id returns its result. 0 answers at once.
From 0 to 50.
Response
What the call would cost now. What a call with this request would cost now. Making a quote is free and changes nothing.
provider is the provider that would serve the call, and cost what it would charge: for a provider priced per result, the most it can, and per call and result, with the results the request asks for. If it fails, the next provider serves, so max_cost is the most the call can be charged whichever serves: what your balance reserves while it runs. A call your available balance cannot cover at max_cost is refused. Prices can change between a quote and a call.
toolstringThe tool quoted.
providerstringThe provider that would serve the call.
costobjectWhat the call would cost you if provider serves it.
cost.provider_usdstringThe data provider's part of total_usd.
cost.platform_fee_usdstringVoxoria's part of total_usd.
cost.total_usdstringThe price: the sum of the other two.
max_costobjectThe most the call can cost whichever provider serves it: what your balance reserves while it runs.
max_cost.provider_usdstringThe data provider's part of total_usd.
max_cost.platform_fee_usdstringVoxoria's part of total_usd.
max_cost.total_usdstringThe price: the sum of the other two.
The request was refused.
The API key is missing, wrong or revoked.
A subscription is required.
No tool has this ID.
The tool cannot be called yet.
The request is not valid (VALIDATION, with errors), or no provider can serve it (NO_ELIGIBLE_PROVIDER).
Too many requests with this API key.
Retry-After: Seconds until the limit resets.
The tool is not available right now. Retry shortly.