Gemini 2.5 Flash on Replicate API

Gemini 2.5 · Google DeepMind

Serverless

Last refreshed 2026-04-19. Next refresh: weekly.

Why use Gemini 2.5 Flash on Replicate API?

Replicate API offers Gemini 2.5 Flash with pay-as-you-go pricing at $0.30/1M input tokens. Replicate is a cloud-based platform that enables users to run machine learning models easily and efficiently.

Compare Gemini 2.5 Flash across 6 providers to find the best fit for your use case
Input / 1M
$0.30
Output / 1M
$2.50
Cache
Not sourced
Batch
Not sourced

Setup recipe

Python + curl
Install
pip install replicate
Auth
export REPLICATE_API_TOKEN=...
Call
import replicate
output = replicate.run(
    "google/gemini-2.5-flash",
    input={"prompt": "Hello"}
Model ID
google/gemini-2.5-flash

Request example

import replicate

# reads REPLICATE_API_TOKEN from env
# google/gemini-2.5-flash format: "owner/model-name" (latest version) or "owner/model-name:version-hash"
output = replicate.run(
    "google/gemini-2.5-flash",
    input={"prompt": "Hello"}
)
# Output is a list or generator depending on the model
print("".join(output))

Gotchas

  • Use provider model ID "google/gemini-2.5-flash", not the LLMReference slug "gemini-2.5-flash".
  • Replicate uses "owner/model-name" format (e.g. "meta/meta-llama-3-8b-instruct") for the latest version, or "owner/model-name:version-sha" to pin to a specific version. The REST endpoint splits owner and model-name into the path: /v1/models/{owner}/{model-name}/predictions.
  • The examples expect REPLICATE_API_TOKEN; rename it only if your application config maps the new variable.

Compare Gemini 2.5 Flash Across Providers

ProviderInput (per 1M)Output (per 1M)
Google AI Studio$0.30$2.50
GCP Vertex AI$0.30$2.50
Replicate API$0.30$2.50
OpenRouter$0.30$2.50
Vercel AI Gateway$0.30$2.50
View all 6 providers →

Pricing

TypePrice (per 1M)
Input tokens$0.30
Output tokens$2.50

Capabilities

VisionMultimodalJSON / Tool useStructured OutputsCode Execution

About Gemini 2.5 Flash

Google: Gemini 2.5 Flash available via OpenRouter. Pricing: $0.3/1M input, $2.5/1M output.

Get Started