Claude api price: API documentation
開始使用我們的無審查 API,向我們的 OpenAI 相容端點發送請求。您僅為使用的 token 付費,因此可以快速整合而無需管理訂閱。
驗證與 API 金鑰
透過 Google 或電子郵件立即生成您的金鑰。將它放入 Authorization 標頭以存取 https://api.claudeapiprice.com/v1.
聊天完成端點
將文字傳送至以獲取文字回覆。我們的模型支援高達 100,000 個 token 的上下文視窗。使用標準的聊天格式即可接收回覆。
curl https://api.claudeapiprice.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List the current pricing for each model tier"}]
}'
串流回應與 token 用量
啟用串流以獲得低延遲輸出。Token 用量詳細資訊出現在串流的最後一個區塊中,確保您能即時準確地追蹤成本。
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)
函式呼叫與工具
定義工具以讓模型執行動作。使用 tool_choice 用於嚴格模式或 auto 用於自動選擇。這使得複雜工作流程無需手動解析即可實現。
from openai import OpenAI
client = OpenAI(base_url="https://api.claudeapiprice.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)
JSON 模式與參數
使用 response_format. 調整 temperature 或 top_p 控制創造力。這確保了程式碼生成或資料擷取任務的結果一致性。
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.claudeapiprice.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);
速率限制與配額
您每個金鑰每分鐘可獲得 300 次請求。401(金鑰無效)或 402(無信用額度)等錯誤不會消耗 token。請透過等待後重試來處理 429 錯誤。
01
常見問題
此無審查模型的 claude API 價格是多少?
我們收取每 1M 輸入 token $0.15 和每 1M 輸出 token $0.50。錯誤和拒絕免費,因此您只需為實際 token 用量付費。
我如何為信用額度付款?
透過加密貨幣使用 USDT (TRC20) 或 USDC (Base) 充值。您可以存入 $20 至 $500 之間的任意整數金額。
這是官方的 Claude API 嗎?
不,我們是一家獨立服務商,運行無審查的開放權重模型。我們與 OpenAI SDK 相容,但不提供官方的 Anthropic 模型。
取得您的 API 金鑰
註冊、取得你的金鑰,並將你的客戶端指向新的基礎 URL。就是這些。