Authentication and base URL setup
Start by generating a key via the dashboard and pointing your SDK to the designated endpoint. The base URL is HTTPS://api.claudetoken.cc/v1, which replaces the standard OpenAI proxy address in your configuration. This single change routes all requests through our uncensored inference engine while maintaining full compatibility with OpenAI-compatible clients.
- Navigate to the key generation page and select Continue with Google or use email and password.
- Copy the resulting API key immediately, as it is shown only once.
- Set the environment variable or configuration object to point to the new base URL.
curl https://api.claudetoken.cc/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "calculate the total token usage for this prompt"}]
}'
Sending your first chat completion request
Send a standard chat completion payload to receive an uncensored response from the model. Use the model identifier uncensored to ensure you are hitting the dedicated uncensored weights rather than a standard proxy. This request structure mirrors standard OpenAI endpoints, allowing you to swap providers without rewriting your application logic.
from openai import OpenAI
client = OpenAI(base_url="https://api.claudetoken.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)The response will contain the generated text in the choices array. You can immediately verify the uncensored nature by asking for adult or controversial topics that standard models might refuse.
Configuring temperature, top_p, and seeds
Control the creativity and reproducibility of the uncensored model using standard sampling parameters. Adjust the temperature value to influence randomness, while top_p restricts the nucleus sampling threshold. Setting a seed ensures that identical inputs produce identical outputs, which is critical for debugging or reproducible content generation.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.claudetoken.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);These parameters work exactly as they do in the OpenAI API. You can fine-tune the output style by lowering the temperature for deterministic responses or raising it for more creative, less constrained text generation.
Enabling JSON mode and function calling
Structure your API interactions for programmatic use by enabling JSON mode or defining tools for function calling. Set the response_format to json_object to force the model into a strict JSON output, which is ideal for parsing data in your applications. You can also define function schemas in your request to allow the model to execute specific actions.
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)This capability allows you to integrate the uncensored LLM into automated workflows without worrying about formatting errors. The model adheres to the provided schema, ensuring reliable data extraction for your downstream processes.
Handling streaming responses and usage
Enable streaming to receive tokens in real-time via Server-Sent Events (SSE). This method reduces perceived latency and allows you to display the uncensored output as it generates. The final chunk of the stream contains the token usage statistics, which are then deducted from your prepaid credit.
Errors and refusals that are not due to content filters do not consume tokens, but standard rate limits apply. This approach ensures you only pay for actual inference work, avoiding waste on failed connections.
Understanding rate limits and context windows
Monitor your request volume against the strict limits of 300 requests per minute and 8 concurrent requests per key. The context window supports up to 100,000 tokens for the combined prompt and completion, with a maximum output length of 16,000 tokens per request. If you do not specify max_tokens, the default output limit is 2,048 tokens.
A 429 error indicates you have hit the rate limit, while a 401 error usually means your API key is invalid or expired. Ensure your prepaid credit is active to avoid a 402 error, which signifies insufficient funds for the inference request.