Get API key

One API: Quickstart Guide

Integrate our uncensored LLM API with a single configuration change. Drop-in compatibility means you swap the base URL and API key, then keep your existing code.

Base URL & Authentication

Start by pointing your client to our dedicated endpoint. This openai compatible api uses standard authentication headers, so you only need to change two values in your configuration.

The base URL is https://api.onekeyllmapi.com/v1. Generate your unique API key on the signup page. No card is required to start, and the key is shown immediately upon registration. Keep this key secure; it authenticates all requests to the service.

Basic Completion

Send a simple text prompt to receive a direct response. This is the core of our ai api for developers offering. The model returns text without content refusals for lawful adult use, making it ideal for creative or unrestricted tasks.

  • Model ID: uncensored
  • Endpoint: POST /v1/chat/completions
  • Context: 64,000 tokens

Make your first request with this example:

curl https://api.onekeyllmapi.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."}]
  }'

Python SDK Integration

Use the official OpenAI Python library to interact with our service. The only changes needed are the base_url and api_key. This ensures your existing logic works without modification.

  • Install via pip install openai
  • Set environment variables or pass directly in the client init
  • Call chat.completions.create() as usual

Configure the client like this:

from openai import OpenAI

client = OpenAI(base_url="https://api.onekeyllmapi.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 SDK Usage

Integrate with JavaScript or TypeScript projects using the standard OpenAI Node package. Point the client to our URL and provide your key. This approach maintains compatibility with any OpenAI-compatible client structure.

  • Install via npm install openai
  • Initialize with custom base URL
  • Use standard async/await patterns

Example initialization:

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.onekeyllmapi.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);

Streaming Responses

Receive responses token-by-token for lower perceived latency. Our streaming api supports Server-Sent Events (SSE), allowing you to display output as it generates. This is useful for chat interfaces or real-time applications.

  • Set stream: true in your request
  • Parse the SSE stream on the client
  • Handle partial tokens efficiently

Enable streaming in your code:

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)

Limits, Errors & Context

Understand the constraints to build robust integrations. The API supports a 64k context api window, allowing long documents or conversations. Requests are limited to 8 MB body size.

Common errors include 401 for invalid keys, 402 when prepaid credit is exhausted, and 429 for exceeding 300 requests per minute. Pay-as-you-go credit never expires, and you can top up from $10. Tool calling is supported for function execution.

Capabilities and limits

Everything the endpoint can and cannot do, in one place — check it before you top up.

SpecValue
CompatibilityOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
Model IDuncensored
Base URLhttps://api.onekeyllmapi.com/v1
AuthenticationBearer token in the Authorization header
EndpointsPOST /v1/chat/completions · GET /v1/models
Context window64,000 tokens, input and output combined
Function callingSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Structured outputJSON object mode via response_format json_object
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
SSE streamingYes — server-sent events; the last chunk carries token usage
Max output16,000 tokens max; 2,048 if max_tokens is not set
Request sizeup to 8 MB per request
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Requests per minute300/min per key
Parallel requests8 requests at the same time per key
Top-upcrypto: USDT on TRON or USDC on Base, $10–$500, any whole sum
Billingpay as you go from prepaid credit; nothing is charged for failed or refused requests
Subscriptionno monthly fee; paid credit does not expire
Bonus credit+5% from $50, +10% from $100
Price$0.25 per 1M input tokens · $1.00 per 1M output tokens
Trial credit$0.50 of credit valid 7 days, no card needed
Keysone active key per account; a new key replaces the old one
Sign-insign in with Google or with e-mail + password
Content policyuncensored for adults; the only hard rule: no sexual content involving minors

HTTP errors

Errors come back as JSON with a stable type; failed and refused requests are not billed.

CodeTypeMeaning
400bad_requestinvalid JSON, empty messages, bad parameter, or prompt + max_tokens over the window — fix and resend
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_foundunknown endpoint
413request_too_largebody over 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busytemporary overload, retry shortly

Questions and answers

Is this an OpenAI model?

No. We serve a single, dedicated uncensored large language model run on our own GPU servers. It is not GPT, Claude, or any other vendor's model, but it is compatible with their API structure.

How does pricing work?

We use a pay-as-you-go model with no monthly fees. Input tokens cost $0.25 per 1M, and output tokens cost $1.00 per 1M. Prepaid credit never expires, and you can start with a $0.50 trial credit.

What is the context window size?

The API supports a 64,000 token context window for both prompt and completion. This allows for extensive conversations or long document processing within a single request.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.