gemini-2.5-flash API
Gemini 2.5 Flash is Google's price-performance workhorse: a fast hybrid-reasoning model with a 1,048,576-token context window. On CaMeL Hub you call it with any OpenAI-compatible SDK — just set base_url to https://api.camel-hub.com/v1 — at $0.30 per 1M input tokens and $2.50 per 1M output tokens, metered pay-as-you-go.
Pricing
| per 1M input tokens | per 1M output tokens | |
|---|---|---|
| CaMeL Hub | $0.3 | $2.4999998999999997 |
| Provider list price | $0.3 | $2.5 |
Prices are the public default-group rate in USD per 1M tokens; input and output are billed separately. · Provider list price · verified 2026-07-11
Specifications
- Provider
- Context window
- 1048576 tokens
- Max output
- 65536 tokens
- Capabilities
- streaming, vision, function-calling
- Endpoints
- gemini, openai
What it is good for
- Bulk document summarization — digest 100+ page reports, contracts or wikis in one request using the 1M-token window
- Customer-facing chatbots where response latency matters and function calling drives lookups (order status, account data)
- Structured extraction from images: invoices, receipts, screenshots and scanned forms into JSON via vision input
- Agent tool-use loops — routing, retrieval and multi-step function calling where per-step cost must stay low
- Large-scale classification, tagging and content-moderation pipelines that run millions of tokens per day
- Meeting-transcript and codebase Q&A where the entire source fits in context instead of a RAG index
Quickstart
OpenAI-compatible: set base_url to https://api.camel-hub.com/v1 and use your CaMeL Hub API key. No SDK changes needed.
cURL
curl https://api.camel-hub.com/v1/chat/completions \
-H "Authorization: Bearer $CAMEL_HUB_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-2.5-flash",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Python
from openai import OpenAI
client = OpenAI(
api_key="$CAMEL_HUB_KEY",
base_url="https://api.camel-hub.com/v1", # <-- the only change vs. the OpenAI default
)
resp = client.chat.completions.create(
model="gemini-2.5-flash",
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)
Node.js
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.CAMEL_HUB_KEY,
baseURL: "https://api.camel-hub.com/v1", // <-- the only change vs. the OpenAI default
});
const resp = await client.chat.completions.create({
model: "gemini-2.5-flash",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(resp.choices[0].message.content);
Get an API key Browse integration guides
Frequently asked questions
How is Gemini 2.5 Flash billed on CaMeL Hub?
Input and output tokens are metered separately: $0.30 per 1M input tokens and $2.50 per 1M output tokens. Any reasoning (thinking) tokens the model generates count as output tokens. There is no per-request fee and no minimum spend — you pay only for what you use.
Does Gemini 2.5 Flash support streaming, function calling and images?
Yes to all three. You can stream responses token-by-token, define tools/functions for the model to call, and send images (e.g. via image_url in the OpenAI-compatible chat format) for vision tasks like screenshot analysis or document extraction.
How large is the context window?
Google documents a 1,048,576-token input limit and a 65,536-token output limit for gemini-2.5-flash. That is roughly 3,000+ pages of English text in a single prompt, so most long-document jobs need no chunking at all.
Do I have to use Google's SDK to call it?
No. On CaMeL Hub the model works with any OpenAI-compatible client: point base_url at https://api.camel-hub.com/v1, set model to gemini-2.5-flash, and your existing openai-SDK code runs unchanged. A native Gemini-format endpoint is also available if your tooling expects Google's API shape.
How do I get started?
Create an account at https://api.camel-hub.com/console, generate an API key, then call the model with base_url https://api.camel-hub.com/v1 and model name gemini-2.5-flash. Top up via Alipay, WeChat Pay or international cards; usage is deducted per token as you go.