Verdict first
| Need | Chat window | Own script |
|---|---|---|
| Explore one concept, react, refine | Better | Awkward |
| 50 or more prompts in one style | Tedious | Better |
| Same format every time (CSV, JSON) | Needs repeated reminders | Built in |
| Rerun last month's batch with a tweak | Hard | One command |
| No coding at all | Better | Not possible |
If you only need a handful of prompts, keep using a chat window. The rest of this article is for the point where copy-pasting stops being fun, and for people whose subject matter makes general assistants hesitate.
Where the chat workflow starts to hurt
A chat is a conversation, so it drifts. By prompt 30 the assistant has forgotten how you phrased the style rules at the start, or it pays more attention to your last three messages than to the first. You end up pasting the same reminder again and again.
- No fixed format. One answer is a paragraph, the next is a bulleted list, and you reformat by hand.
- No record. Which wording produced the image you liked? The chat scrollback is a poor database.
- Policy variability. Assistants from large vendors apply content policies that change over time and may decline dark or mature fiction themes. Check the current rules of whichever tool you use rather than assuming.
- Manual effort. If each prompt takes a minute of your attention, 500 prompts is over eight hours. That figure is an assumption for illustration, but the scaling is real.
What a script gives you
A script turns prompt writing into a function. You write the rules once, in a system message, and every call obeys them. The pieces you control:
- The system prompt with the house style and length limits.
- The input list, one idea per line in a text file or spreadsheet.
- The output file, a CSV you can open in any spreadsheet.
- The number of variants per idea, so you can pick the best of three.
It also makes experiments honest. Change one rule, rerun the same ten ideas, and compare. Setting the seed parameter and a low temperature reduces random differences between runs, so you see the effect of your edit and not noise.
The endpoint is OpenAI-compatible, so the code uses the standard Python library. The only changes from a default setup are the base URL, your key and the model ID uncensored. Parameters are listed in the docs.
A script that writes three variants per idea
import csv, os
from openai import OpenAI
client = OpenAI(api_key=os.environ["API_KEY"],
base_url="https://api.uncensoredimage.com/v1")
RULES = ("Write one image-generation prompt of 40 to 70 words. "
"Describe subject, composition, camera angle, lighting, palette and style. "
"Plain text only, no preamble, no quotation marks.")
def variants(idea, n=3):
out = []
for i in range(n):
r = client.chat.completions.create(
model="uncensored",
temperature=1.0,
messages=[{"role": "system", "content": RULES},
{"role": "user", "content": idea}],
)
out.append(r.choices[0].message.content.strip())
return out
with open("ideas.txt") as f, open("prompts.csv", "w", newline="") as g:
w = csv.writer(g)
w.writerow(["idea", "v1", "v2", "v3"])
for line in f:
idea = line.strip()
if idea:
w.writerow([idea] + variants(idea))
This version runs one request at a time, which suits a trial key (2 concurrent, 60 per minute). On a full key you can add a thread pool of up to 8 workers and stay inside the 300 per minute limit. If you get HTTP 429, wait the number of seconds in Retry-After and retry.
Cost of the scripted route
The API charges $0.15 per 1M input tokens and $0.50 per 1M output tokens. For the script above, assume 250 input tokens (rules plus idea) and 200 output tokens per call.
- Input: 250 / 1,000,000 x $0.15 = $0.0000375
- Output: 200 / 1,000,000 x $0.50 = $0.0001
- Per call: $0.0001375
For 500 ideas with 3 variants each, that is 1,500 calls: 1,500 x $0.0001375 = $0.20625, so about $0.21. The $0.50 trial credit alone would cover roughly 3,600 such calls. Failed requests are not charged.
The chat-window route may be free or subscription-priced depending on the service you use. Check their current pricing rather than relying on a figure from an article. The honest comparison is time: the script costs cents in credit and saves hours of copy-paste.
Crypto only: top-ups are USDT on TRC20 or USDC on Base, from $20 to $500. Details are on the pricing page.
Mixing both: a practical workflow
You do not have to pick one forever. A workable pattern:
- Explore in a chat window until you find a prompt style that produces images you like.
- Copy that style into the script's system message as the rules, and add one finished example prompt.
- Run a ten-idea test batch and look at the outputs before committing to the full list.
- Render the prompts in your image tool of choice. This API does not draw; for what an image-side API involves, see the GPT image API page.
Treat the CSV as your source of truth. When you later switch image tools, you can rewrite the rules for the new tool and regenerate the column, since regeneration costs cents.
One boundary applies to every route: no sexual content involving minors. The model is tuned to answer without content refusals for lawful adult use, so keep your own batches non-explicit and within the law of your country.
Getting set up
Create an account and claim the $0.50 trial credit from the API key page. It needs no payment and lasts 7 days. Export the key as API_KEY, drop ten ideas into ideas.txt, and run the script. You will see within a minute whether scripted prompts beat your chat habit.
