无限制 GPT API 文档
通过发送简单的请求开始使用无审查 GPT API。本指南涵盖身份验证、SDK 集成、流式传输和错误处理,以便立即使用。
基础 URL 和认证
使用官方基地址和您的 API 密钥进行连接。端点为 https://api.uncencoredgpt.com/v1。将您的密钥放在 Authorization 头部。此设置兼容任何 OpenAI 兼容客户端。
- 关键格式:
Bearer sk-... - 无订阅费。
curl https://api.uncencoredgpt.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List the top five open source models."}]
}'
首次聊天请求
发送提示并获取响应。使用模型 ID uncensored. API 接受标准的聊天完成参数。响应仅包含文本。
from openai import OpenAI
client = OpenAI(base_url="https://api.uncencoredgpt.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 集成
轻松将 JavaScript 项目集成。设置基础 URL 和模型 ID。SDK 会自动处理序列化。
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncencoredgpt.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: 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)
参数:温度和 Top-P
使用 temperature 和 top_p. 较高的值会增加创造性。较低的值提高确定性。使用 seed 用于获得可复现的输出。调整这些参数以符合您的使用场景。
限制、错误和上下文
注意速率限制和上下文窗口。上下文窗口总计为100,000个Token。错误包括无效密钥的401和速率限制的429。拒绝响应免费。
常见问题
这是无审查的 GPT 模型吗?
不,它是一个开放权重的无审查模型。它不是 GPT、Claude 或其他厂商的模型。它接受相同的 API 格式。
如何支付?
使用加密货币支付。仅限 USDT (TRC20) 或 USDC (Base)。最低充值 $20。余额永不过期。
什么是上下文窗口?
上下文窗口为 100,000 个 token。这包括提示词和补全。每次请求最大输出为 16,000 个 token。
获取您的 API 密钥
注册,复制密钥,更新基础 URL。这是所需的全部设置。