xpay✦ pay-per-use icon

xpay✦ pay-per-use

Discover and execute marketplace services with automatic payment handling

Model → Estimate Cost

AI-generated

Summary

Estimate the cost of a model inference by specifying the model and the estimated number of input and output tokens.

Inputs

  • Model (required) — Select the LLM model to estimate cost for, loaded dynamically from available models.
  • Input Tokens — Enter the estimated number of input tokens to be sent to the model.
  • Output Tokens — Enter the estimated number of output tokens expected from the model response.

Output shape

a single JSON object containing the cost estimate details along with the input parameters used (modelId, inputTokens, outputTokens).

The returned JSON includes an 'estimate' object with cost information from the API. If the API call fails and 'Continue On Fail' is enabled, an error message may be returned instead.

Links

Discussion