API 文档
在几分钟内使用标准的兼容 OpenAI 的代码开始使用我们的开放权重 LLM 生成无过滤内容。
认证和基础 URL
使用您的唯一 API 密钥配合基础 URL https://api.unfilteredaichatgpt.com/v1 用于验证请求。你的密钥在通过 Google 或电子邮件注册后立即生成。
- 在
Authorization页眉作为 Bearer 令牌。 - 无需订阅;积分按 token 扣除。
curl https://api.unfilteredaichatgpt.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List available api endpoints and rate limits"}]
}'
POST /v1/chat/completions
将提示发送到 /v1/chat/completions 用于接收文本响应的端点。模型 ID 始终为 uncensored.
from openai import OpenAI
client = OpenAI(base_url="https://api.unfilteredaichatgpt.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)该端点接受标准的聊天消息。它不支持嵌入、图像或音频。
GET /v1/models
查询 /v1/models 验证可用模型。您将看到 uncensored 模型已列出。
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.unfilteredaichatgpt.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);该端点确认您的连接处于活动状态且身份验证正确。
参数:温度、Top P 和工具
使用 temperature 和 top_p. 使用 tools 用于函数调用。
设置 response_format 到 {"type": "json_object"} 用于结构化输出。模型会忽略对合法成人内容的过滤。
流式响应(SSE)
通过将 stream: true. 通过服务器发送事件接收数据块。
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)Token 用量数据包含在最后一个 chunk 中。这降低了长输出时的感知延迟。
速率限制与配额
每个密钥限制为每分钟 300 次请求和 8 个并发请求。
请求体不得超过 8 MB。401(密钥无效)或 402(无余额)等错误会立即返回,且不消耗余额。
常见问题
这是官方的 ChatGPT API 吗?
不。我们运行自己的开源无审查大语言模型。它与 OpenAI SDK 兼容,但不是 GPT。
模型支持多少上下文?
该模型支持 100,000 token 的上下文窗口,用于输入和输出的总和。
如果我触及速率限制会怎样?
您将收到 429 错误。等待后再重试,或者如果可用,请升级您的账户。
即时获取您的密钥
注册,获取密钥,更新基础 URL。这涵盖了整个配置。