Estimate the cost of a Synap call
synap_estimate_costWork out what a chat completion would cost on Synap from token counts, using the live price list. Use this before synap_chat_completion when budget matters, or to compare models for a job. Free, read-only, needs no API key and runs no model. Returns {model, prompt_tokens, completion_tokens, prompt_usd, completion_usd, total_usd, pricing}. It is an estimate: the real charge uses the token counts the model reports afterwards. Auto-routing ids such as "synap-v1" have no fixed price and return an error saying so.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Model id exactly as returned by synap_list_models. | |
| prompt_tokens | Yes | Tokens you will send (system + conversation). Roughly 4 characters of English per token. | |
| completion_tokens | No | Tokens you expect back. Use your max_tokens for a worst case. Defaults to 0. |