Authentication and Base URL
Para começar, acesse nossa plataforma e crie uma conta apenas com e-mail e senha. Após a confirmação, sua chave de API será exibida imediatamente. Não é necessário cartão de crédito para o trial. Utilize a base URL https://api.llmsemcensura.com/v1 em seus clientes e defina a chave no cabeçalho Authorization: Bearer SUA_CHAVE. O modelo a ser invocado é identificado por uncensored.
Chat Completions Endpoint
The POST /v1/chat/completions endpoint is the only route needed for text usage. Send messages in the messages structure and receive direct responses. We do not offer embeddings or image generation. The model is open and runs on our GPU servers, without using data to train other models. Set the model to uncensored in requests.
Basic request example:
curl https://api.llmsemcensura.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
}'
Streaming Support (SSE)
For applications requiring low perceived latency, enable streaming by setting stream: true. The API will return a Server-Sent Events (SSE) stream, allowing text to be displayed token by token. This is ideal for responsive chat interfaces. The client must process the stream until the done event.
Streaming usage example:
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)
Function Calling and Tools
The model supports native function calling. You can define tools in the request body so the AI returns structured arguments instead of free text. This facilitates integration with external systems. The response format follows the OpenAI standard, returning tool_calls when appropriate.
Token Management and Limits
The total context (prompt + completion) is limited to 100,000 tokens. The price is $0.25 per 1M input tokens and $1.00 per 1M output tokens. Paid credit never expires. You can top up from $10, with a +5% bonus above $50 and +10% above $100. The initial trial offers $0.50 valid for 7 days.
Python Code Example
The official openai library works natively. Just change the base_url and provide your key. The code below demonstrates a simple interaction. Make sure to install the package via pip before running.
from openai import OpenAI
client = OpenAI(base_url="https://api.llmsemcensura.com/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.js
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.llmsemcensura.com/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);