EN ▾

Model apis quickstart guide

Model APIs provides an uncensored API for raw text generation that is fully OpenAI-compatible, letting you swap in your base URL and key without changing your code. You get direct access to an abliterated model that answers questions without corporate hedging, charged only for the tokens you consume.

Authentication and Base URL

The endpoint lives at https://api.modelapis.cc/v1. Pass your key in the Authorization header as a bearer token. The system rejects requests with invalid keys via 401 errors and blocks attempts to spend credit you do not have with 402 responses. You can generate a new key immediately on the dashboard, and the old one becomes inactive instantly.

Sending a Chat Completion

Send a POST request to /v1/chat/completions with your message history. The model id is "uncensored" and it accepts standard parameters like temperature and top_p. This setup works with any client that speaks the OpenAI protocol, including Cursor and other dev tools.

curl https://api.modelapis.cc/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "get current unix timestamp"}]
  }'

Check the response for the content field inside the assistant message. If you exceed your rate limit, the API returns a 429 status code. You can monitor your remaining balance directly in the dashboard dashboard without needing to parse headers manually.

Streaming Responses via SSE

Enable streaming by setting stream: true in your request body. The API returns Server-Sent Events (SSE) containing partial chunks of text. This approach is ideal for building chat interfaces that render text as it is generated.

from openai import OpenAI

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

resp = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Summarise this thread without softening it."}],
)
print(resp.choices[0].message.content)

Each chunk contains only a fragment of the final response. The final chunk includes the full token usage statistics for the request. This allows you to track costs in real-time without waiting for the entire generation to finish.

Function Calling and Tools

Define your tools in the tools parameter and set tool_choice to auto. The model returns structured tool calls when appropriate, allowing your application to execute external functions. This feature works seamlessly with the standard OpenAI SDKs.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.modelapis.cc/v1", apiKey: process.env.API_KEY });

const resp = await client.chat.completions.create({
  model: "uncensored",
  messages: [{ role: "user", content: "Draft a villain monologue for my game." }],
});
console.log(resp.choices[0].message.content);

Parse the tool_calls array in the assistant message to trigger your backend logic. You can then feed the results back into the conversation as tool responses. This cycle enables complex agentic workflows without leaving the API.

JSON Mode Enforcement

Set response_format to {"type": "json_object"} to force the model to output valid JSON. This is crucial for applications that parse the response programmatically. The model will adhere to this constraint strictly.

Use this mode when you need predictable structures for your data pipelines. It reduces the need for post-processing regex hacks. The model remains uncensored even in JSON mode, delivering raw data without content filters.

Token Limits and Context Window

The context window supports up to 100,000 tokens for both prompt and completion combined. You can request up to 16,000 output tokens per request. If you do not specify max_tokens, the default is 2,048 tokens.

Requests are limited to 300 per minute per key. The maximum request body size is 8 MB. These limits ensure stable performance for high-volume usage. Errors and refusals do not consume your prepaid credit, so you only pay for successful generations.

Streaming

stream = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Tell the story in second person."}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

Common questions

How do I top up my credit for model APIs?

You can top up using crypto only, specifically USDT on TRC20 or USDC on Base. Amounts range from $20 to $500, with bonus credits added for larger deposits. Your credit never expires, so you can top up whenever you need more capacity.

Is the uncensored model API free to use?

No, it is a paid service based on token consumption. However, every new account receives $0.50 in trial credit valid for 7 days. This allows you to test the API without entering payment details immediately.

What happens if I exceed my rate limit?

The API returns a 429 Too Many Requests error. You can send up to 300 requests per minute per key. If you need higher throughput, you can generate additional keys or wait for the window to reset. Errors like 401 or 402 do not count against your usage.

Access your key instantly

Sign up, retrieve your key, update your base URL. That’s all.

Create keyView documentation