ja ▾
今すぐ開始
今すぐ開始

クイックスタート:Uncensored APIガイド

標準的なベースURLとAPIキーを使用して、既存のOpenAI互換クライアントを数分で当社の無制限LLM APIに接続します。このガイドでは、必須のエンドポイント、ストリーミング、ツール統合について解説し、モデルへの直接アクセスを支援します。

認証の設定

からキーを生成することから始めましょう。 APIキーを取得 ページ。Googleでサインインするか、メールとパスワードを使用できます。電話番号は必要ありません。キーは即座に表示されます。 Authorization ヘッダーをすべてのリクエストに使用します。アカウントごとに1つのアクティブなキーが許可されています。新しいキーは古いキーを即座に置き換えます。

POST /v1/chat/completions

チャット完了エンドポイントにテキストリクエストを送信します。ベースURLは HTTPS://api.proxyclaudecode.com/v1 です。直接アクセスにはモデルID「uncensored」を使用してください。このエンドポイントはテキストの入力と出力を処理します。埋め込み、画像、ファインチューニングはサポートしていません。温度やtop_pなどのパラメータを調整できます。エラーや拒否はクレジットを消費しません。

cURL

curl https://api.proxyclaudecode.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Parse this CSV and return JSON"}]
  }'

Python

from openai import OpenAI

client = OpenAI(base_url="https://api.proxyclaudecode.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.proxyclaudecode.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キーを安全にする

登録し、APIキーを取得し、ベースURLを更新します。シンプルな設定。