First request in five minutes
Drop in a new base URL and API key to start using the uncensored endpoint. This guide covers the exact syntax for your existing client code.
Base URL & Authentication
Connect to the endpoint by setting base_url to https://api.smollm.top/v1 and passing your key in the Authorization header. You generate this key on the Get API key page via Google or email. No phone number is required. The key grants access to the single uncensored model with a 100,000-token context window.
Authentication is standard Bearer token format. Keep your key secure; it provides direct access to your prepaid credit. There is no subscription fee, so your account remains active as long as you have credit, which never expires.
First Request
Send a standard chat completion request to test connectivity. The model ID is always uncensored. You can adjust temperature and top_p to control creativity. The system returns text output directly. If you do not set max_tokens, the response can run to the end of the window.
curl https://api.smollm.top/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."}]
}'This confirms your key works and credits are deducted correctly. Errors like invalid keys (401) or insufficient funds (402) are returned immediately without charge.
Python SDK Integration
Use the official openai Python package. Initialize the client with your custom base URL and key. The library handles JSON serialization automatically. Pass your messages in the standard list format. This approach lets you reuse your existing prompt engineering logic without rewriting data structures.
from openai import OpenAI
client = OpenAI(base_url="https://api.smollm.top/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)Ensure your OpenAI package is up to date. The client supports all standard parameters like stop sequences and seed for reproducibility. Streaming is handled separately via the stream parameter.
Node SDK Usage
Initialize the openai Node.js package with the baseURL and apiKey. The structure mirrors the Python SDK. Use the chat.completions.create method. This ensures compatibility with libraries built on top of the OpenAI standard. You can mix and match clients if needed, but the base URL must remain consistent.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.smollm.top/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);Handle promises or use async/await as usual. The response object contains the generated text and token usage statistics. This method is ideal for backend services processing batch requests.
Streaming Responses
Enable streaming by setting stream: true. The API returns chunks as Server-Sent Events (SSE). You receive partial text updates in real time. The final chunk contains the total token usage for the request. This is useful for UI typing effects or long-form content generation.
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)Process each chunk sequentially. The last chunk also includes the finish_reason to indicate completion. Streaming does not change the pricing model; you still pay for total tokens used.
Limits, Errors & Context
Each key supports 300 requests per minute and 8 concurrent requests. The maximum request body size is 8 MB. If you exceed the rate limit, you receive a 429 error. Context window is 100,000 tokens total, including prompt and completion. Errors and refusals are free. Credit is deducted only for successful token processing.
Capabilities and limits
The numbers below are the real limits of this API, not marketing. Compare them with what your app needs.
| Parameter | Details |
|---|---|
| Compatibility | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Authentication | Authorization: Bearer YOUR_KEY |
| Base URL | https://api.smollm.top/v1 |
| Model | uncensored |
| Max context | 100,000 tokens, input and output combined |
| Completion length | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| SSE streaming | Supported (stream: true), usage included at the end |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Other parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| Structured output | response_format: {"type": "json_object"} |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Requests per minute | 300/min per key |
| Parallel requests | up to 8 in parallel per key |
| Request size | 8 MB request body |
| Bonus credit | +5% on $50+, +10% on $100+, +15% on $200+ |
| Subscription | paid credit never expires, no subscription |
| Price | input $0.15 / 1M tokens, output $0.50 / 1M tokens |
| Payment | crypto: USDT on TRON or USDC on Base, $20–$500, any whole sum |
| Free trial | $0.50 of credit valid 7 days, no card needed · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up |
| How you pay | prepaid credit, charged by real token usage; errors and refusals are free |
| Sign-in | sign in with Google or with e-mail + password |
| Key management | one active key per account; a new key replaces the old one |
| Content | adult content allowed; sexual content involving minors is refused |
When a request fails
Every error is JSON with a type you can switch on. You are never charged for an error.
| Code | Type | Meaning |
|---|---|---|
400 | bad_request | malformed request or too long for the context window |
401 | missing_key · invalid_key · key_revoked | check the Authorization header or use your current key |
402 | no_credit | balance is empty — top up, requests resume at once |
403 | content_blocked | sexual content involving minors — refused, not billed |
404 | not_found | only /v1/chat/completions and /v1/models exist |
413 | request_too_large | request body larger than 8 MB |
429 | rate_limited · concurrency | slow down: rate or parallel limit reached |
503 | upstream_busy | temporary overload, retry shortly |
Questions and answers
Does the trial credit expire?
The $0.50 trial credit is valid for 7 days from account creation. Claim this credit with one click on your API key page. Regular prepaid credit never expires. You can top up by crypto (USDT on TRC20, USDC on Base) at any time.
What happens if I send a request with no max_tokens?
With no max_tokens, the response can run to the end of the window. You can limit it by setting the max_tokens parameter explicitly.
Can I use this with LangChain or LlamaIndex?
Yes. Since the endpoint is OpenAI-compatible, any library that supports custom base URLs will work. Just configure the client with https://api.smollm.top/v1 and your API key.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.