API 文件
使用標準 OpenAI SDK 開始使用我們的開放權重無審查模型生成文本。配置您的基礎 URL 和金鑰,以繞過內容過濾器,供合法成人用途使用。
身份驗證與基礎 URL
使用您的 API 金鑰搭配基礎 URL https://api.gptunrestricted.com/v1。將金鑰傳入 Authorization header 作為 bearer token。此設定適用於任何 OpenAI 相容用戶端,只需更改 base_url 以及金鑰。
- 透過 Google 或電子郵件註冊,即可立即獲得您的金鑰。
- 每個帳戶僅限一個有效金鑰;新金鑰將取代舊金鑰。
首次請求
向以下網址發送 POST 請求 /v1/chat/completions 使用模型 uncensored. 包含您的訊息並接收文字輸出。錯誤與拒絕回傳均免費。
curl https://api.gptunrestricted.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Generate a list of top ten coffee shops near me"}]
}'
Python SDK 集成
安裝 OpenAI 套件並設定環境變數 OPENAI_BASE_URL. 使用您的 API 金鑰與模型初始化客戶端。這確保了長文本生成的一致性效能。
from openai import OpenAI
client = OpenAI(base_url="https://api.gptunrestricted.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 SDK 用法
使用 openai npm 套件。在建構子中設定基礎 URL 與 API 金鑰。使用以下方式請求補全: uncensored 模型 ID。
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.gptunrestricted.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. 接收伺服器發送的事件 (SSE) 以獲取即時 token 輸出。token 使用詳情出現在最後一個區塊。
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)
速率限制與錯誤
限制為每個密鑰每分鐘 300 次請求。最大並發請求:8。請求主體最大值:8 MB。錯誤包括:無效密鑰的 401,無信用額度的 402,以及速率限制的 429。上下文窗口總計為 100,000 token。
常見問題
無限制 GPT 模型為何?
這是一款經過調校可在合法成人用途方面無拒絕地回答的開放權重模型。它不是 GPT、Claude 或任何其他廠商的模型。
您接受哪些付款方式?
僅限加密貨幣:TRC20 上的 USDT 或 Base 上的 USDC,任何整數金額從 $20 到 $500。從 $50 起享有額外餘額獎勵。
速率限制為何?
每金鑰每分鐘 300 次請求,上下文窗口為 100,000 令牌。
取得您的 API 金鑰
註冊、複製金鑰,更新基礎網址。這是所需的全部。