中文 ▾

Dolphin 无限制 LLM API 文档

获取您的无审查 LLM API 密钥,并立即开始向我们的 OpenAI 兼容端点发送请求。

https://api.dolphinuncensoredllm.com/v1uncensored

认证和基础 URL

您的 API 密钥对所有请求进行身份验证,我们的托管基础设施。在使用 Google 或电子邮件密码登录后,您可以在“获取 API 密钥”页面找到此密钥。请妥善保管此字符串,因为它授予对您预付费额度的完全访问权限。

将您的 SDK 或 HTTP 客户端指向我们的基础 URL。您用此地址替换默认的 OpenAI 端点,以确保您的调用路由到我们的无审查模型。

https://api.dolphinuncensoredllm.com/v1

聊天补全端点

向聊天补全端点发送提示以获取文本输出。此标准端点接受您的系统指令和用户消息。您必须在每个请求中将模型 ID 指定为 uncensored。

以下是使用 curl 命令的基本请求:

curl -X POST https://api.dolphinuncensoredllm.com/v1/chat/completions \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "uncensored", "messages": [{"role": "user", "content": "Tell me a dark story."}], "max_tokens": 500 }'

Python SDK 集成

使用官方 OpenAI Python 库与我们的 API 交互。使用您的 base URL 和 API 密钥初始化客户端。这使您可以使用熟悉的方法,如 chat.completions.create。

以下代码演示了简单的文本生成请求:

import openai client = openai.OpenAI( base_url="https://api.dolphinuncensoredllm.com/v1", api_key="YOUR_API_KEY" ) response = client.chat.completions.create( model="uncensored", messages=[{"role": "user", "content": "Explain quantum computing."}], max_tokens=1024 )

Node.js 客户端设置

安装 OpenAI npm 包并将其配置为使用我们的基础 URL。这确保你的 Node.js 应用将请求发送到正确的 uncensored 模型。

使用您的凭据初始化客户端并发送消息:

import OpenAI from 'openai'; const client = new OpenAI({ baseURL: 'https://api.dolphinuncensoredllm.com/v1', apiKey: 'YOUR_API_KEY' }); const response = await client.chat.completions.create({ model: 'uncensored', messages: [{ role: 'user', content: 'Write code for a scraper.' }] });

流式响应与 Token 计数

通过设置 stream 参数为 true 启用流式传输。这将逐步返回 token,改善长输出的感知延迟。流中的最后一个数据块包含完整的 token 使用统计信息。

这种方法非常适合实时界面:

const stream = await client.chat.completions.create({ model: 'uncensored', messages: [{ role: 'user', content: 'Write a long poem.' }], stream: true }); for await (const chunk of stream) { process.stdout.write(chunk.choices[0]?.delta?.content || ''); }

错误代码和速率限制

当出现问题时,您将遇到特定的 HTTP 状态码。401 错误表示您的 API 密钥无效或缺失。402 错误表示您的预付费余额不足以支付请求。

速率限制可保护基础设施。您每个密钥每分钟允许 300 个请求。如果超出此限制,您将收到 429 Too Many Requests 错误。您还可以同时发送 8 个请求。您的上下文窗口总计为 100,000 个 token(包含提示和补全)。

cURL

curl https://api.dolphinuncensoredllm.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Summit the meeting notes to bullet points"}]
  }'

Python

from openai import OpenAI

client = OpenAI(base_url="https://api.dolphinuncensoredllm.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.dolphinuncensoredllm.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);

流式传输

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)

常见问题

我如何对请求进行身份验证?

将 API 密钥包含在 Authorization 请求头中,格式为 Bearer token。您在使用 Google 或邮箱登录后在仪表板生成此密钥。请妥善保管该密钥,因为它控制着您的预存余额。

上下文窗口大小是多少?

该模型支持 100,000 token 的上下文窗口。此限制适用于输入提示词和生成输出的总和。超过此限制将导致错误。

如果我触及速率限制会怎样?

如果您每分钟请求超过 300 次,将收到 429 状态码。您最多可同时运行 8 个并发请求。等待几秒后再重试,以避免进一步限流。

获取您的 API 密钥

注册,复制密钥,更新基础 URL。仅此而已。

获取您的密钥