Hướng dẫn Claude Code
Thiết lập model Claude của Flaq AI và khám phá kỹ năng Claude Code
Dùng thử miễn phí Claude Fable 5 API cho suy luận tài liệu, đánh giá PDF, tóm tắt báo cáo và hỏi đáp tệp. Giá ổn định, cạnh tranh cho quy trình phân tích chuyên nghiệp.
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-fable-5-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.9,
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-fable-5-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.9,
'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-fable-5-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.9,
"top_k": 50
}'
| Tham số | Giá | Giá gốc | Giảm giá |
|---|
API Claude Fable 5 File Analysis cung cấp lập luận Anthropic LLM đáng tin cậy cho tài liệu, báo cáo, ảnh chụp màn hình và workflow tri thức chuyên nghiệp. Tích hợp Claude file analysis API tiết kiệm này giúp nhà phát triển xây dựng hỏi đáp tài liệu, review PDF, tóm tắt báo cáo, trích xuất và công cụ nghiên cứu nội bộ thông qua một endpoint Flaq AI thống nhất. Claude Fable 5 File Analysis được thiết kế cho những đội ngũ cần hiểu file thực tế, câu trả lời có cấu trúc và hành vi API ổn định cho workflow phân tích production.
Lưu ý Hãy bảo đảm file tải lên và prompt tuân thủ hướng dẫn an toàn của Anthropic, chính sách sử dụng của Flaq AI và yêu cầu xử lý dữ liệu của tổ chức bạn. Nếu xảy ra lỗi, hãy xem lại file và prompt, điều chỉnh yêu cầu rồi thử lại.
Claude Fable 5 File Analysis so với Claude Text-to-Text
Workflow Claude chỉ văn bản phù hợp nhất khi prompt bao gồm toàn bộ ngữ cảnh liên quan. Claude Fable 5 File Analysis bổ sung input file được hỗ trợ cho hỏi đáp tài liệu, tóm tắt và trích xuất trong khi vẫn giữ trải nghiệm Claude API ổn định.
Claude Fable 5 File Analysis so với Claude Opus File Analysis
Workflow file Claude Opus phù hợp với lập luận cao cấp và phân tích chuyên gia đòi hỏi nhiều hơn. Claude Fable 5 File Analysis cung cấp lựa chọn Anthropic API tiết kiệm cho review tài liệu có khả năng mở rộng, phân tích kinh doanh hằng ngày và công cụ tri thức production.
Claude Fable 5 File Analysis so với GPT File Analysis
Các lựa chọn GPT file analysis cung cấp năng lực hệ sinh thái OpenAI rộng. Claude Fable 5 File Analysis cho đội ngũ một lựa chọn thay thế kiểu Claude, tập trung vào lập luận tài liệu cẩn trọng, tóm tắt rõ ràng và triển khai API thực tế qua Flaq AI.
Claude Fable 5 File Analysis so với Gemini File Understanding
Workflow file Gemini cung cấp phạm vi hệ sinh thái Google mạnh và ưu thế đa phương thức. Claude Fable 5 File Analysis khác biệt nhờ chất lượng ngôn ngữ kiểu Anthropic, trích xuất có cấu trúc và tích hợp đáng tin cậy tập trung vào tài liệu.
Claude Fable 5 File Analysis so với pipeline tài liệu tùy chỉnh
Hệ thống tài liệu tùy chỉnh có thể cung cấp kiểm soát sâu nhưng cần parsing, retrieval, định tuyến prompt và bảo trì hạ tầng. API Claude Fable 5 File Analysis đơn giản hóa document intelligence bằng cách cung cấp lập luận file được quản lý trong một tích hợp ổn định, tiết kiệm.
Thiết lập model Claude của Flaq AI và khám phá kỹ năng Claude Code

Thiết lập model GPT của Flaq AI và khám phá kỹ năng Codex
Dùng mô hình LLM của Flaq AI trong Hermes Agent
Sử dụng GLM 5.2, Kimi K3 và DeepSeek v4 trong ZCode
Chạy DeepSeek Harness với các mô hình DeepSeek của Flaq AI
Kết nối các tác nhân AI với công cụ tạo hình ảnh và video của Flaq