EN ▾
Get API key

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.

ParameterDetails
CompatibilityOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
MethodsPOST /v1/chat/completions · GET /v1/models
AuthenticationAuthorization: Bearer YOUR_KEY
Base URLhttps://api.smollm.top/v1
Modeluncensored
Max context100,000 tokens, input and output combined
Completion lengthprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
SSE streamingSupported (stream: true), usage included at the end
Tools / tool callsSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
Structured outputresponse_format: {"type": "json_object"}
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Requests per minute300/min per key
Parallel requestsup to 8 in parallel per key
Request size8 MB request body
Bonus credit+5% on $50+, +10% on $100+, +15% on $200+
Subscriptionpaid credit never expires, no subscription
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Paymentcrypto: 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 payprepaid credit, charged by real token usage; errors and refusals are free
Sign-insign in with Google or with e-mail + password
Key managementone active key per account; a new key replaces the old one
Contentadult 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.

CodeTypeMeaning
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
402no_creditbalance is empty — top up, requests resume at once
403content_blockedsexual content involving minors — refused, not billed
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busytemporary 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.