Dolphin API Quickstart Guide
Dolphin API Quickstart Guide
Authentication: Bearer Tokens
Authentication requires a Bearer token sent in the Authorization header.
Get your key from the dashboard or use the trial credit. Every request must include this header to prove identity.
Keep the key secure. Share it only with trusted services.
The /v1/chat/completions Endpoint
This endpoint processes text input and returns text output.
Send requests to https://api.whatisdolphin.com/v1 with your model ID and messages.
Use this structure for basic interactions.
Streaming Responses with SSE
Streaming allows real-time token delivery via Server-Sent Events.
Set stream to true in your request payload.
Parse the chunks as they arrive to build a continuous output.
Function Calling and JSON Mode
Function calling lets models execute tools based on your instructions.
Use JSON mode to enforce strict schema compliance for structured data.
Define tools in the request to guide the model's behavior.
Context Window and Token Limits
The context window supports 100,000 tokens total.
Output limits vary: set max_tokens for control, otherwise default to 2,048 tokens.
Manage input length to stay within bounds for optimal performance.
Rate Limits and Error Handling
Rate limits allow 300 requests per minute per key.
Handle 401 errors for invalid keys and 429 for rate limits.
Monitor usage to avoid service interruptions during high volume.
cURL
curl https://api.whatisdolphin.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Define what a dolphin is in two lines."}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.whatisdolphin.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.whatisdolphin.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)Frequently asked questions
What is the cost per token?
Input tokens cost $0.15 per 1M tokens. Output tokens cost $0.50 per 1M tokens. Prepaid credit is charged by actual usage.
How do I top up my credit?
Top up using crypto only. Accepted methods are USDT (TRC20) or USDC (Base). Minimum amount is $20.
What happens if I exceed the rate limit?
You receive a 429 Too Many Requests error. Wait before retrying or reduce your request frequency to stay within the 300 requests per minute limit.
Get your API key in one step
Register, copy the key, update the base URL. That is the entire configuration.