Get your key

Models api quickstart guide

This guide covers the essentials for integrating our uncensored LLM API into your projects using standard OpenAI-compatible clients. You will learn how to configure your environment, send requests, and handle streaming responses with precise control over model parameters.

Base URL and authentication

The API endpoint is https://api.modelsapi.cc/v1. All requests require a valid API key passed in the Authorization header. You generate this key on the dashboard by clicking 'Get API key'. It appears immediately after you sign up via Google or email. No phone number is required for this process. The key is tied to your account balance and usage limits.

Sending your first chat completion request

Send a POST request to /v1/chat/completions with the model ID uncensored. The request body must include a messages array containing your prompt. The API returns a text response directly. Errors do not consume your prepaid credit. You can verify the endpoint works by sending a simple greeting.

curl https://api.modelsapi.cc/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "List five python libraries for data visualization"}]
  }'

Python SDK integration

Use the official OpenAI Python library to interact with the API. Set the base URL to our endpoint and provide your API key. This approach ensures compatibility with existing codebases. You can instantiate the client and call the chat completion method. The response object contains the generated text and token usage statistics.

from openai import OpenAI

client = OpenAI(base_url="https://api.modelsapi.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)

Node SDK integration

The Node.js SDK follows the same configuration pattern. Import the OpenAI package and configure the base URL. Pass your API key in the configuration object. This setup allows you to use familiar methods for generating text. The library handles the HTTP requests automatically.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.modelsapi.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);

Streaming responses with Server-Sent Events

Enable streaming by setting stream: true in your request. The API sends multiple chunks of data as they are generated. Each chunk contains a partial response. The final chunk includes the total token usage. This method reduces perceived latency for long outputs. It is ideal for real-time applications.

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)

Limits, errors, and context window

The context window supports 100,000 tokens total. You can output up to 16,000 tokens per request. Errors return a 401 status for invalid keys and 402 for insufficient credit. Rate limits return 429 after 300 requests per minute. The 429 error is temporary. Your prepaid credit never expires. Errors do not charge your balance. Use these codes to handle failures gracefully in your application logic.

Common questions

Is this the best uncensored API for large context windows?

Our API supports a 100,000 token context window. This allows you to process large documents efficiently. Many other services offer smaller limits. Check other providers for specific window sizes.

How does the uncensored model handle refusals?

The model does not refuse lawful adult, fictional, or controversial topics. It only blocks sexual content involving minors. This makes it suitable for unrestricted creative writing and research. Refusals are rare and specific to this hard limit.

What happens if I exceed the rate limit?

You receive a 429 status code. You must wait before sending more requests. The limit is 300 requests per minute per key. Retry logic should handle this gracefully. Your credit remains untouched during these delays.

Get your key now

Sign up, grab the key, update the base URL. Done.

Get your key