Vertex AIImageAvailable now

gemini-3.1-flash-image

gemini-3.1-flash-image is an image tool from Vertex AI that runs in the background and returns images. Pay as you go, with one API key.

Run time p50 · last 24 hours
17.2s
Success rate · last 24 hours
61.2%

Pricing

$0.0874 per 1K image ($0.0583 at 0.5K, $0.131 at 2K, $0.197 at 4K). Prompt: $0.65 per 1M tokens ($0.065 cached). Reasoning: $3.90 per 1M tokens. Google Search: $0.0182 per query.

Limits

Runs
In the background
Returns
image
Longest queue wait
1 hour
Run deadline
30 minutes
Longest run, end to end
225 minutes
Largest inline input
1 MB
Largest input file
500 MB
Largest output
5 GB
Outputs per run
16

Input

FieldKindDefaultDescription
contents requiredJSON—

The content of the current conversation with the model.

toolsJSON—

Grounding with Google Search, the only tool this model takes (web and image search). Set generationConfig.responseModalities to ["TEXT", "IMAGE"]. Every search query the model runs is billed.

generationConfigJSON—

Configuration options for model generation and outputs.

systemInstructionJSON—

Developer set system instruction(s).

Same request in code

curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "vertex",
    "model": "gemini-3.1-flash-image",
    "input": {
      "contents": {}
    }
  }'