前提条件:SDKとキー
メールアドレスまたはGoogleサインインのみでアカウントを作成してください。このキーは、非制限AIチャットボットエンドポイントへのすべてのリクエストを認証します。新しいキーはいつでも生成でき、古いキーと置き換えられます。前払いクレジットへのフルアクセスを提供するため、安全に保管してください。
ベースURL構成
クライアントをHTTPS://api.unfilteredchatbotapi.com/v1に設定してください。このベースURLは標準的なOpenAI互換SDKと互換性があります。また、AuthorizationヘッダーにAPIキーを設定する必要があります。システムは認証にBearerトークン形式を期待します。この単一エンドポイントは、他のベンダーにルーティングすることなく無制限モデルを提供します。コード内のモデル名を変更する必要はありません。固定されています。
最初のリクエストを送信する
メッセージを指定して /v1/chat/completions へ POST リクエストを送信します。モデル ID は常に "uncensored" です。messages 配列に role と content フィールドを含むコンテンツを送信します。API は標準的な安全拒否なしでテキスト応答を返します。接続と応答品質を確認するには、この単純な構造を使用してください。ペイロードは 8 MB 以下に保ってください。処理中のエラーはクレジットを消費しません。
cURL
curl https://api.unfilteredchatbotapi.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "What is the capital of France?"}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.unfilteredchatbotapi.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.unfilteredchatbotapi.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)