Text

Generate text (chat) — estimate

Price the request without executing it. Same body as POST /v1/ai/text.

post/v1/ai/text/estimate

Request

  • Base URL: https://apihub.co.il
  • URL: https://apihub.co.il/v1/ai/text/estimate
  • Auth: HTTP bearer

Request body

jsonboolean

Ask for a JSON answer

model'auto' | 'gemini-3.8-flash' | 'gemini-3.5-flash' | 'gemini-3.5-flash-lite' | 'gemini-3.1-pro-preview' | 'gemini-3.1-flash-lite'

A model id (GET /v1/ai/models) or "auto" — then quality decides: fast=gemini-3.1-flash-lite, balanced=gemini-3.5-flash, best=gemini-3.1-pro-preview

promptstring

Single-turn prompt (or use messages)

systemstring
quality'fast' | 'balanced' | 'best'

Which model auto picks: fast (cheapest) · balanced (default) · best (strongest, costs more)

max_tokensinteger

The longest answer, in tokens. A model that thinks first (Gemini 3.5 Flash, 3.8 Flash, 3.1 Pro) gets room to think on top of it — up to 8,192 tokens, billed as output like the answer — so the thinking never cuts the answer short

temperaturenumber

Response

Estimate

operationstring
estimated_creditsnumber
credits_to_reservenumber
estimated_usageobject
notestring nullable
sufficientboolean

Changes

No recorded changes to this operation across all 2 revisions of this API.