API reference
Get a tool quote
/v1/tools/{id}/quoteUnified support for flat constant per-call pricing, input pricing precomputed from inputs, and usage pricing based on final usage. pricing.quote_required determines whether a quote is mandatory; requires_usage determines whether a cost cap and authoritative final usage are required. Neither is inferred from schema_version. When metered_pricing is off, only new calls requiring final usage are restricted; constant/input rules remain available if they need no final usage. The current key must have tool authorization; run identity and results are scoped to the original key. The catalog is empty when the master tool switch is off; the anonymous catalog is not executable authorization. The path id supplies the tool identity. The public quote body accepts only required nonempty version and input conforming to input_schema; extra fields such as tool_id, quote_id, and max_cost_usd are rejected. Quotes are valid for 300 seconds and bind the same key, exact version, normalized input, and pricing configuration. They echo tool_id/version/maximum_usd and do not execute a task.
Authentication and permissions
Use your current GloopAPI key. Available models, capabilities and permissions depend on its catalog and the endpoint documentation.
Authorization: Bearer $GLOOP_API_KEYAuthentication schemes: BearerAuth
Request
Path parameters
idstringRequiredCatalog tool ID or original tool run ID, depending on the current operation's object.
Request body · application/json
- Type
- object
- Required fields
versioninput- Additional properties
- false
Request body required
versionstringRequiredRequired nonempty tool contract version. Use the exact version from details; it does not default to the current version.
- Minimum length
1- Pattern
".*\\S.*"
inputunknownRequiredMust pass the input_schema for this tool version. Only canonical JSON is accepted; additional fields such as the administrator route_id are prohibited.
Responses and errors
HTTP 200
Tool quote retrieved successfully
application/json
- Type
- object
- Required fields
quote_idmaximum_usdprice_versionexpires_atcomponentstool_idversion
quote_idstringRequiredPublic quote ID; must satisfy price and request binding on creation.
maximum_usdstringRequiredMaximum USD reservation for this normalized input.
price_versionintegerRequiredSelling price revision.
expires_atintegerRequiredExpiration in Unix seconds; tool quotes are valid for 300 seconds, subject to the actual expires_at.
componentsunknownRequiredJSON value defined by the selected tool's schema or protocol; do not assume fixed fields.
tool_idstringRequiredTool ID bound to this quote.
versionstringRequiredExact tool contract version bound to this quote.
HTTP 400
Invalid request fields or parameters.
application/json
- Type
- object
- Required fields
error
errorobjectRequirederror child fields (4)
codestringOptionalmessagestringOptionaltypestringOptionalrequest_idstringOptional
HTTP 401
The key is missing, invalid, expired, or revoked.
application/json
- Type
- object
- Required fields
error
errorobjectRequirederror child fields (4)
codestringOptionalmessagestringOptionaltypestringOptionalrequest_idstringOptional
HTTP 403
Insufficient IP, account, model, or tool permissions.
application/json
- Type
- object
- Required fields
error
errorobjectRequirederror child fields (4)
codestringOptionalmessagestringOptionaltypestringOptionalrequest_idstringOptional
HTTP 404
Object/capability unavailable, or feature switch disabled.
application/json
- Type
- object
- Required fields
error
errorobjectRequirederror child fields (4)
codestringOptionalmessagestringOptionaltypestringOptionalrequest_idstringOptional
HTTP 409
Idempotency/quote conflict, object not ready, or still referenced.
application/json
- Type
- object
- Required fields
error
errorobjectRequirederror child fields (4)
codestringOptionalmessagestringOptionaltypestringOptionalrequest_idstringOptional
HTTP 429
Request/queue rate limit.
application/json
- Type
- object
- Required fields
error
errorobjectRequirederror child fields (4)
codestringOptionalmessagestringOptionaltypestringOptionalrequest_idstringOptional
HTTP 500
Internal authentication or data storage failure.
application/json
- Type
- object
- Required fields
error
errorobjectRequirederror child fields (4)
codestringOptionalmessagestringOptionaltypestringOptionalrequest_idstringOptional
HTTP 503
Service, pricing, or storage unavailable.
application/json
- Type
- object
- Required fields
error
errorobjectRequirederror child fields (4)
codestringOptionalmessagestringOptionaltypestringOptionalrequest_idstringOptional