Prerequisites and Configuration
To use our openai api proxy, you need the official SDK for your language and a valid API key. Sign up on the dashboard to receive your key immediately. You do not need a credit card for the trial. Set two environment variables: OPENAI_API_KEY with your key, and OPENAI_BASE_URL pointing to our endpoint. This approach ensures your existing code works without modification, acting as a transparent llm proxy for your applications.
Our service uses the standard uncensored model ID. Because we are a single-model proxy, you do not need to manage complex routing logic. The base URL is https://api.openaiapiproxy.com/v1. Once configured, your client treats our service exactly like any other OpenAI-compatible endpoint.
First Request and Python Setup
Start by sending a simple chat completion request. This confirms your authentication and connectivity. The following example uses a basic text prompt to verify the uncensored behavior. Replace the placeholder values with your actual credentials.
For Python developers, the official openai library handles the complexity. You simply point the client to our base URL. The code below demonstrates a standard synchronous request. It sends a prompt and returns the model's response. This is the fastest way to verify your integration.
Ensure your environment variables are loaded before creating the client instance. The SDK automatically uses the standard OpenAI format for requests and responses.
Node.js Integration
If you are building with Node.js, the process is identical to Python. Use the @ai-sdk/openai or the official openai npm package. Point the client to our base URL and provide your API key. The SDK handles the JSON serialization and HTTP requests for you.
This setup works with any OpenAI-compatible client library. You can reuse your existing prompt templates and message structures. The response format matches the standard OpenAI schema, making it easy to swap between providers if needed later.
Remember to handle errors gracefully. Network issues or invalid keys will return standard HTTP error codes. Check the documentation for your specific SDK version for detailed error handling.
Streaming Responses
For real-time applications, enable streaming to receive tokens as they are generated. This reduces perceived latency for end-users. The SDK supports Server-Sent Events (SSE) natively. You iterate over the response stream to process each token.
Streaming is ideal for chat interfaces where users expect immediate feedback. The model generates text continuously, and you can append each token to the UI. This provides a smoother user experience compared to waiting for the full response.
The streaming endpoint uses the same base URL and authentication. You only need to enable the stream flag in your request parameters. The SDK handles the connection lifecycle and error recovery.
Rate Limits and Constraints
Our API enforces strict limits to ensure reliability. You are allowed 300 requests per minute per API key. The maximum request body size is 8 MB. If you exceed the rate limit, you will receive a 429 status code. Implement exponential backoff in your client to handle these errors gracefully.
Authentication errors return a 401 status if the key is invalid or revoked. Payment issues return a 402 status when your prepaid credit is exhausted. Top-ups are available instantly via crypto (USDT or USDC). Your prepaid credit never expires, so you can pay as you go.
The context window is 64,000 tokens for both input and output combined. Plan your prompts accordingly to avoid truncation. The model will stop generating if it reaches the limit.
Models and Content Policy
The only model available is uncensored, an open-weight model optimized for lawful adult content and creative writing. It does not refuse controversial or explicit topics by default. This makes it ideal for use cases where standard models might be too restrictive.
We do not offer embeddings, image generation, or audio processing. This is a text-only API. The model is not GPT, Claude, or any other vendor's model. It is tuned specifically for our infrastructure.
Sexual content involving minors is always blocked. All other lawful content is permitted. We do not use your prompts for training. Your data remains private and is only used to generate the response for your request.
cURL
curl https://api.openaiapiproxy.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
from openai import OpenAI
client = OpenAI(base_url="https://api.openaiapiproxy.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
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.openaiapiproxy.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
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)