What unlimited can honestly mean
The word attracts two kinds of readers. Some want to render endless pictures without paying. Others are tired of tools that cut them off after a daily quota. This API cannot help with the first group, because it produces no images. For the second group, here is what it does and does not cap.
| Item | Value |
|---|---|
| Context window (prompt plus completion) | 100,000 tokens |
| Concurrent requests, full key | 8 |
| Requests per minute, full key | 300 |
| Concurrent requests / per minute, trial key | 2 / 60 |
| Maximum request body | 8 MB |
| Daily or monthly quota | None stated; you pay per token |
| Credit expiry | Never |
There is no subscription and no monthly allowance, so you cannot "run out of the month". You run out of prepaid credit, and when you top up again the old balance is still there. Failed or refused requests are not charged. That is the closest honest meaning of unlimited for a paid text API: no artificial quota beyond rate limits, and no balance that expires.
Why image series drift apart
Suppose you generate forty illustrations for a serialized story. The hero has red braids, a green coat and a scar over her left brow. If each prompt is written from a single line such as "Mara crosses the bridge", the writer, whether human or model, has to guess the rest. By picture six she has brown hair, and by picture twenty the coat is blue.
The image model is rarely the culprit. It draws what the prompt says. The prompt changed because the text stage forgot. A model with a large window fixes this at the source: you put the character sheet, the art style and the story so far in front of it on every call, and each new prompt inherits all of them.
That is where 100,000 tokens matter. A few thousand tokens cover a cast of ten characters, a palette, a camera style and a summary of every earlier scene. Most of the window stays empty, and that empty room is what lets the story grow for hundreds of scenes before you must compress anything. The overview of how this text stage connects to a renderer is in the GPT image API analysis if you want the surrounding picture.
Build the story bible
Keep the bible as plain structured text, written once and reused. Short, factual lines work better than prose, because you want the same words to reappear in every image prompt.
{
"style": "watercolor and ink, muted autumn palette, soft window light, 3:2 frame",
"characters": {
"Mara": "young woman, red braids to the shoulder, green wool coat, scar over left brow, leather satchel",
"Orrin": "old ferryman, white beard, yellow rain hat, patched grey cloak"
},
"places": {
"Stone Bridge": "three arches, moss on the north side, iron lanterns"
},
"rules": [
"Always repeat each visible character's key traits verbatim",
"Never change a costume unless the scene says so"
]
}
The rules block matters more than it looks. A rule that says "repeat key traits verbatim" gives you almost word-for-word repeats of the same descriptors, which image models pick up on. Add a "changes" section for deliberate edits, such as "chapter 7: Mara wears a travelling cloak", so the model knows an alteration is on purpose.
The loop: bible, summary, latest scenes
Each call has the same shape. The system message holds the bible. A running summary covers the older scenes, and the most recent scenes appear in full. The user message states the new scene, and the answer is one image prompt as JSON.
import json
from openai import OpenAI
client = OpenAI(base_url="https://api.unrestrictedimagegenerator.com/v1", api_key="YOUR_API_KEY")
bible = open("bible.json").read()
summary = "" # compressed older scenes
recent = [] # last few (scene, prompt) pairs
SYSTEM = (
"You write one image prompt per scene for a continuing story. "
"Follow the bible exactly. Reply as JSON with keys prompt and negative.\n\n"
"BIBLE:\n" + bible
)
def next_prompt(scene):
context = "STORY SO FAR:\n" + summary + "\n\nRECENT:\n"
for s, p in recent[-8:]:
context += f"Scene: {s}\nPrompt: {p}\n"
r = client.chat.completions.create(
model="uncensored",
messages=[
{"role": "system", "content": SYSTEM},
{"role": "user", "content": context + "\nNEW SCENE: " + scene},
],
response_format={"type": "json_object"},
max_tokens=400,
)
data = json.loads(r.choices[0].message.content)
recent.append((scene, data["prompt"]))
print("input tokens:", r.usage.prompt_tokens)
return data
Every 15 scenes or so, make one extra call that folds the oldest entries of recent into summary and drops them. Print usage.prompt_tokens from time to time and you will see the context grow in a controlled way. If a request ever exceeds the window you will get an error instead of an answer, so trim before that point rather than after.
What a long context costs per call
A big window is not free to fill, because input tokens are billed on every call. The price is $0.15 per 1M input tokens and $0.50 per 1M output tokens. Here are three realistic sizes, each returning a 300 token answer. The output part is always 300 x $0.50 / 1M = $0.00015.
| Context sent | Input cost | Plus output | Per call | 100 calls |
|---|---|---|---|---|
| 5,000 tokens | $0.00075 | $0.00015 | $0.0009 | $0.09 |
| 20,000 tokens | $0.003 | $0.00015 | $0.00315 | $0.315 |
| 40,000 tokens | $0.006 | $0.00015 | $0.00615 | $0.615 |
So a series of 100 scenes at a steady 40,000 tokens of context costs $0.615 in total for prompt writing. That is rarely a problem, but it shows why summaries pay off: halving the context halves the largest part of the bill. The $0.50 trial credit covers 100 calls at the 5,000 and 20,000 token sizes. The 40,000 token series needs a top-up.
Top-ups are whole amounts between $20 and $500 in USDT on TRC20 or USDC on Base, with a 5% bonus from $50, 10% from $100 and 15% from $200. Details are on the pricing page.
Run it in parallel without breaking consistency
A sequential loop is the simplest, because each scene can see the previous prompts. If you need speed, split the work by chapter. Give each chapter the same bible and its own summary, then process up to 6 chapters at once, which stays under the 8 concurrent request limit on a full key. Trial keys allow only 2 at once.
Within a chapter, keep the order. Across chapters, the bible does the heavy lifting. Rate limits are generous at 300 requests per minute, so the concurrency cap is the one you will meet first. If the API answers 429 with the code concurrency, wait a few seconds and retry; with rate_limited, you sent too many per minute. A 429 with a Retry-After: 5 header means a short overload, and the same wait applies.
Checks that catch drift early
- Audit call. Every 10 scenes, send the bible and the last 10 prompts and ask the model to list any trait that differs from the bible. It is a cheap call and it finds slips you would otherwise notice only in the images.
- Fixed seed for repeatability. The API passes
seed,temperatureandtop_pthrough. A lower temperature such as 0.4 gives more literal repeats of the traits; a higher value gives more varied wording of the scene. - Version the bible. Save a dated copy each time you edit it. When a later picture looks wrong, you can tell whether the bible changed or the model slipped, and you can rerun a scene against the old version to compare.
- Keep the bible short. A 600-word bible is read more reliably than a 6,000-word one. Unneeded detail dilutes the traits that matter.
- Stay within the rules. The model answers without content refusals for lawful adult use, and sexual content involving minors is never allowed.
Start with the trial: the API key page gives $0.50 of credit for 7 days after sign-up, with no payment. Request details are in the documentation. The base URL is https://api.unrestrictedimagegenerator.com/v1 and the model is uncensored. Prompts are not used for training, so your story stays your own.
