인증 설정
에서 키를 생성하세요. 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)