API reference

Get a tool quote

POST/v1/tools/{id}/quote

Unified 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_KEY

Authentication schemes: BearerAuth

Request

Path parameters

  • idstringRequired

    Catalog 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

  • versionstringRequired

    Required nonempty tool contract version. Use the exact version from details; it does not default to the current version.

    Minimum length
    1
    Pattern
    ".*\\S.*"
  • inputunknownRequired

    Must 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_idstringRequired

    Public quote ID; must satisfy price and request binding on creation.

  • maximum_usdstringRequired

    Maximum USD reservation for this normalized input.

  • price_versionintegerRequired

    Selling price revision.

  • expires_atintegerRequired

    Expiration in Unix seconds; tool quotes are valid for 300 seconds, subject to the actual expires_at.

  • componentsunknownRequired

    JSON value defined by the selected tool's schema or protocol; do not assume fixed fields.

  • tool_idstringRequired

    Tool ID bound to this quote.

  • versionstringRequired

    Exact tool contract version bound to this quote.

HTTP 400

Invalid request fields or parameters.

application/json

Type
object
Required fields
error

HTTP 401

The key is missing, invalid, expired, or revoked.

application/json

Type
object
Required fields
error

HTTP 403

Insufficient IP, account, model, or tool permissions.

application/json

Type
object
Required fields
error

HTTP 404

Object/capability unavailable, or feature switch disabled.

application/json

Type
object
Required fields
error

HTTP 409

Idempotency/quote conflict, object not ready, or still referenced.

application/json

Type
object
Required fields
error

HTTP 429

Request/queue rate limit.

application/json

Type
object
Required fields
error

HTTP 500

Internal authentication or data storage failure.

application/json

Type
object
Required fields
error

HTTP 503

Service, pricing, or storage unavailable.

application/json

Type
object
Required fields
error