ja ▾
キーを作成

APIドキュメント: uncensoredチャット補完

OpenAI互換のクライアントを組み込み、当社の無制限モデルで即座にテキスト生成を開始します。標準的なパラメータを受け付け、法的な成人向けトピックに対するコンテンツ拒否を除去する専用エンドポイントを提供します。

認証 & ベースURL

すべてのリクエストには、 Authorization ヘッダー。当社のベースURLは https://api.deepseekopenaicompatibleapi.com/v1Googleまたはメール経由でサインアップすると、このキーを即座に受け取ります。電話番号は必要ありません。このキーはアカウントを識別し、プリペイドクレジットの使用を追跡します。エラーや拒否はトークンを消費しないため、成功した補完に対してのみ課金されます。

チャット完了エンドポイント

メッセージを送信 POST /v1/chat/completions テキストレスポンスを生成します。モデルIDは常に uncensored. このエンドポイントはsystem、user、assistantのロールを持つ標準的なチャット形式を処理します。埋め込み、画像、ファインチューニングはサポートしていません。リクエストを希望するモデルパラメータとコンテンツで構成します。応答には生成されたテキストとトークン使用統計が含まれます。

ストリーミングレスポンス(SSE)

streamをtrueに設定してストリーミングを有効にする stream: true リクエストボディに記述します。サーバーはリアルタイムのトークン配信のためにServer-Sent Events (SSE)を返します。トークン使用データはストリームの最終チャンクにのみ表示されます。このアプローチは、長い出力に対する知覚されるレイテンシを削減します。クライアント側で到着したイベントをバッファリングして、完全なメッセージを再構築してください。

cURL

curl https://api.deepseekopenaicompatibleapi.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Summarize the release notes of the last stable build"}]
  }'

Python

from openai import OpenAI

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

APIキーを取得

サインアップしてキーを取得し、ベースURLを更新するだけ。これだけです。

キーを作成