EN ▾
Get API key
uncensoredimage.cc

Updated

Image API for Testing: Try a Text API with $0.50

If you landed here looking for an image api for testing, one correction first: this service is a text API. It does not generate images, audio or video. What it offers is an OpenAI-compatible endpoint you can test for free with $0.50 of trial credit.

A lab test tube and abstract checklist beside a terminal cube, representing testing a text API with trial credit

What this API is and is not

The domain name says image, and the confusion is fair. Here is what you get: one open-weight language model, run by an independent provider, tuned to answer without content refusals for lawful adult use. You send text to POST /v1/chat/completions and get text back. You can also call GET /v1/models.

What you do not get: image generation, audio, video, embeddings or fine-tuning. If your test plan needs pictures out, this is the wrong tool. If you need a text model that writes image prompts, captions, alt text or scene descriptions for something else to render, it fits. The text API page for image workflows covers that use.

Getting the trial credit

Sign up with Google, or with an email and password. Open the API key page and click once to claim $0.50 of trial credit. It is one claim per person, it lasts 7 days, and it needs no payment details.

Trial keys are rate limited more tightly than paid ones: 2 concurrent requests and 60 requests per minute, against 8 and 300 for a full key. That is fine for a test. It also means your test harness must not hammer the endpoint in parallel, or you will see 429 responses that say more about the trial limits than about the service.

A test script that covers the basics

Rather than clicking around, run one script that exercises the features most integrations rely on. Install the SDK with pip install openai and set API_KEY in your environment.

import json
import os
import time
from openai import OpenAI

client = OpenAI(
    base_url="https://api.uncensoredimage.cc/v1",
    api_key=os.environ["API_KEY"],
)
MODEL = "uncensored"


def check(name, fn):
    t0 = time.perf_counter()
    try:
        detail = fn()
        print(f"PASS {name} ({time.perf_counter() - t0:.2f}s) {detail}")
    except Exception as exc:
        print(f"FAIL {name}: {exc}")


def models():
    ids = [m.id for m in client.models.list().data]
    assert MODEL in ids
    return ids


def basic_chat():
    r = client.chat.completions.create(
        model=MODEL,
        messages=[{"role": "user", "content": "Reply with the single word: ready"}],
        max_tokens=10,
    )
    return repr(r.choices[0].message.content)


def streaming():
    first = None
    t0 = time.perf_counter()
    parts = []
    stream = client.chat.completions.create(
        model=MODEL,
        messages=[{"role": "user", "content": "Count from 1 to 10."}],
        stream=True,
    )
    for chunk in stream:
        if chunk.choices and chunk.choices[0].delta.content:
            if first is None:
                first = time.perf_counter() - t0
            parts.append(chunk.choices[0].delta.content)
    return f"first token after {first:.2f}s, {len(parts)} chunks"


def json_mode():
    r = client.chat.completions.create(
        model=MODEL,
        messages=[{"role": "user",
                   "content": "Return a JSON object with keys name and age for a fictional person."}],
        response_format={"type": "json_object"},
    )
    return list(json.loads(r.choices[0].message.content).keys())


def tool_call():
    tools = [{
        "type": "function",
        "function": {
            "name": "get_time",
            "description": "Get the current time in a city",
            "parameters": {
                "type": "object",
                "properties": {"city": {"type": "string"}},
                "required": ["city"],
            },
        },
    }]
    r = client.chat.completions.create(
        model=MODEL,
        messages=[{"role": "user", "content": "What time is it in Lisbon? Use the tool."}],
        tools=tools,
        tool_choice="auto",
    )
    calls = r.choices[0].message.tool_calls
    assert calls, "no tool call returned"
    return calls[0].function.name + " " + calls[0].function.arguments


for name, fn in [("models", models), ("chat", basic_chat), ("streaming", streaming),
                 ("json mode", json_mode), ("tool call", tool_call)]:
    check(name, fn)

Each check is tiny, so the whole run uses a few thousand tokens at most. Because a failed or refused request is not charged, a check that errors out does not eat into the trial.

What to look at in the results

Compatibility

If all five checks pass with only the base URL, key and model changed, your existing OpenAI-style code will most likely work as is. Passing the tool call check matters if you plan to build agents: it confirms the model returns structured tool_calls that your loop can answer with a role: "tool" message.

Latency

The script prints timing, but treat the numbers as yours alone. They depend on your location, your network, the prompt length and how busy the service is at that moment. No latency figures are promised here, so test at the times of day you will actually use it and with prompts of realistic size. Time to first token on a streamed request is usually the number that matters for chat products, because users see text appear long before the full reply is done. Run the script several times in a row, and at different hours, before drawing any conclusion from a single run.

Response quality

Quality is the check no script can do. Send 10 to 20 prompts taken from your real use case, in the tone and domain you need, and read the answers. The point of this model is that it does not refuse lawful requests, so include prompts that other APIs have rejected for you. One rule never changes: no sexual content involving minors.

Headers and errors

Print X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests and X-RateLimit-Limit-Concurrency from the raw response if you want to confirm which limits your key has. With the Python SDK, call client.chat.completions.with_raw_response.create(...) to get at the headers.

A short test plan to follow

Scripts find breakage; a plan tells you what to do with the results. A sensible order for the first afternoon:

  1. Run the script above and fix anything that fails. Most failures here are a wrong base URL or key.
  2. Point your real application at the endpoint, changing only the base URL, key and model name. Note anything that breaks, such as a parameter your code sends that the API ignores.
  3. Replay 20 of your real prompts, ones that represent the hard cases for your product. Read every answer.
  4. Check that your error handling copes with a 429. Provoke one on purpose, as described below.
  5. Check your balance with the X-Balance-USD header before and after, and compare it with the cost you calculate from the token usage in each response.

That last step is a useful habit. If the two numbers agree, you can budget with confidence, and you have proven that your token estimates match what is billed.

Keep a note of the results. If the trial convinces you, you will need the findings when you decide on a first top-up amount, and if it does not, the note tells you which requirement the API failed. Either outcome is cheaper to learn from $0.50 than from a large prepayment.

Testing the limits on purpose

Production bugs often start at the rate limit, so provoke it once while the stakes are low. Fire three requests at the same time from a trial key. The third should come back as HTTP 429 with the error code concurrency. Send more than 60 in a minute and you will see rate_limited. On temporary overload the API also returns 429, with a Retry-After: 5 header.

Also try a request body that is clearly wrong, such as a misspelled model name, and see what your code does with the error. Handling a bad request cleanly is part of compatibility too. Make sure your client reads these codes and waits instead of retrying instantly. A streamed request keeps its concurrency slot until the stream ends, which is easy to forget in tests that read only the first few chunks and then drop the connection.

What the trial buys

Rates are $0.15 per 1M input tokens and $0.50 per 1M output tokens. Suppose each test call sends 300 input tokens and receives 200 output tokens.

  • Input: 300 x $0.15 / 1,000,000 = $0.000045
  • Output: 200 x $0.50 / 1,000,000 = $0.0001
  • Per call: $0.000145
  • The five-check script above, run once: about $0.0007
  • $0.50 in total: about 3,448 calls of that size (0.50 / 0.000145)

So the trial is more than enough for compatibility work and a decent sample of real prompts. For load testing it is not the right tool, given the 60 per minute cap. When you are ready to go further, top-ups on this site are crypto only: USDT on TRC20 or USDC on Base, any whole amount from $20 to $500, with +5% bonus from $50, +10% from $100 and +15% from $200. Credit never expires. See the pricing page and the documentation for details.

Questions and answers

Can I generate images with this API?

No. It is text only. It can write image prompts, captions or descriptions, but another service has to render the pictures.

Does the trial need payment details?

No, none are needed. You claim $0.50 with one click on the API key page after sign-up. It is one per person and valid for 7 days.

Will my existing OpenAI code work?

In most cases, yes. Change the base URL to https://api.uncensoredimage.cc/v1, use your key, and set the model to uncensored.

What happens when the trial runs out?

Trial credit is valid for 7 days. To keep going, top up from $20 with USDT on TRC20 or USDC on Base.

Your key is one form away

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