中文 ▾
立即开始
立即开始

快速入门:无审查 API 指南

使用标准的 base URL 和 API 密钥,在几分钟内将您现有的 OpenAI 兼容客户端连接到我们的无审查 LLM API。本指南涵盖 essential 端点、流式传输和工具集成,以实现直接模型访问。

认证设置

在 获取 API 密钥 页面。您可以使用 Google 登录或使用电子邮件和密码;无需手机号码。您的密钥立即显示。将其用于 Authorization 用于所有请求的 header。每个账户允许一个活跃密钥。新密钥会立即替换旧密钥。

POST /v1/chat/completions

向聊天补全端点发送文本请求。基础 URL 为 HTTPS://api.proxyclaudecode.com/v1。使用模型 ID "uncensored" 进行直接访问。此端点处理文本输入和输出。它不支持嵌入、图像或微调。您可以调整 temperature 和 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 密钥

注册,获取密钥,并更新您的基础 URL。配置简单。