th ▾
bestuncensoredmodel.comAPI ที่เข้ากันได้กับ OpenAI สำหรับการสร้างเนื้อหาแบบไม่เซ็นเซอร์

Uncensored ai API เอกสาร

ผสานรวมโมเดล uncensored ที่ดีที่สุดของเราเข้ากับแอปพลิเคชันของคุณโดยใช้ API ที่เข้ากันได้กับ OpenAI ที่คุ้นเคย ส่งคำขอ chat completions มาตรฐานและรับข้อความตอบกลับแบบไร้ข้อจำกัดโดยไม่มีการปฏิเสธสำหรับเนื้อหาผู้ใหญ่ที่ถูกต้องตามกฎหมาย

การตรวจสอบสิทธิ์และ Base URL

เริ่มต้นด้วยการสร้าง API key ของคุณบนแดชบอร์ด base URL คือ https://api.bestuncensoredmodel.com/v1. ส่งคีย์ของคุณใน Authorization header สำหรับการร้องขอทุกชิ้น การตั้งค่านี้ทำงานกับไลบรารีไคลเอนต์ที่เข้ากันได้กับ OpenAI มาตรฐานใดๆ รับคีย์ของคุณได้ทันทีผ่าน Google หรืออีเมล

จุดจบ API Chat Completions

ส่งข้อความไปยัง /v1/chat/completions endpoint. endpoint. ID ของโมเดลคือ uncensored. มันรับโครงสร้างข้อความมาตรฐานที่มีฟิลด์ role และ content คำขอจะถูกประมวลผลโดยตรงโดยไม่ผ่านผู้ขายรายอื่น ใช้สำหรับงานการสร้างข้อความที่ต้องการการกรองน้อยที่สุด

curl https://api.bestuncensoredmodel.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "explain memory allocation in C"}]
  }'

การตอบกลับแบบสตรีมมิ่งและโทเค็น

เปิดใช้งานการสตรีมโดยตั้งค่า stream: true.คุณได้รับ Server-Sent Events (SSE) สำหรับการส่งมอบ tokens แบบเรียลไทม์ รายละเอียดการใช้งาน tokens จะปรากฏใน chunk สุดท้ายของสตรีม วิธีการนี้ช่วยลดความล่าช้าที่รับรู้ได้สำหรับ output ยาว การสตรีมได้รับการสนับสนุนอย่างเต็มที่ผ่าน SDK ทางการ

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)

Python

from openai import OpenAI

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

ดึงข้อมูล your API key

สมัคร คัดลอกคีย์ อัปเดต URL พื้นฐานของคุณ นั่นคือทั้งหมด