Images

Generate or edit an image — estimate

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

post/v1/ai/image/estimate

Request

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

Request body

model'auto' | 'gemini-3.1-flash-image' | 'gemini-nano-banana-2.1' | 'gemini-3.1-flash-lite-image' | 'gemini-3-pro-image'

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

ultraboolean

ULTRA: true = the image is made with Nano Banana Pro (gemini-3-pro-image) at 2K or larger, whatever model, quality and resolution are sent, at 3× the credits of the same request without ULTRA (the estimate's ultra block shows both prices — POST …/estimate before you run it). Only for accounts that have bought credits at least once (402 ultra_paid_only, with the account's top-up page in details.top_up) and where ULTRA is switched on (else 403 ultra_unavailable). Nothing is charged when it is refused.

promptstring required
quality'fast' | 'balanced' | 'best'

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

resolution'512px' | '1K' | '2K' | '4K'
aspect_ratio'1:1' | '4:5' | '3:4' | '2:3' | '9:16' | '16:9' | '4:3' | '3:2' | '21:9'
reference_imagesstring[]

Images to edit or to take style/characters from

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.