Qora API — AI API Gateway for Developers

AI API Gateway for Developers

One clear API workflow for your apps, scripts and automations.

Cheap Gemini API: How to Use Gemini 2.5 Pro and Flash with One API Key

Looking for a cheap Gemini API? The cheapest way to call Gemini on Qora is gemini-2.5-flash at $0.12 input and $0.48 output per 1 million tokens. The stronger model, gemini-2.5-pro-preview-06-05, costs $0.75 input and $6.00 output per 1 million tokens. Both work through one OpenAI-compatible API key at https://qoraapi.com/v1 — no Google Cloud account, no separate Gemini billing, no code rewrite.

This guide shows you the exact model names to use, the exact prices, working code you can copy, and how to pick Pro or Flash for each job so you stop paying Pro prices for Flash work. All prices in this article are Qora Model Square prices, checked on October 27, 2026.

How Much Does the Gemini API Cost on Qora?

Gemini pricing is per token. You pay separately for input tokens (the text you send) and output tokens (the text the model writes). Output costs more than input on every Gemini model, so long answers are the expensive part of any Gemini bill.

ModelInput (per 1M tokens)Output (per 1M tokens)
gemini-2.5-flash$0.12$0.48
gemini-2.5-flash-preview-04-17$0.18$0.72
gemini-2.0-flash$0.18$0.72
gemini-2.5-pro-preview-03-25$0.375$3.00
gemini-2.5-pro-preview-06-05$0.75$6.00
gemini-2.5-pro-preview-05-06$0.75$6.00

Two things matter here. First, there is no plain gemini-2.5-pro model ID on the Model Square. The Pro model is listed under dated preview names, and the one used in this article is gemini-2.5-pro-preview-06-05. If you send gemini-2.5-pro as the model name, the request will fail with a model-not-found error. Second, the two Pro previews do not cost the same: the 03-25 snapshot is $0.375 input and $3.00 output, exactly half the price of the 06-05 and 05-06 snapshots.

A worked example makes the gap concrete. Suppose you send 1 million input tokens and generate 200,000 output tokens. On gemini-2.5-flash, that costs $0.12 + $0.096 = $0.216, about 22 cents. On gemini-2.5-pro-preview-06-05, the same work costs $0.75 + $1.20 = $1.95. Same tokens, nine times the price.

Gemini 2.5 Pro vs Flash: Which One for Which Job?

Flash and Pro are not two versions of the same tool. They are priced for different jobs, and using Pro for a Flash job is the most common way people overpay for Gemini.

Use Flash for high-volume, routine work: classifying tickets, extracting fields from invoices, summarising short documents, and drafting first-pass replies. Flash costs $0.12 per million input tokens, so 10 million input tokens costs $1.20.

Use Pro when the task needs deeper reasoning or a long, tangled input: debugging a multi-file problem, analysing a 50-page contract, or planning a multi-step task. Pro costs $0.75 per million input tokens on the 06-05 snapshot, and its output costs $6.00 per million tokens.

A practical rule: start every feature on Flash. Run it against your real inputs and check the outputs. If Flash gets the answer right, you are done, and your Gemini bill stays small. If Flash fails on a specific kind of input — long documents, multi-step reasoning, tricky edge cases — route only that kind of input to Pro. For the general routing playbook, see How to Reduce AI API Costs: A Practical Guide for Developers.

Set Up Gemini with One API Key

You need a Qora API account and key. Sign up at https://qoraapi.com/, create a key in the Console, and top up your balance. Qora is pay-as-you-go in USD, with a minimum top-up of $50. If your balance is zero, your first request will fail even if the key is correct, so check the balance in the Console first.

Test with cURL

This calls gemini-2.5-flash through the Qora endpoint. Replace $QORA_API_KEY with your key, or export it first with export QORA_API_KEY="sk-...".

curl https://qoraapi.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $QORA_API_KEY" \
  -d '{
    "model": "gemini-2.5-flash",
    "messages": [
      {"role": "user", "content": "Summarise this in three bullet points: Gemini is fast and cheap."}
    ],
    "max_tokens": 300
  }'

A successful response returns a JSON object with choices[0].message.content. If you get 401, the key is wrong or missing. If you get 404, the model name is wrong — copy it exactly from the Model Square. If you get 429, you hit a rate limit; wait and retry.

Use Gemini from Python

The same call works with the OpenAI Python SDK, because Qora is OpenAI-compatible. Only the base URL and the model name change.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://qoraapi.com/v1",
    api_key=os.environ["QORA_API_KEY"],
)

response = client.chat.completions.create(
    model="gemini-2.5-flash",
    messages=[{"role": "user", "content": "List three uses for Gemini Flash in one sentence each."}],
    max_tokens=300,
)
print(response.choices[0].message.content)

To switch to Pro, change one string: model="gemini-2.5-pro-preview-06-05". Nothing else in the code changes. For the general OpenAI-compatible setup, see OpenAI-Compatible API: One Key for GPT, Claude & Gemini.

Stream the Reply for Chat Apps

For a chatbot or a live interface, stream the response instead of waiting for the full answer. Streaming does not change the price — you pay for the same tokens — but the user sees the first words in under a second instead of waiting for the whole reply.

stream = client.chat.completions.create(
    model="gemini-2.5-flash",
    messages=[{"role": "user", "content": "Give me three tips for saving on API costs."}],
    max_tokens=300,
    stream=True,
)
for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

How to Cut Your Gemini Bill Further

Routing to Flash is the biggest saving. Three smaller habits add up after that.

First, ask for less output. Output tokens cost four times as much as input tokens on Flash ($0.48 vs $0.12) and eight times as much on Pro ($6.00 vs $0.75). A vague prompt such as “tell me about this document” produces a long answer and a large bill. A specific prompt produces a short answer: “Return a JSON object with three fields — summary, key_dates, and action_items. No other text.” Set max_tokens as a hard cap, and treat a response that hits the cap as a signal to split the task.

Second, keep repeated context stable. If every request starts with the same system prompt, instructions, or reference document, do not rewrite it on every call and do not shuffle its order. Stable, repeated input is what makes prompt caching work when the provider offers it. This article does not quote a Gemini cache discount, because no Gemini cached-input price was verified for this guide — check the Model Square for the current cached-input price on the model you use before relying on a specific number.

Third, batch work that can wait. Summarising documents, labelling data, and generating nightly reports do not need an answer in seconds. If your provider offers a lower price for non-urgent batch requests, use it for that work and keep Flash for live traffic. For more on batching, see the 2026 AI API Cost Index.

Gemini vs Claude, GPT, and DeepSeek Prices

Gemini Flash is cheap, but it is not the cheapest model on Qora for every job. Here is how it compares with the alternatives named in this article, per 1 million tokens:

ModelInputOutputCheapest for
gemini-2.5-flash$0.12$0.48High-volume routine text work
claude-3-5-haiku-20241022$0.15$0.75Short, fast tasks where Claude quality matters
deepseek-chat$0.30$1.20Cheap general chat and code
gpt-5$0.45$3.60General work where GPT behaviour is expected
gemini-2.5-pro-preview-06-05$0.75$6.00Hard reasoning and long documents
claude-3-5-sonnet-20241022$0.90$4.50Complex code and long-form writing

The practical takeaway: Flash beats Haiku on price for routine work ($0.12 vs $0.15 input), and both are far cheaper than Sonnet or GPT-5. But if your task needs Claude’s writing style or GPT’s tool behaviour, the cheapest model that fails the task is the most expensive one — you pay twice, once for the failure and once for the retry. Test Flash on your real inputs first. For a direct gateway comparison, see OpenRouter vs Qora API: Which Cheap AI API Gateway Is Better in 2026?

Three Mistakes That Waste Money on Gemini

The first mistake is the model name. gemini-2.5-pro does not exist on the Model Square, and neither does gemini-pro or gemini-flash on its own. The working names are gemini-2.5-flash and gemini-2.5-pro-preview-06-05 (or another dated preview). A 404 error almost always means the name is wrong.

The second mistake is the base URL. It must be exactly https://qoraapi.com/v1, with no trailing slash and no /chat/completions path. Clients add the rest of the path themselves. If you paste https://qoraapi.com/v1/chat/completions as the base URL, the client builds a doubled path and every request fails.

The third mistake is running Pro as the default. It is tempting to set Pro everywhere “to be safe”. On the 06-05 snapshot, 1 million input tokens cost $0.75 on Pro against $0.12 on Flash, and output costs $6.00 against $0.48. A feature that sends 10 million input tokens a day costs $7.50 a day on Pro and $1.20 a day on Flash. Default to Flash, escalate to Pro only where Flash fails.

FAQ

What is the cheapest Gemini API?

On Qora, gemini-2.5-flash is the cheapest Gemini model in this guide: $0.12 input and $0.48 output per 1 million tokens, checked on the Model Square on October 27, 2026. For harder tasks, gemini-2.5-pro-preview-03-25 costs $0.375 input and $3.00 output — half the price of the newer Pro preview.

How much does Gemini 2.5 Pro cost per 1M tokens?

On Qora, gemini-2.5-pro-preview-06-05 costs $0.75 input and $6.00 output per 1 million tokens. The older snapshot gemini-2.5-pro-preview-03-25 costs $0.375 input and $3.00 output. There is no plain gemini-2.5-pro model ID on the Model Square — use the exact dated preview name.

Is Gemini 2.5 Flash good for coding?

Flash is good for routine coding tasks: small fixes, explanations, formatting, and simple generation. For complex refactoring or multi-file debugging, Pro is the better choice. Test Flash on your real tasks first and route only the hard cases to Pro.

Can I use Gemini with the OpenAI SDK?

Yes. Qora is OpenAI-compatible, so the OpenAI Python and Node.js SDKs work with Gemini models. Set base_url to https://qoraapi.com/v1, use your Qora API key, and set the model name to gemini-2.5-flash or a Pro preview ID.

What is the Gemini model name on Qora?

Copy it exactly from the Model Square. The working names in this guide are gemini-2.5-flash and gemini-2.5-pro-preview-06-05.

Try It

Get $5 free trial credit on request — contact us at [email protected] and we’ll add $5 to your account. Sign up at https://qoraapi.com/, create one API key, and try the same prompt on gemini-2.5-flash and gemini-2.5-pro-preview-06-05 to see the price and quality difference for yourself. The full client setup is in the docs at https://qoraapi.com/docs/.

Build AI features with one clear API

Qora API gives you a single, focused gateway to connect your apps, scripts and automations to AI. Start with one request.

qoraapi.com · AI API gateway for developers

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *