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
API OpenAI GPT 5.4 cho suy luận tài liệu trên PDF, báo cáo, hợp đồng và bảng tính. Ổn định, chi phí hợp lý cho phân tích sản xuất quy mô lớn. Dùng API GPT, Claude và các LLM ổn định cho AI agent, chatbot, nghiên cứu, lập trình, tự động hóa và ứng dụng thông minh.
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: 'gpt-5.4-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
})
});
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': 'gpt-5.4-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,
},
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": "gpt-5.4-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
}'
| Tham số | Giá | Giá gốc | Giảm giá |
|---|
GPT 5.4 File Analysis API trên Flaq AI cung cấp quyền truy cập OpenAI API cho các workflow chuyên nghiệp cần suy luận đáng tin cậy, hỗ trợ lập trình và trải nghiệm chat thực tế. Tích hợp OpenAI API nhanh, tiết kiệm và thực tế này giúp nhà phát triển xây dựng trải nghiệm file analysis với ngữ cảnh hội thoại linh hoạt, prompting theo tài liệu, workflow công cụ được hỗ trợ và thiết lập theo route trên Flaq AI. Được xây dựng cho tải production, nó mang lại cho đội ngũ một cách ổn định để thêm năng lực AI nâng cao mà không cần quản lý hạ tầng mô hình hay viết phần kết nối riêng cho từng provider từ đầu.
Lưu ý Hãy đảm bảo prompt, tệp tải lên và workflow ứng dụng tuân thủ hướng dẫn an toàn và sử dụng của OpenAI. Nếu xảy ra lỗi, hãy kiểm tra input để tìm nội dung bị hạn chế, đơn giản hóa yêu cầu rồi thử lại.
GPT 5.4 vs. Claude Opus 4.7 Claude Opus 4.7 mạnh ở suy luận dài hạn cẩn trọng và workflow agent kiểu Claude. GPT 5.4 cung cấp hành vi native OpenAI, bộ công cụ ứng dụng rộng và đường API quen thuộc cho đội ngũ đã xây dựng trên hệ sinh thái OpenAI.
GPT 5.4 vs. Claude Sonnet 4.6 Claude Sonnet 4.6 tập trung vào cân bằng nhanh giữa trí tuệ và độ trễ. GPT 5.4 là lựa chọn mạnh khi nhà phát triển muốn hành vi mô hình OpenAI, workflow chat linh hoạt và khả năng file analysis tích hợp trên Flaq AI.
GPT 5.4 vs. Gemini Mô hình Gemini hấp dẫn cho use case đa phương thức native Google và gần Workspace. GPT 5.4 khác biệt nhờ suy luận kiểu OpenAI, chất lượng văn bản đáng tin cậy và tích hợp thân thiện với production.
GPT 5.4 vs. DeepSeek Reasoner DeepSeek Reasoner được đánh giá cao cho thử nghiệm suy luận tiết kiệm. GPT 5.4 cung cấp trải nghiệm API quản lý cho workflow file analysis chuyên nghiệp, nhất là khi độ tin cậy và hỗ trợ hệ sinh thái quan trọng.
GPT 5.4 vs. Llama Mô hình Llama cho đội ngũ sự linh hoạt open-model và kiểm soát triển khai. GPT 5.4 loại bỏ gánh nặng hạ tầng và cung cấp API có thể mở rộng cho nhà phát triển cần tích hợp nhanh và chất lượng output ổn định.
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
Sử dụng GPT 6 Astra và Claude Fable 5.1 trong WorkBuddy