繁中 ▾
OpenAI 相容伺服器無審查 LLM API,預付加密貨幣取得您的金鑰
每 1M 輸入權杖
$0.15
輸出 token / 1M
$0.50
權杖上下文
100,000
試用額度
$0.50
每分鐘請求數
300
openaicompatibleserver.com

整合無審查 LLM API

將此無審查 LLM API 放入現有工作流程。它的運作方式與 OpenAI API 完全相同,但移除了內容篩選器。

https://api.openaicompatibleserver.com/v1無審查

設定您的基礎 URL 和 API 金鑰

將您的客戶端指向我們的特定端點。使用 https://api.openaicompatibleserver.com/v1 作為您的基礎 URL。透過儀表板產生金鑰。該金鑰用於驗證所有請求。

傳送您的第一個聊天補全

POST 至聊天完成端點。傳送提示詞並接收文字。模型 ID 為 uncensored. 它處理高達 100,000 token 的上下文。

啟用串流並獲取即時令牌

設定 stream: true 在你的請求中。接收伺服器發送的事件。Token 使用量顯示在最後一個區塊中。這降低了長輸出時的感知延遲。

使用函式呼叫與 JSON 模式

在請求主體中傳遞 tools。模型遵循嚴格的 JSON schema。設定 response_format 以 {"type": "json_object"} 用於可靠解析。這確保了應用程式的結構化資料。

處理錯誤與使用量限制

檢查 HTTP 狀態碼以排查問題。401 表示您的金鑰無效。402 表示額度不足。429 表示觸及速率限制。您每分鐘可發送 300 次請求。100k 上下文視窗包含提示詞與補全內容。

與 OpenAI 相容的伺服器客戶端進行整合

在任何 SDK 中替換您的基礎 URL。使用相同的 Python 或 Node 庫。協議保持相同。這適用於 Cline 或 Roo Code 等工具。無需重寫程式碼即可切換後端。

cURL

curl https://api.openaicompatibleserver.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Set the server timeout to 30 seconds"}]
  }'

Python

from openai import OpenAI

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

常見問題

這是 OpenAI API 的即插即用替代品嗎?

是的。它使用相同的端點和請求結構。更改您的 base URL 和 API 金鑰。保留您現有的客戶端程式碼。

預付加密貨幣計費是如何運作的?

您使用 USDT 或 USDC 付費。信用額永不過期。錯誤和拒絕不消耗 Token。這使您的成本保持可預測。

上下文視窗的大小是多少?

總 token 上限為 100,000。這包含您的輸入與模型輸出。每次請求的最大輸出為 16,000 token。

保護您的 API 金鑰

註冊、取得金鑰,並更新您的基礎 URL。就這些。

取得您的金鑰