Claude Code 指南
設定 Flaq AI Claude 模型並探索 Claude Code 技能
Claude Opus 4.6 API 支援穩定且實惠的深度檔案推理、PDF 審閱、合約分析、報告摘要與資料問答,適合合規審查、研究整理、風險識別與專業生產工作流程。適合開發者與團隊接入智慧問答、文字分析、摘要、寫作與自動化任務。可用於從免費測試到正式部署的工作流程,在回應品質、穩定性與成本效率之間取得平衡。協助快速驗證模型能力,並延伸到客服、知識庫、研究與辦公場景。
const response = await fetch('https://api.flaq.ai/api/v1/chat/completions', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
Accept: 'text/event-stream',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'claude-opus-4.6-file-analysis',
messages: [
{
role: 'user',
content: [
{ type: 'text', text: 'Summarize this file and extract the key risks.' },
{
type: 'file',
file: {
filename: 'demo.pdf',
file_data: 'https://example.com/demo.pdf'
}
}
]
}
],
stream: true,
max_tokens: 4096,
top_p: 0.5,
top_k: 50
})
});
const reader = response.body.getReader();
const decoder = new TextDecoder();
let buffer = '';
let assistantText = '';
while (true) {
const { done, value } = await reader.read();
if (done) break;
buffer += decoder.decode(value, { stream: true });
const frames = buffer.split('\n\n');
buffer = frames.pop() || '';
for (const frame of frames) {
const lines = frame.split('\n').filter(Boolean);
let eventName = 'message';
const dataLines = [];
for (const line of lines) {
if (line.startsWith('event:')) {
eventName = line.slice(6).trim();
} else if (line.startsWith('data:')) {
dataLines.push(line.replace(/^data:\s*/, ''));
}
}
const raw = dataLines.join('\n').trim();
if (raw === '[DONE]') {
console.log('\nFinal text:', assistantText);
continue;
}
let payload;
try {
payload = JSON.parse(raw);
} catch {
continue;
}
if (eventName === 'error' || payload.error) {
const msg = payload.error?.message ?? payload.message ?? 'Chat request failed';
throw new Error(msg);
}
const delta = payload.choices?.[0]?.delta;
if (delta?.content) {
assistantText += delta.content;
console.log(assistantText);
}
}
}
import json
import requests
response = requests.post(
'https://api.flaq.ai/api/v1/chat/completions',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'text/event-stream',
'Content-Type': 'application/json',
},
json={
'model': 'claude-opus-4.6-file-analysis',
'messages': [
{
'role': 'user',
'content': [
{'type': 'text', 'text': 'Summarize this file and extract the key risks.'},
{
'type': 'file',
'file': {
'filename': 'demo.pdf',
'file_data': 'https://example.com/demo.pdf'
}
},
],
}
],
'stream': True,
'max_tokens': 4096,
'top_p': 0.5,
'top_k': 50,
},
stream=True,
)
response.raise_for_status()
event_name = 'message'
assistant_text = ''
for raw_line in response.iter_lines(decode_unicode=True):
if not raw_line:
event_name = 'message'
continue
if raw_line.startswith('event:'):
event_name = raw_line.replace('event:', '', 1).strip()
continue
if raw_line.startswith('data:'):
raw_data = raw_line.replace('data:', '', 1).strip()
if raw_data == '[DONE]':
print('\nFinal text:', assistant_text)
continue
payload = json.loads(raw_data)
if event_name == 'error' or payload.get('error'):
error = payload.get('error') or payload
raise RuntimeError(error.get('message', 'Chat request failed'))
choices = payload.get('choices') or []
if choices:
delta = choices[0].get('delta') or {}
content = delta.get('content')
if content:
assistant_text += content
print(content, end='', flush=True)
curl -N -X POST "https://api.flaq.ai/api/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: text/event-stream" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4.6-file-analysis",
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "Summarize this file and extract the key risks." },
{
"type": "file",
"file": {
"filename": "demo.pdf",
"file_data": "https://example.com/demo.pdf"
}
}
]
}
],
"stream": true,
"max_tokens": 4096,
"top_p": 0.5,
"top_k": 50
}'
| 參數 | 價格 | 原價 | 折扣 |
|---|
Claude Opus 4.6 檔案分析 API 在 Flaq AI 上提供 Claude API 存取,適用於需要細緻 分析、清楚指令遵循和可靠長篇輸出的複雜工作流程。這種深入、可控且生產就緒的 Claude API 整合可協助開發者建構檔案分析體驗,支援彈性的對話脈絡、文件感知提示、受支援的工具 工作流程,以及 Flaq AI 上特定路由的設定。它為生產工作負載而打造,讓團隊能穩定加入 進階 AI 能力,而不必管理模型基礎設施,也不必從零撰寫特定供應商的接入邏輯。
Note 請確保你的提示詞、上傳檔案和應用工作流程符合 Anthropic 安全與使用 指南。如果發生錯誤,請檢查輸入是否包含受限內容,簡化請求後再試。
Claude Opus 4.6 vs. GPT 5.5 GPT 5.5 定位於進階 OpenAI 推理和程式碼工作流程。 Claude Opus 4.6 以 Claude 風格指令遵循、細緻分析,以及對寫作、檔案和代理 工作流程的強適配脫穎而出。
Claude Opus 4.6 vs. GPT 5.4 GPT 5.4 強調面向專業工作的經濟實惠 OpenAI 效能。Claude Opus 4.6 提供 Claude API 替代方案,具備細緻回覆品質、實用控制,以及面向檔案分析 任務的可靠輸出。
Claude Opus 4.6 vs. Gemini Gemini 模型擅長 Google 原生多模態用例。Claude Opus 4.6 以 Claude 的細緻回覆風格、實用文件推理和面向生產的工具 行為形成差異化。
Claude Opus 4.6 vs. DeepSeek Reasoner DeepSeek Reasoner 適合成本敏感的推理工作負載。 Claude Opus 4.6 提供託管 Claude 品質、更穩妥的生產行為,並更適合專業寫作、 程式碼和分析工作流程。
Claude Opus 4.6 vs. Llama Llama 模型為開發者提供開放模型控制和自託管彈性。Claude Opus 4.6 更適合希望取得託管 API、強指令遵循和高品質輸出,而不想處理 模型基礎設施工作的團隊。
設定 Flaq AI Claude 模型並探索 Claude Code 技能

設定 Flaq AI GPT 模型並探索 Codex 技能
在 Hermes Agent 中使用 Flaq AI LLM 模型
在 ZCode 中使用 GLM 5.2、Kimi K3 和 DeepSeek v4
使用 Flaq AI DeepSeek 模型執行 DeepSeek Harness
將 AI 代理連接至 Flaq 圖片和影片生成工具
在 WorkBuddy 中使用 GPT 6 Astra 和 Claude Fable 5.1