EN ▾
Get your key

API Source Documentation: Chat Completions & Models

Connect your application to our uncensored LLM with a single base URL and standard OpenAI-compatible headers. We handle the infrastructure so you can focus on building unrestricted chat experiences.

Authentication and Base URL Configuration

The API source for your requests lives at https://api.apisource.cc/v1. You must include an Authorization header with your Bearer token. This setup works with the official OpenAI SDKs and any compatible client by simply changing the base URL and providing your key. You receive one active key per account, which appears immediately after signup via Google or email.

Chat Completions Endpoint Parameters

Send text to the model using POST /v1/chat/completions. We serve one uncensored large language model identified by the ID uncensored. You can control generation behavior with parameters like temperature, top_p, and stop. The model answers without content refusals for lawful adult use, making it ideal for roleplay or unrestricted content generation.

curl https://api.apisource.cc/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Get the current USD price per token for the model"}]
  }'

Streaming Responses and Token Usage

Enable streaming by setting stream: true in your request. We return Server-Sent Events (SSE) where the final chunk contains the actual token usage statistics. This approach allows your application to display responses in real-time while accurately tracking consumption. You can also enforce strict JSON outputs using the response_format parameter.

Function Calling and JSON Mode

Integrate tools directly into your AI workflow by defining functions in the tools array. The model supports tool_choice for precise control over execution. When you need structured data, set response_format to {"type": "json_object"} to ensure the output is valid JSON. This capability works seamlessly with the uncensored model for consistent data extraction.

from openai import OpenAI

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

Rate Limits and Error Handling

We enforce a limit of 300 requests per minute and allow 8 concurrent requests per key. If you exceed these bounds, you will receive a 429 error. Other common errors include 401 for an invalid API key and 402 when your prepaid credit is exhausted. Requests do not expire, and you can top up instantly using USDT on TRC20 or USDC on Base.

import OpenAI from "openai";

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

Model Specifications and Context Window

The model supports a context window of 100,000 tokens for the combined prompt and completion. The maximum output per request is 16,000 tokens, or 2,048 if you do not specify max_tokens. This architecture eliminates the complexity of model routing while providing a single, reliable uncensored option for your API source needs. You pay strictly for real token usage.

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)

Technical FAQ

Is API Source an official partner of OpenAI?

No, we are an independent service. Our API is OpenAI-compatible but serves our own uncensored model, not GPT or any other vendor's model. Check the vendor's own documentation for details on their specific models.

What happens if I get a 402 error?

A 402 error indicates that your prepaid credit is exhausted. You can top up instantly with crypto (USDT or USDC) to continue making requests. Errors and refusals do not consume your credit.

Does the uncensored model filter adult content?

The model does not refuse lawful adult, fictional, or controversial topics. However, a hard limit always applies: requests involving sexual content with minors will be refused. This ensures a safe baseline while maintaining freedom for other content types.

Generate your key instantly

Register, retrieve your key, update the base URL. Configuration is immediate.

Get your key