API Documentation & Quickstart
Drop an uncensored LLM into your existing codebase with zero friction. This OpenAI-compatible API strips corporate refusals while keeping your SDK logic intact.
Authentication & Base URL
Your API key authenticates every request to our base URL: https://api.chatgptapicost.com/v1. We support standard header-based auth. Send your key in the Authorization header as a Bearer token. This works with the official OpenAI SDKs and any compatible client.
- Base URL:
https://api.chatgptapicost.com/v1 - Auth Header:
Authorization: Bearer YOUR_API_KEY - Model ID:
uncensored
curl https://api.chatgptapicost.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List the standard per token pricing tiers."}]
}'
The /v1/chat/completions Endpoint
Send your prompt to POST /v1/chat/completions and receive text output. The endpoint accepts a messages array containing your conversation history. Each message requires a role (user, assistant, system) and content string. We charge by real token usage, not per request.
- Input Price: $0.15 per 1M input tokens
- Output Price: $0.50 per 1M output tokens
- Error Handling: Refusals and errors incur zero charge
from openai import OpenAI
client = OpenAI(base_url="https://api.chatgptapicost.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)
Streaming & Token Usage
Enable streaming by setting stream: true. The API returns Server-Sent Events (SSE). Token usage metadata appears only in the final chunk. This allows you to track consumption in real-time without waiting for full generation. Streaming reduces perceived latency for high-volume applications.
- Format: Server-Sent Events (SSE)
- Usage Data: Available in the last chunk only
- Benefits: Lower latency perception, real-time progress
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 & JSON Mode
Use tools and tool_choice for function calling. Specify response_format: {"type": "json_object"} for strict JSON output. This ensures structured data for your pipelines. The model supports both structured and conversational outputs seamlessly.
- JSON Mode:
response_format: {"type": "json_object"} - Function Calling: Standard OpenAI tool format
- Compatibility: Works with existing SDK parsers
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.chatgptapicost.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);
Parameters: Temperature, Top P, and Stop
Control generation with standard parameters. temperature adjusts randomness. top_p filters nuclei sampling. stop sequences halt generation early. You can also set seed for deterministic results. These parameters give you full control over the output style.
- Temperature: Controls randomness (0.0 to 2.0)
- Top P: Nucleus sampling threshold (0.0 to 1.0)
- Stop: Array of strings to halt generation
Context window: 100,000 tokens (prompt + completion). Max output: 16,000 tokens per request.
Limits, Errors, and Context Window
Rate limits are 300 requests per minute and 8 concurrent requests per key. Request bodies must be under 8 MB. Errors include 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. Your context window is 100,000 tokens total. Errors and refusals are free.
- Rate Limit: 300 requests/minute, 8 concurrent
- Body Limit: 8 MB
- Context: 100,000 tokens (input + output)
Credit never expires. Top-up via crypto only (USDT TRC20 or USDC Base).
FAQ
What is the chatgpt API cost for uncensored generation?
We charge $0.15 per 1M input tokens and $0.50 per 1M output tokens. Credit is prepaid and never expires. Errors and refusals incur zero charge.
How do I handle streaming responses?
Set <code>stream: true</code> in your request. The API returns Server-Sent Events. Token usage appears in the final chunk. This allows real-time progress tracking.
What are the rate limits per API key?
You can make 300 requests per minute and have 8 concurrent requests. Request bodies must be under 8 MB. Exceeding limits returns a 429 error.
Access your API key
Register, retrieve your key, update the base URL. That is the complete configuration.
Get your key