What 100,000 tokens means in practice
The flux context uncensored question comes down to one number. This API's model accepts up to 100,000 tokens per request, and that count includes both what you send and what the model writes back. If your prompt uses 90,000 tokens, the reply can use at most 10,000. The max_tokens parameter is optional, and when you leave it out the completion may use whatever room is left.
Tokens are not words. As a rough rule for English prose, one token is about three quarters of a word, so 100,000 tokens is on the order of 70,000 to 75,000 words. Treat that as an estimate. Code, non-English text, numbers and unusual names use more tokens per word. The reliable count is the usage block in each response, and you should log it.
To picture the size: a long short-story collection or a substantial slice of a novel can fit, and so can a medium code repository's key files, or several hundred chat turns. A very long novel or a large monorepo cannot. This is a text-only service from an independent provider running an open-weight model, so it is separate from any Flux image model. Nothing here generates pictures.
Where long context helps
Long fiction and roleplay for adults
A story with many characters needs continuity: names, relationships, the promise made in chapter two. With a large window you can keep a character sheet, a world summary and the recent chapters in every request, so the model does not drift. The same holds for companion and roleplay apps for adults, where a persistent persona and shared history make conversations feel coherent. The one rule that never changes is the hard limit: no sexual content involving minors.
Agents with long tool traces
An agent that reads files, runs commands and reads the output piles up text quickly. Each tool result goes back into the conversation as a role: "tool" message. A large window lets the agent keep a long working trace before it must forget anything.
Working over one big document
Summarizing a long transcript, asking questions across a long contract draft or comparing two versions of a text are jobs where cutting the input into pieces loses connections. Putting the whole document in one request avoids that, as long as it fits.
Where it does not help
Short tasks gain nothing from a large window, and a prompt stuffed with loosely related material can make answers worse and slower. Long models also tend to attend less reliably to details buried in the middle of a very long input. We have no benchmark figures to quote, so test your own material: put a known fact at different positions and check whether the model finds it.
Budgeting the window
Plan the split before you build. Suppose you want replies of up to 2,000 tokens. Then your prompt budget is 100,000 minus 2,000, or 98,000 tokens, and a safety margin of a few thousand is wise because your own token estimate may be off.
- Pin what must always be present. The system prompt, the persona or the story bible go first and never get trimmed.
- Reserve the reply space. Subtract the largest reply you expect.
- Fill the rest with the most recent history. Drop the oldest turns first.
- Check the 8 MB body cap. It rarely matters for text, but base64 data pasted into a prompt can reach it quickly.
The code below does that trimming. It counts tokens with a simple characters-divided-by-four estimate, which is crude but safe for English when combined with a margin. Swap in a real tokenizer if you want accuracy.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.fluxuncensored.com/v1",
api_key=os.environ["LLM_API_KEY"],
)
WINDOW = 100_000
REPLY_RESERVE = 2_000
MARGIN = 4_000
BUDGET = WINDOW - REPLY_RESERVE - MARGIN
def est_tokens(text):
return len(text) // 4 + 4
def build_messages(system_text, history):
used = est_tokens(system_text)
kept = []
for msg in reversed(history): # newest first
cost = est_tokens(msg["content"])
if used + cost > BUDGET:
break
kept.append(msg)
used += cost
kept.reverse()
return [{"role": "system", "content": system_text}] + kept
def chat(system_text, history, user_text):
history.append({"role": "user", "content": user_text})
resp = client.chat.completions.create(
model="uncensored",
messages=build_messages(system_text, history),
max_tokens=REPLY_RESERVE,
temperature=0.8,
)
reply = resp.choices[0].message.content
history.append({"role": "assistant", "content": reply})
print("prompt tokens:", resp.usage.prompt_tokens)
return replyTest recall on your own material
Marketing numbers about context size say little about how a model behaves on your text. A short experiment tells you more. Build a long filler text, hide one fact at a chosen position, and ask for it back. Repeat with the fact near the start, the middle and the end.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.fluxuncensored.com/v1",
api_key=os.environ["LLM_API_KEY"],
)
filler = "The harbor town slept under a grey sky. " * 1500 # roughly 15k tokens
needle = "The lighthouse keeper's cat is named Ondine. "
for pos in (0.05, 0.5, 0.95):
cut = int(len(filler) * pos)
doc = filler[:cut] + needle + filler[cut:]
resp = client.chat.completions.create(
model="uncensored",
temperature=0,
max_tokens=30,
messages=[
{"role": "user", "content": doc + "\n\nWhat is the lighthouse keeper's cat called?"},
],
)
print(pos, resp.usage.prompt_tokens, resp.choices[0].message.content.strip())
Run it again with larger multipliers to approach the limit. If recall fails at some size, you have found a practical ceiling for your task, which may be well under 100,000 tokens. A real document is harder than repeated filler, so use a sample of your actual text for the final check. Each run costs a few cents at most: a 15,000-token prompt is 15,000 x $0.15 / 1,000,000 = $0.00225.
Summaries instead of silent forgetting
Dropping old turns is simple, and it loses facts. A better pattern is a rolling summary. When history passes a threshold, you ask the model to compress the oldest part into a short note, then store that note near the top of the prompt in place of the original turns.
curl https://api.fluxuncensored.com/v1/chat/completions \
-H "Authorization: Bearer $LLM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"temperature": 0.2,
"messages": [
{"role": "system", "content": "Summarize this story so far in under 300 words. Keep names, places, open plot threads and promises made."},
{"role": "user", "content": "PASTE THE OLDEST CHAPTERS HERE"}
]
}'
Use a low temperature for summaries so the facts stay put. Keep the summary as a separate message after the system prompt, labeled as earlier events, and refresh it every time you compress more history. For fiction, keep a short list of fixed facts such as eye colors, ages, the layout of a house, since small contradictions are what readers notice first.
What long prompts cost
Prices are $0.15 per 1M input tokens and $0.50 per 1M output tokens. A prompt of 98,000 tokens with a 2,000-token reply costs 98,000 x $0.15 / 1,000,000 = $0.0147 for input plus 2,000 x $0.50 / 1,000,000 = $0.001 for output. That is $0.0157, about one and a half cents. A hundred such calls cost $1.57.
The bigger risk is the cumulative cost of resending a growing chat. Take a roleplay where each turn adds 600 tokens (100 from the user, 500 from the model) and the whole history is sent each time. Across 100 turns the input tokens total 600 x (100 x 101 / 2) = 3,030,000, which costs $0.4545, and the 50,000 output tokens cost $0.025. The total is about $0.48.
Now cap the prompt at roughly 8,000 tokens. The first 13 turns grow normally for 54,600 input tokens, and the other 87 turns send 8,000 each, which is 696,000. The sum is 750,600 tokens, or $0.1126, plus the same $0.025 for output, about $0.14. Trimming cut the bill to under a third while keeping recent context. The pricing page has the current rates and top-up bonuses.
Failed or refused requests are not charged, and credit does not expire.
Practical limits to plan around
- Concurrency. A full key allows 8 requests at once and 300 per minute. A trial key allows 2 and 60. A streamed request holds its slot until the stream ends, and a long reply keeps it for a while.
- Speed. A longer prompt takes longer to process before the first token appears. Use
stream: truewhen a person is waiting. We publish no latency numbers, so measure your own. - 429 errors.
rate_limitedandconcurrencymean you went over a limit. A 429 withRetry-After: 5means temporary overload. Wait, then retry with backoff. - Privacy. Prompts are not used for training. Still, avoid pasting secrets or personal data you do not need.
To try a long prompt without paying first, sign up and claim the trial credit: $0.50, one click, no card, valid for 7 days. The quickstart shows the first request step by step, and the myths versus facts article clears up what this service is and is not. Top-ups run from $20 to $500, with +5% from $50, +10% from $100 and +15% from $200, via crypto (USDT on TRC20, USDC on Base).
A note on long agent loops
Agents deserve extra care with a large window. A loop that appends every tool result without limit will reach the ceiling sooner than you expect, because file contents and command output are verbose. Truncate large outputs before they enter the conversation, keep only the lines the model needs, and store the rest on disk with a short pointer. Set a hard cap on the number of steps, and watch X-Balance-USD in the response headers so a stuck loop cannot drain your credit unnoticed. These habits matter more as the window grows, since a bigger window makes it easier to keep sending text that no longer helps.
