The short answer
The phrase image gen api openai can mean two different things, and it helps to separate them. One is OpenAI's own image generation service, which belongs to OpenAI and which you reach with an OpenAI account. The other is any service that copies the OpenAI request format so existing SDKs and tools keep working. This site is the second kind, and only for text.
What you get here is a hosted, uncensored text LLM API. You point an OpenAI client at the base URL below, set the model to uncensored, and receive chat completions. No pixels come back. There is no image, audio or video generation, no embeddings and no fine-tuning, and none of those are planned as part of what is described on these pages.
What is compatible and what is not
The word "compatible" gets stretched in marketing, so here is the exact surface. The base URL is https://api.imagegenapi.com/v1, authentication is Authorization: Bearer <key>, and two methods exist.
| Endpoint | Available here | Notes |
|---|---|---|
POST /v1/chat/completions | Yes | Streaming, tool calling, JSON mode |
GET /v1/models | Yes | Lists uncensored |
| Image generation endpoints | No | Text only service |
| Embeddings, audio, fine-tuning | No | Not offered |
If your code calls an image path on this base URL, expect an error, not a picture. The same goes for any OpenAI feature outside the two methods above. The sampling controls you know do work: temperature, top_p, stop, seed and the penalties are passed through, and a reply can use the full 100,000-token window shared between prompt and completion.
It is also worth being clear about identity. The model behind uncensored is a single open-weight model, run by an independent provider. This is not OpenAI's API, it does not proxy OpenAI models, and it is not affiliated with OpenAI. The matching page on this site, GPT image API and uncensored text, covers the same distinction from the angle of image-model names.
Why the question comes up
People land on pages like this for understandable reasons. Image tools are driven by text prompts, text prompts are written by language models, and many language model gateways share one request format. The natural guess is that one API does both.
In practice the two jobs are separate systems with separate keys, separate pricing and separate rules. An image service takes a prompt and returns an image. A text service takes messages and returns more text. The link between them is you, or a script you write, carrying the text from one to the other. Once you see it that way, the useful question changes from "does this API make images" to "can this API write better prompts for the image model I already use".
That is a real use case, and a place where an uncensored text model can matter. General-purpose assistants often rewrite, soften or refuse prompt requests that touch mature fiction themes, violence in a story setting or dark aesthetics. A model tuned to answer lawful adult requests without refusals will usually do the writing task as asked. The hard limit stays in place: no sexual content involving minors, under any framing.
Using the text API to write image prompts
Here is a small, working example. It asks the model for a detailed prompt, which you then paste into whichever image generator you use. The code uses the official OpenAI Python SDK against this base URL.
from openai import OpenAI
client = OpenAI(base_url="https://api.imagegenapi.com/v1", api_key="YOUR_KEY")
reply = client.chat.completions.create(
model="uncensored",
temperature=0.8,
messages=[
{"role": "system", "content": "You write prompts for text-to-image models. Reply with one paragraph: subject, composition, lighting, palette, lens or style. No preamble."},
{"role": "user", "content": "A ruined lighthouse at dusk for a dark fantasy book cover."},
],
)
print(reply.choices[0].message.content)
The same call from the command line:
curl https://api.imagegenapi.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"uncensored","messages":[{"role":"user","content":"Write a one-paragraph image prompt: a ruined lighthouse at dusk, dark fantasy cover art."}]}'
Making the output usable
Image generators differ in what they accept, so shape the result with your system message. Ask for a fixed structure, a word limit, and a list of things to avoid. If you need the prompt inside a pipeline, request JSON with response_format set to type json_object and ask for keys such as prompt and negative. Then parse it and pass the fields to your image client. Setting a seed and a low temperature gives more repeatable output when you iterate on wording.
A batch workflow with real numbers
Suppose you generate prompts for 1,000 scenes. Each request sends about 300 tokens (instructions plus a short scene note) and receives a prompt of about 200 tokens. Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens.
- One request, input: 300 / 1,000,000 x $0.15 = $0.000045.
- One request, output: 200 / 1,000,000 x $0.50 = $0.0001.
- One request in total: $0.000145.
- 1,000 requests: 1,000 x $0.000145 = $0.145.
So a thousand prompts cost about 14.5 cents, and the text step is usually a small part of the bill compared with the image generation itself, whose price you should check with that provider. A full key allows 8 concurrent requests and 300 requests per minute, so 1,000 requests fit in a few minutes with a small worker pool. Handle HTTP 429 by waiting; the Retry-After: 5 header tells you how long on temporary overload.
You can try all of this without paying. After sign-up, the API key page has a one-click $0.50 trial credit, valid for 7 days. Longer term, top-ups run from $20 to $500 and are paid in crypto (USDT on TRC20 or USDC on Base); see pricing for the bonus tiers.
Mistakes to avoid
A few errors show up again and again when someone tries to use an OpenAI-shaped endpoint for image work.
- Calling an image path and expecting a picture. Only the two documented methods exist here. Check the error body rather than retrying, because retries will not change the outcome.
- Asking the text model to "draw" something. It may answer with ASCII art, a description or an apology. If you want a picture, send the prompt it writes to an actual image generator.
- Skipping the model list. A quick
GET /v1/modelscall confirms the key works and that the only model isuncensored. It costs nothing. - Ignoring 429 responses. A trial key allows 2 concurrent requests, so a loop with ten workers will fail fast. Cap your worker count or add a short wait.
- Sending very large bodies. The limit is 8 MB per request. Prompt-writing calls are tiny, so this rarely matters, but pasted documents can hit it.
None of these is hard to fix, and the quickest cure is a ten-line test script run before you wire anything into a larger tool.
When another service is the better fit
Be practical about the choice. If you need the picture itself, you need an image provider, and OpenAI is one of several; look at its current documentation and pricing for the details of what it offers. If your only goal is a clean prompt in a mainstream style, a standard assistant may be enough and you will not need this service at all.
This API is the better fit when the text step is the bottleneck: the assistant you use refuses or waters down your prompt requests, you need a high volume of prompts at a predictable per-token price, or you want an OpenAI-compatible endpoint for fiction, roleplay and companion tools for lawful adult use without rewriting your client code. For full parameter details, the documentation has the request format and the error codes.
One more practical note: prompts sent to this API are not used for training. Still, treat any hosted service as outside your machine and avoid sending secrets you would not paste into a web form.
