Text

Generate text (chat)

Any writing task with the Gemini model you choose: a prompt or a conversation, optional system instructions, JSON answers. Add media and the model watches and listens too: understand a video to the second (what is said, shown and felt), plan an edit, read a PDF, describe images — or give a public YouTube link and the model watches it in place (find the strongest moments with timestamps, write a script from it; nothing is downloaded). Billed by the exact tokens the model reports (a video ≈ 300 tokens per second at 1 fps).

Billing: By the tokens / images / seconds the model reports — see GET /v1/ai/models for prices · Rate limit: 60/min

post/v1/ai/text

Request

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

Headers

Idempotency-Keystring

Replay-safe: the same execution is returned instead of charging twice

X-Tagstring

Group calls into one job (e.g. one video) — see GET /v1/usage?tag=…

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

Completed

idstring

Execution id — stable across internal retries; use it with GET /v1/executions/{id}

status'pending' | 'processing' | 'completed' | 'partial' | 'failed' | 'cancelled' | 'timeout'
operationstring
tagstring nullable

Your X-Tag, if sent

created_atstring date-time
completed_atstring date-time nullable
outputobject

Operation result (see each operation). While a Studio render is processing: stage (queued · transcribing · downloading · preparing · cleaning_voice · mixing_audio · rendering · finishing), phase (the engine's: download · prepare · voice · audio · encode · qa · upload, or null), progress (a percent, 0–100) and progress_fraction (0–1), eta_seconds (seconds left, never below 0) and estimate_seconds

errorstring nullable

Changes

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