Claude Code 指南
設定 Flaq AI Claude 模型並探索 Claude Code 技能
免費體驗 Gemini 3.5 Flash API,用於檔案分析、文件摘要、資訊擷取和多模態推理。為生產團隊提供穩定存取。適合專業團隊在 AI 工作流程中處理應用整合、協作交付、場景驗證、內容複核、資料整理、業務分析、多步驟任務、產品探索與日常團隊迭代,持續建置、測試、驗證、最佳化並改進 AI 功能體驗。穩定接入 GPT、Claude 等 LLM API,用於 AI Agent、聊天機器人、研究、程式碼、自動化與智慧應用。
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: 'gemini-3.5-flash-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': 'gemini-3.5-flash-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": "gemini-3.5-flash-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
}'
| 參數 | 價格 | 原價 | 折扣 |
|---|
Flaq AI 上的 Gemini 3.5 Flash File Analysis API 提供 Google 模型存取,適用於快速文件理解、檔案審閱與多模態分析工作流程。這項高效 Gemini API 整合可協助開發者透過穩定的受管理路由分析上傳檔案、影像與文字指令。它專為需要大規模實惠檔案分析、且不想組裝供應商專屬處理基礎設施的團隊而打造。
注意 請確保上傳檔案、prompt 與應用程式工作流程符合 Google 的安全準則。如果發生錯誤,請檢查輸入是否含有限制內容、簡化請求,然後再試一次。
Gemini 3.5 Flash vs. Claude File Analysis
Claude file analysis 在細緻文件推理方面表現強大。Gemini 3.5 Flash File Analysis 優先強調速度、實惠價格與 Google 模型整合,適合可擴展工作流程。
Gemini 3.5 Flash vs. GPT File Analysis
GPT file analysis routes 提供 OpenAI 原生行為與廣泛的生態熟悉度。Gemini 3.5 Flash 為團隊提供高效的 Google 路由,用於受管理的檔案理解。
Gemini 3.5 Flash vs. Qwen File Workflows
Qwen workflows 為語言任務提供 Alibaba 模型替代選擇。Gemini 3.5 Flash File Analysis 專注於由 Google 驅動的實惠檔案與影像理解。
Gemini 3.5 Flash vs. Grok Vision Workflows
Grok vision workflows 提供 xAI 模型行為。Gemini 3.5 Flash 透過 Flaq AI 提供快速受管理的 Google 檔案分析。
Gemini 3.5 Flash vs. Llama with Document Pipelines
Llama with document tooling 提供基礎設施控制。Gemini 3.5 Flash 為需要受管理 API 的團隊移除託管與 pipeline 複雜度。