EN ▾
Get API key

First call to the uncensored AI API and connection with the OpenAI SDK

If you are using the uncensored AI API for the first time, you only need an API key and to change the base URL. If you already have code written with the OpenAI SDK, you can receive the first response by just changing the address and model name.

Updated

Isometric illustration of an OpenAI-compatible connector plugged into an API gateway with data flowing

Key takeaways

  • The base URL is https://api.mugeomyeolapi.com/v1, and the model ID is uncensored.
  • Supports chat/completions, responses, and models endpoints, as well as streaming, function calling, and JSON mode.
  • 429 errors are divided into rate_limited and concurrency, requiring different responses depending on the cause.
  • Text-only, and sexual content involving minors is not allowed under any circumstances.

What to prepare before starting

You need three things: key, base URL, and model ID. Your usual OpenAI-compatible client handles the rest.

  1. Sign up. You can sign up with a Google account or email and password.
  2. Create a key on API key issuance page. New users can receive a $0.50 trial credit with one click on this page. It is one per person, valid for 7 days, and requires no payment information.
  3. Set the base URL to https://api.mugeomyeolapi.com/v1 and the model to uncensored.

Authentication uses the standard Authorization: Bearer <key> header. Do not hardcode the key; store it in an environment variable. All examples below read the MUGEOMYEOL_API_KEY variable.

Make your first call with Python

After installing the openai package (v1 or higher), you only need to change the base_url when creating the client.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.mugeomyeolapi.com/v1",
    api_key=os.environ["MUGEOMYEOL_API_KEY"],
)

res = client.chat.completions.create(
    model="uncensored",
    messages=[
        {"role": "system", "content": "당신은 간결하게 답하는 한국어 어시스턴트입니다."},
        {"role": "user", "content": "HTTP 429 오류가 무엇인지 두 문장으로 설명해 줘."},
    ],
    temperature=0.7,
)
print(res.choices[0].message.content)
print(res.usage)

The usage field in the response contains input and output token counts. Charges are calculated based on these numbers. You can view your remaining balance directly in the response header X-Balance-USD. In the Python SDK, you can access headers using with_raw_response.

import os
from openai import OpenAI
client = OpenAI(base_url="https://api.mugeomyeolapi.com/v1", api_key=os.environ["MUGEOMYEOL_API_KEY"])
raw = client.chat.completions.with_raw_response.create(
    model="uncensored",
    messages=[{"role": "user", "content": "안녕"}],
)
print("잔액(USD):", raw.headers.get("X-Balance-USD"))
completion = raw.parse()
print(completion.choices[0].message.content)

curl and Node.js examples

If you just want to verify without an SDK, curl is the fastest. It is useful for checking if your key works correctly.

curl https://api.mugeomyeolapi.com/v1/chat/completions \
  -H "Authorization: Bearer $MUGEOMYEOL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "한 줄로 자기소개해 줘."}]
  }'

The structure is the same in Node.js.

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.mugeomyeolapi.com/v1",
  apiKey: process.env.MUGEOMYEOL_API_KEY,
});

const stream = await client.chat.completions.create({
  model: "uncensored",
  messages: [{ role: "user", content: "짧은 시를 한 편 써 줘." }],
  stream: true,
  stream_options: { include_usage: true },
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

Streaming is enabled with stream: true and delivered via SSE. Usage can be checked at the end of the stream. You can list available models with GET /v1/models. This service only has one model, uncensored, so the list is short.

Commonly used parameters

Most parameters used in OpenAI Chat Completions work as is. Here is a summary of the commonly used ones.

ParameterPurpose
temperature, top_pAdjust randomness of the response. It is easier to predict results by adjusting only one rather than changing both significantly at the same time.
stop, seedSpecify stop strings, attempt to ensure reproducibility
presence/frequency penaltySuppress repetition
max_tokensOptional. If omitted, you can use the remaining part of the context window.
tools, tool_choiceFunction calling. The result is returned as a role: "tool" message.
response_formatEnable JSON mode with {"type":"json_object"}.

The context window is 100,000 tokens for combined prompt and output. When inputting long documents, ensure the input does not take up most of this limit. When using JSON mode, it is stable to specify in the prompt that the response should be in JSON.

import os, json
from openai import OpenAI

client = OpenAI(base_url="https://api.mugeomyeolapi.com/v1", api_key=os.environ["MUGEOMYEOL_API_KEY"])

res = client.chat.completions.create(
    model="uncensored",
    response_format={"type": "json_object"},
    messages=[{"role": "user", "content": "도시 3곳의 이름과 인구 규모 느낌을 JSON 객체로 줘. 키는 cities 하나."}],
)
data = json.loads(res.choices[0].message.content)
print(data)

Endpoints include POST /v1/chat/completions and POST /v1/responses. If your new code uses the Responses format, you can call it with the same base URL. Refer to the detailed fields in the API documentation.

Error codes and retry handling

The first error you will encounter is HTTP 429. In this service, it has two meanings.

  • rate_limited: You have exceeded the number of requests per minute. Official keys allow 300 requests per minute, and trial keys allow 60 requests per minute.
  • concurrency: There are too many requests being processed simultaneously. The production key allows up to 8, and the trial key allows up to 2.

A 429 error also occurs when the server is temporarily busy, in which case the Retry-After: 5 header is attached. You can resend after 5 seconds. Remember that streaming requests occupy one concurrency slot until the stream ends. If you leave the stream open without closing it, you will quickly hit the concurrency limit.

import os, time
from openai import OpenAI, RateLimitError

client = OpenAI(base_url="https://api.mugeomyeolapi.com/v1", api_key=os.environ["MUGEOMYEOL_API_KEY"], max_retries=0)

def ask(prompt, tries=5):
    for i in range(tries):
        try:
            r = client.chat.completions.create(
                model="uncensored",
                messages=[{"role": "user", "content": prompt}],
            )
            return r.choices[0].message.content
        except RateLimitError:
            time.sleep(5 * (i + 1))  # 5초, 10초, 15초 ... 점점 늘려 기다림
    raise RuntimeError("재시도 한도를 넘었습니다")

print(ask("테스트 메시지"))

If concurrent requests are an issue, it is better to limit the number of concurrent calls with a semaphore than to retry. You can check the limit for your current key using the response headers X-RateLimit-Limit-Requests and X-RateLimit-Limit-Concurrency. The request body is up to 8MB. Failed or rejected requests are not charged. When inquiring about issues, providing the X-Request-Id from the response header makes it easier for the Support page to find the cause.

Usage rules and limits to know

This service is an API operated by an independent business using one open-weight model tuned to answer without content rejection, assuming legal adult use. It is not the official API of any company such as Meta, Mistral, Qwen, DeepSeek, OpenAI, xAI, Google, or Anthropic, nor is it a router that distributes requests across models from various vendors. You must know this difference when choosing an uncensored AI API to avoid confusing the documentation with actual behavior.

  • Sexual content involving minors is never allowed under any circumstances. This limit is not waived.
  • Text only. Image, audio, and video generation, embeddings, and fine-tuning are not provided.
  • Submitted prompts are not used for model training. See the Privacy Policy for details.

The absence of rejection in answers does not mean the absence of liability. The service provider must comply with terms of use and relevant laws.

Cost awareness and top up

The cost is $0.15 per 1 million input tokens and $0.50 per 1 million output tokens, deducted from prepaid credit. There is no subscription, and the credit never expires. For example, one request with 2,000 input tokens and 500 output tokens costs $0.0003 for input and $0.00025 for output, totaling $0.00055. Sending 1,000 requests costs $0.55.

You can test about 900 requests of this scale with $0.50 in free trial credit. Top ups are possible in integer amounts from $20 to $500, with a 5% bonus for $50 or more, 10% for $100 or more, and 15% for $200 or more. Payment methods are USDT (TRC20) and USDC (Base). See the Pricing page for the detailed table.

More guides

Frequently Asked Questions

How much do I need to change in OpenAI SDK code?

You only need to change three things: base URL, API key, and model name. The model ID is uncensored, and the base URL is https://api.mugeomyeolapi.com/v1.

How do I get free trial credit?

After signing up, click the button on the API key page to receive $0.50. One per person, valid for 7 days, and no payment information is required.

I am getting a 429 error, what should I do?

First check if the error code is rate_limited or concurrency. The former is exceeding the number of requests per minute, and the latter is exceeding the number of concurrent requests. If the Retry-After header is present, wait for that time and retry.

Can I generate images?

No. This API is text-only and does not support image, audio, and video generation or embeddings.

Can I input long documents at once?

You can use up to 100,000 tokens for combined prompt and output. The request body size is up to 8MB.

API key just by signing up

Create an account, copy the key, change the base URL. That's all the setup you need.

Get API key
Get API key