Paying for extra thought only where the answer improves

APIFreeGemini · Updated 2026-11-22 · 8 min read

Hand hovering over a chess piece beside a notepad
Thinking before moving pays off when every step depends on the last.

Most current model families, Gemini included, offer some form of extended thinking: the model works through a problem internally before writing its final answer. Showcase projects often lean on it, such as a fast model generating a full low-poly world-building app with extended thinking enabled, or a head-to-head where a fast model tries to recreate a frame-by-frame JavaScript animation made by a much larger competitor.

Those demos are impressive, but thinking is not free. It adds latency, uses many more tokens and sometimes produces long deliberation without a better result. This article is for developers deciding when to switch it on. It explains what reasoning modes do, which tasks benefit, how to budget for them and how to test the difference on your own prompts, including with the optional reasoning flag of the keyless endpoint on this site.

Frequently asked questions

What is a reasoning or thinking mode?

A setting that lets the model generate intermediate reasoning before its final answer. The extra steps help it plan, check its work and handle multi-part problems. Depending on the provider, the reasoning may be hidden, summarised or returned separately.

How does thinking mode differ from asking the model to think step by step?

Prompting for step-by-step reasoning puts the reasoning in the visible answer. A dedicated mode is trained and tuned for internal reasoning, often with its own token budget, and usually keeps the final answer cleaner.

Which tasks benefit most?

Multi-step maths and logic, planning, debugging, complex code generation, and questions with several constraints that interact. Tasks with a single obvious answer rarely improve.

Why does reasoning sometimes take very long and achieve nothing?

On vague or underspecified requests, the model may explore many possibilities without converging. Automatic modes that choose a model and a thinking budget for you can make this worse. A clearer prompt or a manually chosen model often fixes it.

Does reasoning make fast models as good as large ones?

It narrows the gap on some tasks, which is why fast models with thinking can produce impressive demos. On the hardest problems, larger models with reasoning usually remain stronger.

How do I enable reasoning on this site's API?

Add "reasoning": true to the request body and set max_tokens to 2000 or more, so that the model has room both to think and to answer.

Which is better for chat, reasoning on or off?

Off for most conversational turns, because users value fast replies. Switch it on selectively for messages that look like problems to solve rather than things to say.

How do I control cost on Gemini?

Gemini models expose settings for thinking behaviour that vary by model generation. Check Google's current API documentation for the parameters and how thinking tokens are billed.

What happens when a model thinks

Without reasoning, a model writes its answer token by token from the start. With reasoning enabled, it first produces a stretch of intermediate text: restating the problem, trying approaches, checking partial results. Only then does it write the answer you see.

That intermediate text is real computation and real tokens. It is the reason reasoning helps on hard problems, and the reason it costs more time and budget on every request where it is used.

Visible or hidden

Providers handle the reasoning text differently. Some hide it, some return a summary, some return it in a separate field. Either way, it usually counts toward token usage and limits.

Budgets and limits

Many APIs let you cap how much the model may think. A cap that is too low cuts the reasoning short and can leave no room for the answer, so set the overall output limit generously.

Thinking is not memory

Reasoning happens within one request. On a stateless API it does not carry over to the next call unless you include it yourself. For multi-turn work, pass along the conclusions you want the model to keep, not the full reasoning, to save context.

Tasks where thinking pays off

Reasoning shines when a correct answer requires several dependent steps, and a mistake in one step ruins the rest. Generating a whole application from a one-paragraph description, as in popular demos, is a good example: the model must plan components, data structures and interactions before writing code.

It also helps when instructions contain constraints that interact, such as scheduling with many rules, or when the model must check its own output, such as verifying that a calculation adds up.

Debugging is a good illustration. Given a stack trace and the relevant function, a reasoning model can trace the values step by step, form a hypothesis and check it against the code before answering. Without reasoning, the same model is more likely to suggest the first plausible fix it sees, which is often a fix for a different bug.

Recreating complex output

Comparisons in which a fast model tries to rebuild an animation or interface made by a larger one show the value and the limit of thinking: the plan improves markedly, but fine details still tend to favour the larger model.

  • Maths, logic puzzles and quantitative estimates
  • Planning a multi-file feature or refactor
  • Debugging from a stack trace and code excerpt
  • Generating complete programs from a short specification
  • Questions with several interacting constraints
Drafting table with floor plan and a model house
Planning a whole program from a short brief is where reasoning shines.

Tasks where it mostly wastes time

Simple lookups, rewriting, translation, short summaries and casual chat rarely improve with reasoning. The model reaches the same answer, just later and at higher cost. In chat interfaces, the added delay before the first visible word can make the product feel slower without any benefit to the user.

Vague requests are a special case. Asking a reasoning model to just improve this may lead to long deliberation over what improvement means. Clarifying the request beats spending tokens on guessing.

Extraction and classification

Pulling fields into JSON or choosing a label from a list is usually a one-step decision. A clear format and a couple of examples help more than extra thinking.

Creative writing

For fiction and marketing copy, reasoning can make text more structured but not necessarily more vivid. Try both modes and judge by reading, not by assumption.

Short answers under time pressure

In voice assistants, autocomplete and live chat, any delay before the first word hurts. Keep reasoning off for these paths, and if a request clearly needs deeper work, tell the user you are working on it and answer asynchronously.

Automatic modes and long thinking

Tools that pick the model and thinking level for you are convenient, but users regularly report automatic modes that think for a very long time and then do nothing useful. Switching to a manually chosen model often resolves it. The pattern is general: automatic routing has to guess how hard your task is, and when it guesses wrong in either direction, you pay with time or quality.

If you build your own product, make the decision explicit in code. Route on observable features of the request rather than leaving everything to a single always-on setting. The guide to routing prompts between models covers this in detail.

One practical rule: if you cannot write down in one sentence what a correct answer looks like, the request is not ready for a reasoning model. Clarify first, either by asking the user a question or by adding constraints, and then let the model think.

Crossroads in a misty field with paths fading away
Vague requests can send a reasoning model down every path at once.

Using the reasoning flag on the keyless endpoint

The free-ai model on this site supports an optional "reasoning": true field in the request body. When you use it, raise max_tokens to at least 2000 so there is room for both the thinking and the answer. With the official OpenAI Python SDK, non-standard fields go in extra_body.

The example runs the same question with and without reasoning and prints the token usage and time for each, which is the simplest way to see the cost of thinking on your own prompts.

Mind the daily budget

Reasoning requests use many more tokens. The per-IP budget of 10,000,000 tokens per day is generous for normal use, but a batch job with reasoning on every call will consume it much faster.

Streaming helps the wait

With stream=True, you receive chunks as they are produced and the stream ends with data: [DONE]. Showing a progress indicator during the thinking phase keeps users patient.

import time
from openai import OpenAI

client = OpenAI(base_url="https://api.apifreegemini.com/v1", api_key="unused")
question = ("A train leaves at 09:40 and arrives at 13:05 with a 25-minute stop. "
            "What is the moving time in minutes? Answer with the number and one sentence.")

for reasoning in (False, True):
    start = time.time()
    r = client.chat.completions.create(
        model="free-ai",
        max_tokens=2500 if reasoning else 300,
        messages=[{"role": "user", "content": question}],
        extra_body={"reasoning": True} if reasoning else None,
    )
    took = time.time() - start
    print(f"reasoning={reasoning} tokens={r.usage.completion_tokens} time={took:.1f}s")
    print(r.choices[0].message.content.strip(), "\n")

Prompting a reasoning model well

Reasoning models do best with complete, explicit problems. State the goal, the constraints and the expected output format clearly, then let the model work. Unlike older prompting habits, you rarely need to tell a reasoning model to think step by step; it already does.

Do ask for a concise final answer. Without that instruction, some models echo much of their reasoning in the visible reply, which wastes output tokens and makes parsing harder.

Give it a way to check

Where possible, include a test the answer must pass, such as the expected output for one example input. Reasoning models are good at checking against a concrete target.

Keep examples short

Long few-shot examples matter less with reasoning, and they eat context. One short example of the desired format is often enough.

Two kitchen timers showing different remaining time
Run the same prompt with and without reasoning and compare time and tokens.

Measuring whether it helped

Decide based on data from your own tasks. Take a test set of real prompts, run each with reasoning off and on, and record correctness, tokens and latency. If reasoning improves accuracy on a category of prompts by a margin that matters to users, enable it for that category only.

Repeat the test when models update. A newer fast model may solve without thinking what an older one needed reasoning for, and the opposite can happen too.

Cost per correct answer

Divide tokens used by the number of correct answers in each mode. Reasoning that doubles tokens but halves retries can be the cheaper option overall.

Separate categories, separate decisions

Do not average results across all prompts. Reasoning may help a great deal with planning questions and not at all with rewrites. Group your test set by category and decide per category, so the expensive mode runs only where it earns its cost.

An honest note on model strength

APIFreeGemini is not affiliated with Google. Its free-ai model is an independent open-weight model of about 35B parameters, and its reasoning mode is useful for maths, planning and moderate code tasks. On the hardest reasoning problems, large commercial models with thinking enabled are generally stronger, and for critical work they are the better choice.

Where the free endpoint fits is experimentation: learning how reasoning affects your prompts, building evaluation scripts and prototyping features before spending paid quota. For coding workflows specifically, see the comparison of terminal coding agents.

When you report results to a team or a budget owner, include both numbers: how much accuracy improved and how much extra time and tokens it cost. A decision made with both in view is far easier to defend than one based on a demo.

Lab notebook with a hand-drawn bar chart and a calculator
Measure cost per correct answer before enabling reasoning everywhere.
Try the free API

Send a test prompt to the keyless free-ai endpoint from the home page, no sign-up or key required.

Read also