quote
Read archived generation price and wait metadata without spending. Free.
Validates the retained input schema and computes its historical price ceiling,
balance, cap blocker, and wait metadata. It does not authorize or predict a runnable
operation: generate_hooks is archived and always fails before work or billing.
Errors: unauthorized, invalid_request, rate_limited.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Generation engine and therefore the price: instant (0 base + 1/hook, deterministic templates, sub-second), smart (0 + 2/hook, one LLM call, seconds), research (10 + 4/hook, brief->draft->judge, tens of seconds). Aliases: template|off|quick->instant, llm|on|fast->smart, search|deep|deep_research->research. Omit (or auto) -> smart when an LLM key is configured, else instant. | |
| count | No | Historical generation count, 1-25. It drives compatibility price metadata only; the archived writer cannot run. | |
| topic | Yes | Historical generation topic, 3-200 chars. This compatibility tool validates stored-client inputs but cannot authorize a writer. | |
| api_key | No | API key for this call. Omit to fall back to the Authorization: Bearer / X-API-Key request header (streamable-HTTP only), then the VHGENGINE_API_KEY env var (the stdio default). No key resolvable -> unauthorized. | |
| platform | No | Target platform, which selects the length/format conventions the hooks are written and scored against. Defaults to tiktok when omitted. | tiktok |
| archetypes | No | Restrict generation to these archetype ids (see list_archetypes). Omit to let the engine spread across archetypes, which is what you want unless you are deliberately narrowing a deck. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | The hook count quoted. | |
| topic | No | The topic as validated (echoed back). | |
| blocker | No | Null when affordable. Otherwise the SAME typed error block generate_hooks would have returned ({code, message, retriable, details, ...}), whose details.hint names the exact fix. | |
| formula | No | The exact charge formula, so you can predict any other count. | |
| platform | No | The platform quoted. | |
| operation | No | The operation this quote prices ('generate_hooks'). | |
| affordable | No | true when a generate with these arguments would pass every pre-flight gate (balance AND any daily account/key spend cap). Branch on THIS. | |
| base_price | No | Fixed part of the charge for pricing_mode. | |
| credits_max | No | The CEILING: base_price + price_per_hook * count. The real charge bills hooks RETURNED, so a short deck costs less. Never more than this. | |
| pricing_mode | No | The tier that will actually be BILLED after aliases and auto were resolved: instant|smart|research. This, not mode_requested, is what the price belongs to. | |
| credits_short | No | How many credits you are missing; 0 when affordable. Against a daily cap this is the gap to the remaining daily headroom, not to your balance. | |
| expected_wait | No | {mode, p50_ms, p90_ms, source} for pricing_mode. Compare p90_ms against your own patience to choose sync vs start_generate_job + wait_for_job. | |
| llm_configured | No | Whether this deployment has an LLM key. false means smart/research are unavailable and mode=auto resolves to instant. | |
| mode_requested | No | The mode string you passed, before resolution; null if omitted. | |
| price_per_hook | No | Per-hook part of the charge for pricing_mode. | |
| recommendation | No | One sentence naming the next call to make. | |
| credits_remaining | No | Your balance right now. |