All models

Google

Gemini 3.1 Flash Image

gemini-3.1-flash-image image generation. Submit a task, check its status and download the result.

imagebackground generation
gemini-3.1-flash-image
Open in playground

Our price

$0.020446

per image

Official output price

No verified reference for this exact variant

First request

Available
# Set OPERATION_ID once per generation; reuse it when retrying.
OPERATION_ID=$(python3 -c "import uuid; print(uuid.uuid4())")
curl https://api.tokely.me/v1/media/tasks \
  -H "Authorization: Bearer $TOKELY_API_KEY" \
  -H "Idempotency-Key: $OPERATION_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gemini-3.1-flash-image",
  "prompt": "A quiet coastal village at sunrise.",
  "metadata": {}
}'

# Read the returned task_id, then check its status:
curl https://api.tokely.me/v1/media/tasks/TASK_ID \
  -H "Authorization: Bearer $TOKELY_API_KEY"

# When complete, list downloadable results:
curl https://api.tokely.me/v1/media/tasks/TASK_ID/artifacts \
  -H "Authorization: Bearer $TOKELY_API_KEY"

Set TOKELY_API_KEY to your dashboard key. Requests require a funded Tokely balance. Base URL: https://api.tokely.me/v1.

Capabilities & limits

Provider
Google
API model ID
gemini-3.1-flash-image
Category
Image
Endpoints
POST /v1/media/tasks
Output
Image · background task
Supported input
Prompt
Per image
$0.020446 per image

API reference

Send duration at the top level, reference images as images, and other model settings in metadata. The Playground generates a matching API request.

Authenticate with Authorization: Bearer YOUR_TOKELY_API_KEY. Use your Tokely base URL and API key.

model
Required string: gemini-3.1-flash-image
prompt (required)
Text, up to 1000 characters

Requests are charged to your Tokely balance using the options and rates shown above. Your dashboard records usage.

Save the returned task ID. Check its status, then list its artifacts and download them with your API key. Stopping the browser’s progress checks does not cancel an accepted generation.

400 / 415
Invalid request, parameter, endpoint for this model, or content type.
401 / 403
Invalid, revoked or restricted API key.
402
Insufficient account balance or API key budget.
429
Request limit reached. Retry after the indicated delay.
502 / 503 / 504
Upstream failure, temporary service unavailability or request timeout.

Compare nearby prices

USD for the listed variants with the same billing unit. Generation options can differ; these are not quality benchmarks.
ModelPriceUnitVariant
Gemini 3.1 Flash ImageGoogle · this model$0.020446imagePer image
Gemini Nano Banana 2.1Google$0.015965imagePer image
Grok Imagine Image 2.0SpaceXAI$0.031765imagePer image
Gemini 3 Pro ImageGoogle$0.040768imagePer image

Compare equivalent generation settings

Match model version, duration, resolution and input requirements before comparing two prices. Results are kept for 30 days; download those you need to keep.

Compare image API costs · Google models · Methodology

Frequently asked questions

How much does Gemini 3.1 Flash Image cost?

Per image: $0.020446 per image. Usage is charged to your Tokely balance.

Do I need a separate Google account?

Use your Tokely API key and balance. A separate provider key is not required.

How do I switch to this model?

Set model to gemini-3.1-flash-image and use /v1/media/tasks. Keep your Tokely base URL and API key. Use the parameters listed above for this model.

How do I get the completed result?

Save the task ID from your request, check its status, then download the completed artifacts with your Tokely API key.

Related versions