Parameters
string
required
The metered metric you want to price. Examples include
"llm_input_tokens", "llm_output_tokens", "memories_ingested", and "retrievals". Match the metric you’d expect to see in the ledger.float
required
How many units of
metric_type the planned operation would consume (e.g. number of tokens, number of memories).int
Optional count of discrete items the operation would touch. Some metrics price differently for batched vs. single-item operations.
string
Operation identifier the quote is scoped to. Lets the server apply the right rate when a metric has different pricing across operations. Leave unset to use the default rate for the metric.
string
Processing mode for the planned operation (for example
"fast" or "long-range" for ingestion: the ingestion axis of Retrieval Modes). Some metrics price differently per mode.Returns
CreditEstimate with the quoted cost.
float
The credit amount that would be debited if the operation ran with the supplied parameters at the current rate. No credits are spent by this call.
Example
Raises
SynapAuthError: when the API key is missing or invalid.SynapValidationError: whenmetric_typeis not recognized orunitsis negative.