API 文件
幾分鐘內即可使用標準 OpenAI 相容程式碼,透過我們的開放權重 LLM 開始生成無過濾內容。
身份驗證與基礎 URL
使用您的唯一 API 金鑰搭配基礎 URL https://api.unfilteredaichatgpt.com/v1 用於驗證請求。你的密鑰在通過 Google 或電子郵件註冊後立即生成。
- 在
Authorization作為 Bearer token 標頭。 - 無需訂閱;額度按 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 用量數據包含在最後一個數據塊中。這可降低長輸出的感知延遲。
速率限制與配額
每分鐘限 300 次請求,每個金鑰限 8 個並行請求。
請求主體不得超過 8 MB。401(無效金鑰)或 402(無信用額度)等錯誤會立即返回,且不消耗信用額度。
常見問題
這是官方的 ChatGPT API 嗎?
否。我們運行自己的開放權重無審查 LLM。它與 OpenAI SDK 相容,但不是 GPT。
模型支援多少上下文?
該模型支援 100,000 token 的上下文視窗,用於輸入與輸出的總和。
如果我觸及速率限制會發生什麼事?
您將收到 429 錯誤。等待後再重試,或如有可用選項,請升級您的帳戶。
立即取得您的金鑰
註冊、取得金鑰,更新基礎 URL。涵蓋了整個設定。