EN ▾
Get API key

Image Generation API: How to Use an Uncensored Text API for Better Results

An image generation API handles the visual creation, but the quality of your output depends heavily on the text layer feeding it. Using an uncensored LLM for prompt engineering and post-processing removes creative restrictions, allowing for more precise, niche, or adult-oriented results without the friction of content filters.

Image Generation API: How to Use an Uncensored Text API for Better Results

Updated

Key points

  • Text prompts are the primary lever for controlling style, composition, and detail in image generation workflows.
  • Uncensored LLMs allow for unrestricted creative freedom, including niche aesthetics and adult themes, without model refusals.
  • OpenAI-compatible APIs enable easy integration into existing Python or Node.js pipelines with minimal code changes.
  • Post-processing and captioning with an uncensored model ensure accurate metadata extraction without semantic filtering.

No card needed. After sign-up, claim $0.50 of free test credit with one click (once per person).

Get API key

Why Text Matters in Image Generation Pipelines

When you integrate an image generation API into your workflow, the visual model is only as good as the prompt it receives. Most users focus on parameters like CFG scale, steps, or sampler type, but the textual input is the foundational instruction. A well-crafted prompt dictates composition, lighting, style, and subject matter with far greater precision than tweaking visual parameters alone.

Traditional LLMs used for prompt generation often apply content filters that can alter or restrict creative nuances. For example, an uncensored model might describe a scene with specific anatomical details or niche artistic styles without flagging them as inappropriate. This is critical for developers building pipelines for adult content, specialized art styles, or unrestricted creative tools.

  • Prompt quality directly correlates with image coherence and detail.
  • Content filters can inadvertently remove creative elements deemed "sensitive."
  • Uncensored models provide raw, unfiltered creative freedom for niche use cases.

Choosing an Uncensored LLM for Prompt Engineering

Not all LLMs are created equal for prompt engineering. Some models are tuned for politeness and safety, which can lead to over-explaining or avoiding bold creative choices. An uncensored LLM, by contrast, is optimized to answer directly and creatively without unnecessary hedging. This makes it ideal for generating prompts that are concise, vivid, and ready for image models.

When selecting an LLM for your pipeline, look for one that supports a large context window. This allows you to provide detailed instructions, style references, and multiple subject variations in a single request. Our uncensored model supports a 100,000-token context window, ensuring that even complex prompt chains fit within a single API call.

FeatureBenefit for Prompt Engineering
UncensoredNo refusals for adult or niche topics
Large ContextHandle complex instructions in one request
OpenAI-CompatibleEasy integration with existing SDKs

Step 1: Install the OpenAI-Compatible SDK

To integrate our text API into your image generation workflow, start by installing the official OpenAI SDK or a compatible library. This ensures compatibility with our OpenAI-compatible endpoints. For Python environments, use pip to install the package.

  • Install the SDK: pip install openai
  • Import the client: from openai import OpenAI

This setup allows you to use familiar methods like chat.completions.create to send requests. The same approach works for Node.js, Go, and other languages with OpenAI-compatible clients. This flexibility means you can swap out the base URL and API key without rewriting your core logic.

Step 2: Configure Base URL and API Key

Configuration is straightforward. Set your base URL to https://api.unrestrictedaiimage.cc/v1 and provide your API key. This key is generated during signup and grants access to the uncensored model.

Here is how you configure the client in Python:

client = OpenAI( base_url="https://api.unrestrictedaiimage.cc/v1", api_key="YOUR_API_KEY" )

This configuration points all requests to our servers. The model ID to use is uncensored. This model is an open-weight model tuned for unrestricted output, meaning it will generate prompts without filtering for adult or controversial topics, as long as they are lawful.

Step 3: Generate Prompts with Context

With the client configured, you can now generate prompts. Send a system prompt that defines the role of the LLM, such as "You are an expert image prompt generator." Then, provide the user message with your desired style or subject.

For example, to generate a prompt for a cyberpunk cityscape, you might send:

  • System: "Generate detailed image prompts for Stable Diffusion.
  • User: "Create a prompt for a cyberpunk city at night, neon lights, rain-slicked streets, cinematic lighting."

The uncensored model will return a vivid, detailed prompt without unnecessary qualifiers. You can also use the temperature parameter to control creativity. A higher temperature yields more varied and imaginative prompts, while a lower temperature ensures consistency.

Step 4: Post-Processing and Captioning

After generating images, you often need to create captions or analyze the output. An uncensored LLM is ideal for this because it can describe images without avoiding sensitive or niche content. This is particularly useful for datasets, archives, or content platforms that require accurate, unrestricted descriptions.

You can send the image prompt or a text description to the LLM and ask it to generate a caption. The model will return a concise, accurate description without filtering for tone or subject matter. This ensures that your metadata remains true to the original creative intent.

  • Generate accurate captions for image archives.
  • Analyze image prompts for consistency.
  • Extract key elements from image descriptions for tagging.

Step 5: Handling JSON Output for Automation

For automated pipelines, structured output is essential. Our API supports JSON mode, which allows you to request the response in a specific JSON format. This is useful for extracting structured data from prompts, such as subject, style, lighting, and composition.

Set the response_format parameter to {"type": "json_object"}. The model will return a valid JSON object that can be parsed directly in your code. This eliminates the need for regex or manual parsing, making your pipeline more reliable and reliable.

  • Use response_format for structured data.
  • Parsed JSON integrates easily into databases or APIs.
  • Ensure consistent output format for automation.

Step 6: Optimizing Token Usage and Costs

Our pricing is transparent: $0.15 per 1M input tokens and $0.50 per 1M output tokens. Errors and refusals are free, so you only pay for successful completions. Credit never expires, and there are no monthly fees. This model is cost-effective for high-volume pipelines.

To optimize costs, minimize the length of your prompts and responses. Use concise system prompts and avoid redundant information. The 100,000-token context window allows for large inputs, but using only the necessary tokens reduces costs. Additionally, streaming responses can help manage latency, though token usage is calculated based on the total tokens sent and received.

Step 7: Testing with the Free Trial

Before committing to a credit purchase, test the API with a free trial. New users get $0.50 of trial credit, one per person, valid for 7 days. Claim this credit with one click on your API key page. No credit card is required, and no phone number is needed. This allows you to verify integration, test prompt quality, and evaluate costs without risk.

Sign up using Google or email, and your API key is generated immediately. Use the trial to send requests, check response times, and ensure the uncensored behavior meets your needs. This is an ideal way to validate the API before scaling your pipeline.

Questions and answers

Is this API suitable for generating prompts for adult content?

Yes, the model is uncensored and does not refuse lawful adult topics. It is designed to generate prompts without content filters, making it ideal for adult content pipelines. The only hard limit is on sexual content involving minors, which is always blocked.

Does the API support image generation itself?

No, this is a text-only API. It generates text prompts, captions, and analysis. You use it to feed text into an image generation API like Stable Diffusion or Flux. It does not generate images, audio, or video.

How do I pay for the API?

Payments are accepted via crypto only: USDT (TRC20) or USDC (Base). You can top up any whole amount from $20 to $500. Credits never expire, and there are no monthly fees. Cards and PayPal are not accepted.

What is the context window size?

The model supports a 100,000-token context window, which includes both the prompt and the completion. There is no separate output cap, and if max_tokens is not set, the response can run to the end of the window.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Start with trial credit

Email and password, key on screen right away.