getting started

Quickstart

An OpenAI-compatible chat completions API served by models with no built-in refusals. Point any OpenAI SDK at https://uncens.ai/v1, pass your key, and the code you already have keeps working.

connect

base url & auth
https://uncens.ai/v1

Authorization: Bearer sk-uncens-...
Content-Type: application/json

first request

$ curl https://uncens.ai/v1/chat/completions \
    -H "Authorization: Bearer $UNCENS_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "uncens-pro",
      "messages": [{"role": "user", "content": "Say hi"}],
      "max_tokens": 50
    }'
# pip install openai
from openai import OpenAI
import os

client = OpenAI(
    api_key=os.environ["UNCENS_API_KEY"],
    base_url="https://uncens.ai/v1",
)

resp = client.chat.completions.create(
    model="uncens-pro",
    messages=[{"role": "user", "content": "Say hi"}],
    max_tokens=50,
)

print(resp.choices[0].message.content)
// npm install openai
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.UNCENS_API_KEY,
  baseURL: "https://uncens.ai/v1",
});

const resp = await client.chat.completions.create({
  model: "uncens-pro",
  messages: [{ role: "user", content: "Say hi" }],
  max_tokens: 50,
});

console.log(resp.choices[0].message.content);

response

200 · application/json
{
  "id": "chatcmpl-2a2456de-50a8-46f7-8c9b-ed6d100d08be",
  "object": "chat.completion",
  "created": 1786211471,
  "model": "uncens-pro",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hi there! How can I help you today?",
        "refusal": null,
        "tool_calls": null
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 8,
    "completion_tokens": 11,
    "total_tokens": 19
  }
}
fieldwhat it is
choices Array of completions, one per n. Defaults to a single element.
message The answer: content holds the text, tool_calls is set instead when the model calls a function.
finish_reason stop — done. length — hit max_tokens, text truncated. tool_calls — run the tools and send results back.
usage Token counts. total_tokens is what your quota is charged.

models

modelcontextmax outputinput
uncens-pro 1 000 000 999 990 text default
uncens-mini 262 144 262 134 text + images

Omit model and the request is served by uncens-pro.

streaming

python
stream = client.chat.completions.create(
    model="uncens-pro",
    messages=[{"role": "user", "content": "Count 1 to 3"}],
    stream=True,
    stream_options={"include_usage": True},
)

for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

With stream_options: {"include_usage": true} one extra chunk arrives after the last content chunk: it carries usage and an empty choices array, then the stream ends with data: [DONE]. Chunk shape is in the API reference.