Theme
Language
·3 min read

Long-context LLM APIs: models with a 1M-token window

Every model on GetVibe API with a context window of about one million tokens: max output, image input, JSON mode and live USD prices, plus how to use a long window.

Long-context LLM APIs: models with a 1M-token window

A context window of around one million tokens holds a mid-sized codebase, a stack of contracts or months of chat logs in one request. Several models on GetVibe API offer a window that size, from flagships to low-cost flash models. They all run on one OpenAI-compatible endpoint and one key.

The list

Context and output limits come from our catalog (caps.contextWindow in https://getvibeapi.com/api/catalog). Prices are live.

ModelContextMax outputImagesJSON modePrice
Claude Opus 5.51,000,000128,000yesyes$0.1067 input · $0.5334 output per 1M tokens
Claude Sonnet 51,000,00064,000yesyes$0.3334 input · $1.6667 output per 1M tokens
GPT-5.6 Sol1,050,000128,000yesyes$0.0667 input · $0.40 output per 1M tokens
Gemini 3.1 Pro1,000,00065,000yesyes$0.2515 input · $1.5086 output per 1M tokens
Gemini 3.8 Flash1,000,00065,000yesno$0.0097 input · $0.0483 output per 1M tokens
DeepSeek V4.1 Flash1,000,000393,216yesyes$0.0112 input · $0.0445 output per 1M tokens
GLM-5.31,048,000128,000nono$0.10 input · $0.3143 output per 1M tokens
GLM-5.3 Flash1,048,000128,000yesno$0.0112 input · $0.0371 output per 1M tokens

Other 1M-class models are in the catalog too, including older Claude Opus versions and Gemini 3.7 Flash. The Models page shows the full list and lets you sort it.

Declared versus measured

Most numbers above are the window the model maker declares. For Claude Opus 5.5 we also measured it before publishing: a 732,379-token request was answered with details from both the start and the end of the prompt, and a request over 1,000,000 tokens was rejected at the model's limit. For the other models, test with your own data if you plan to run close to the limit.

How to use a long window well

  • Put the question after the material. Send the documents first and the instruction last, so the model reads the task with everything already in context.
  • Mark the boundaries. Wrap each file or document in clear delimiters with its name. It helps the model cite where an answer came from.
  • Check both ends. When you evaluate a model for long inputs, ask about a detail near the start and one near the end of the same prompt.
  • Leave room for the answer. Input and output share the window, so a prompt that fills it completely leaves no space for the reply.

Cost: every input token is billed

A full 1M-token request is billed for every input token, so long context is the most expensive way to call a model. Two things keep it in check:

  • Prompt caching. If you ask several questions about the same material, keep it as an unchanged prefix. Cached input is billed at a fraction of the input rate. See the prompt caching guide.
  • Pick the tier by task. For search-and-extract over a large input, a flash model with a 1M window may be enough. Save the flagships for reasoning across the material.
from openai import OpenAI

client = OpenAI(base_url="https://getvibeapi.com/v1", api_key="sk-pv-...")
corpus = open("all_docs.txt").read()

resp = client.chat.completions.create(
    model="deepseek-v4.1-flash",
    messages=[
        {"role": "system", "content": "Answer only from the documents provided."},
        {"role": "user", "content": corpus + "\n\nQuestion: which contracts mention a termination fee?"},
    ],
)
print(resp.choices[0].message.content)

Next steps

Read the Claude Opus 5.5 1M context article, compare models on the Models page, or start with the documentation.

long context LLM API1M token context windowmillion token context modellong context API pricingClaude 1M contextGemini 1M context

Try GetVibe API for free

GPT, Claude, Gemini and more through one OpenAI-compatible API. Pay in USD by card or crypto.

Related articles

Long-context LLM APIs: models with a 1M-token window | GetVibe API