Diagnosing sluggish generation with numbers instead of guesses

APIClaudeKeyFree · Updated 2026-11-24 · 8 min read

A stopwatch next to a laptop
Speed complaints become useful once you put numbers on them.

Developers regularly notice that a model they rely on has become painfully slow, sometimes generating what feels like one word per second, which makes long answers almost unusable. Others notice that a mode advertised as fast behaves no differently. The frustration is real, but the conversation usually stays at the level of impressions: it feels slower today.

This article turns that feeling into measurements. You will learn which numbers describe speed, how to collect them with a few lines of code, what typically causes slowdowns on the provider side and on yours, and what you can do about each. The examples use the free OpenAI-compatible endpoint on this site, and the same script works against any compatible backend.

Frequently asked questions

What is time to first token?

It is the delay between sending a request and receiving the first piece of the answer. It includes network time, queueing on the provider's side and the time the model needs to process your prompt. Long prompts and busy servers both increase it.

What is tokens per second?

It is how quickly the model produces output once it has started. It depends on model size, server load and hardware, and is mostly independent of your prompt length. It is the number that makes a long answer feel fast or slow.

How does latency differ from throughput?

Latency is how long one request takes. Throughput is how much total work you get done per minute across many requests. A backend can have high latency per request but good throughput if you can run many requests in parallel.

Why would a larger model be slower?

Each output token requires a pass through the whole model, so more parameters mean more computation per token. Top-tier models are generally slower per token than smaller ones from the same family.

Does reasoning mode make output slower?

It makes the visible answer arrive later, because the model generates thinking tokens first. The raw speed per token may be similar, but the total time to a useful answer increases, sometimes considerably.

Which is better for perceived speed: streaming or waiting?

Streaming. The total time is the same, but users see text appear immediately and can start reading. For anything longer than a sentence or two, streaming makes the same backend feel much faster.

Is the free endpoint fast?

During normal load it typically generates over 100 tokens per second. It has no SLA, can return 503 when busy, and its per-IP limits of one request per second and two in parallel cap how much you can do at once.

Can I make a slow provider faster?

Not directly. You can shorten prompts, cap output length, choose a smaller model for simple tasks, stream the response and run independent requests in parallel. If a provider is overloaded, routing some traffic elsewhere is often the only real fix.

Two numbers that describe speed

Speed complaints usually mix two different things. One is how long you wait before anything happens. The other is how fast text arrives once it starts. They have different causes and different fixes, so measuring them separately is the first step to a useful diagnosis.

Time to first token, often abbreviated TTFT, grows with prompt length, server queueing and network distance. Output speed, measured in tokens per second, depends mostly on the model and how heavily the servers are loaded. A model that feels slow because of a long TTFT needs a different response than one that feels slow because it generates at a trickle.

A long wait, then fast text

This pattern points to queueing or a large prompt. The model is fine once it starts; the delay happens before generation.

A quick start, then a trickle

This pattern points to low generation speed, usually from a large model, heavy server load or a throttled tier.

Measuring with a short script

The simplest reliable measurement uses streaming. You record the time when the request is sent, the time the first content chunk arrives, and the time the stream ends. Counting the output tokens from the usage information, or approximating them from the text, gives tokens per second.

The script below measures both numbers against the keyless endpoint. Run it several times at different hours and keep the results; a single run tells you very little, while a week of runs shows real patterns.

Use the same prompt every time

Comparisons only make sense with identical prompts and output caps. Keep a fixed test prompt and change nothing but the time of day or the backend.

Approximate tokens carefully

Four characters per token is a rough rule for English. If the provider returns usage data in the stream, prefer that exact count.

import time
from openai import OpenAI

client = OpenAI(base_url="https://api.apiclaudekeyfree.com/v1", api_key="none")

def measure(prompt, max_tokens=400):
    t0 = time.perf_counter()
    first = None
    text = ""
    stream = client.chat.completions.create(
        model="free-ai", stream=True, max_tokens=max_tokens,
        messages=[{"role": "user", "content": prompt}])
    for chunk in stream:
        if not chunk.choices:
            continue
        delta = chunk.choices[0].delta.content or ""
        if delta and first is None:
            first = time.perf_counter()
        text += delta
    end = time.perf_counter()
    approx_tokens = max(1, len(text) / 4)  # rough estimate for English
    gen_time = max(1e-6, end - (first or end))
    print(f"TTFT {(first or end) - t0:.2f}s, "
          f"~{approx_tokens / gen_time:.0f} tok/s, total {end - t0:.2f}s")

measure("Write three paragraphs about lighthouses.")
Water dripping slowly into a glass
A quick start followed by a trickle points to slow generation, not queueing.

Causes on the provider side

When many users hit the same model at once, providers queue requests or spread them across more heavily loaded hardware. That shows up as longer waits and slower generation, often at predictable hours when large regions are working. New model launches also attract heavy traffic, and popular top-tier models can slow down for days afterwards.

Providers sometimes apply different speed or priority to different plans or modes. If a fast mode seems no faster, it may be that it only improves certain conditions, or that load is high across the board. Check the provider's documentation and status page rather than assuming a hidden change.

Peak hours

Many users report that the same model is noticeably slower during business hours in North America and Europe. Your own measurements across the day will show whether that applies to you.

Incidents and degraded performance

Status pages often list degraded performance separately from outages. Slow responses without errors can be an incident in progress.

Causes on your side

Before blaming the provider, check what you are sending. A prompt that has grown to tens of thousands of tokens because a chat history keeps accumulating will have a long time to first token on any backend. Tools and agents that attach large files or tool descriptions to every request do the same.

Client-side issues also matter: a proxy that buffers streaming responses can make text arrive in large bursts at the end, which feels like slowness even when generation is fast. Network distance adds a constant delay to every request.

Watch your prompt size

Log the number of input tokens per request. If it grows steadily through a session, trimming or summarising history will improve TTFT.

Check for buffering

If text arrives all at once after a long pause even with streaming enabled, something between you and the provider is collecting the stream before forwarding it.

  • Very long conversation histories sent with every request.
  • Large files or tool schemas attached even when not needed.
  • Reasoning or thinking enabled for simple tasks.
  • A proxy, gateway or framework that buffers the stream.
  • Retries hidden inside an SDK that add seconds after an error.
A queue of people outside a bakery
At peak hours requests wait in line before the model even starts.

Model size and the speed trade-off

Bigger models produce better answers on hard tasks, and they are slower per token. That trade-off is fundamental. For a long-form answer that requires deep reasoning, waiting for a top-tier model such as one of Claude's larger tiers is often worth it, because a smaller model would produce a worse result faster. For classification, short replies, extraction and formatting, the large model's extra quality is rarely visible and its slowness is.

A practical response to slowdowns is therefore to route by task. Keep the strongest model for the steps that need it and send everything else to a smaller, faster one. The free-ai model on this site, an independent open-weight model of about 35B parameters, is one option for those lighter steps. It is not a Claude model, and this site is not affiliated with Anthropic.

Speed is a feature

For interactive use, a fast good answer often beats a slow excellent one. Measure what your users actually value before defaulting to the largest model.

Making slow backends feel faster

Even when you cannot change the backend's speed, you can change how it feels. Streaming is the biggest lever: users start reading after the first token instead of waiting for the last. The trade-offs of streaming are covered in streaming vs full responses.

Capping output length also helps. If a task needs a paragraph, set max_tokens accordingly so the model does not write three. Asking for concise answers in the system prompt reduces both wait time and cost.

Show progress early

Displaying a short status line or the first sentence quickly keeps users engaged even if the full answer takes a while.

Cap and continue

For long documents, generate in sections. Each section arrives sooner, and users can stop early if they have what they need.

A small car and a large truck on a highway
Larger models carry more but move more slowly per token.

Parallel requests for batch work

For batch jobs, per-request speed matters less than total throughput. If each request takes ten seconds but you can run several at once, a large job still finishes quickly. The limit is how much parallelism the provider allows. The free endpoint here allows two concurrent requests per IP and one new request per second with bursts of three, which is fine for small batches and testing.

Choosing between threads and async code for parallel calls is discussed in asyncio vs thread pool for batch LLM calls. Whichever you pick, add a concurrency limit and handle 429 responses with the Retry-After header.

Respect the limit

Sending more parallel requests than allowed does not speed things up. It produces 429 errors and retries, which make the job slower overall.

When to wait, switch or reroute

If your measurements show a provider is slow only at certain hours, scheduling batch work outside those hours can be enough. If slowness coincides with an incident on the status page, waiting is usually the right call for quality-critical work. If slowness persists for days and affects interactive features, routing lighter tasks to another backend keeps the product responsive.

Keep your measurements over time. A simple log of TTFT and tokens per second per backend and hour turns arguments about whether a model got slower into a quick look at a chart.

Finally, share what you measure. When colleagues or users report that a model feels slow, a table of recent TTFT and tokens-per-second figures by hour settles the question quickly and points to the right fix, whether that is waiting out an incident, trimming prompts or routing some traffic to another backend.

Set a threshold

Decide in advance what counts as too slow for each feature, for example TTFT over five seconds, and switch routes automatically when it is crossed.

Re-test after switching

A faster backend is only useful if its answers are acceptable. Check quality on a fixed set of prompts whenever you change routes.

Shoppers moving through several open checkout lanes
For batch work, total throughput matters more than any single request.
Try the free API

Send a test request to the keyless, OpenAI-compatible endpoint on the home page and see how it fits your project.

Read also