Base URL and Authentication
Our API is designed as a drop-in replacement for standard OpenAI integrations. You do not need a new SDK or a complex configuration file. Simply update the base_url in your client to point to our endpoint and provide your API key in the standard Authorization header.
Sign up for a free account to receive your key immediately. There is no card required for the trial credit, making it easy to verify connectivity. The base URL for all requests is https://api.dolphinllm.com/v1. This ensures that any tool, library, or application already configured for OpenAI can route traffic to our uncensored ai model with minimal friction.
- Base URL:
https://api.dolphinllm.com/v1 - Auth Header:
Authorization: Bearer YOUR_API_KEY - Model ID:
uncensored
First Request
Test your connection with a simple chat completion request. This confirms that your key is valid and the endpoint is responsive. The request body follows the standard OpenAI chat completions schema. Replace YOUR_API_KEY with your actual key.
- Method: POST
- Endpoint:
/v1/chat/completions - Model:
uncensored
This endpoint supports streaming and tool calling, but this basic request demonstrates the core text-in, text-out capability. If you receive a response, your client is successfully connected to the dolphin llm service.
curl https://api.dolphinllm.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
Use the official openai Python library to interact with the API. Configure the client with the custom base URL and your API key. This approach works with any code already written for OpenAI, allowing you to switch providers without rewriting your logic.
The model ID is uncensored. Ensure you pass the correct arguments for the conversation history. This method is ideal for developers building applications that require unrestricted text generation without local GPU constraints.
from openai import OpenAI
client = OpenAI(base_url="https://api.dolphinllm.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 SDK
For Node.js applications, the openai npm package handles the integration. Set the baseURL to our endpoint and provide your key. This ensures compatibility with existing Node.js projects that rely on OpenAI's structure.
The API supports standard parameters like max_tokens and temperature. Adjust these to control the creativity and length of the output. This uncensored coding llm is particularly useful for generating code snippets or technical documentation without content filters interfering with the output.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.dolphinllm.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 (SSE)
Enable streaming by setting the stream parameter to true in your request body. The API returns Server-Sent Events (SSE), allowing you to process tokens as they are generated. This reduces perceived latency for end-users.
Parse the SSE stream to handle partial responses. This is essential for chat interfaces where instant feedback is expected. The stream includes standard OpenAI event types, making it compatible with most SSE parsers.
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)
Rate Limits and Constraints
Understand the constraints to avoid errors in your application. The API enforces a limit of 300 requests per minute per key. The request body size is capped at 8 MB. If you exceed these limits, you will receive a 429 error.
Authentication errors return 401 if the key is invalid. Payment errors return 402 if you have insufficient credit. The context window is 100,000 tokens for both prompt and completion combined. Ensure your inputs fit within this limit to avoid truncation.