Claude Code 指南
設定 Flaq AI Claude 模型並探索 Claude Code 技能
透過 Flaq AI 穩定、實惠的 API 體驗 OpenAI GPT 6 Sol API,支援網頁搜尋、線上研究和根據最新資訊的回答,並支援串流輸出。把線上檢索與問題回答接入應用程式,為研究任務補充目前資訊。
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-6-sol-web-search',
messages: [
{
role: 'user',
content: 'Find the latest public information about Flaq AI and summarize it for a product brief.'
}
],
stream: true,
max_tokens: 2048
})
});
if (!response.ok) {
const errorBody = await response.json().catch(() => null);
throw new Error(errorBody?.error?.message ?? errorBody?.message ?? `HTTP ${response.status}`);
}
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(/\r?\n\r?\n/);
buffer = frames.pop() || '';
for (const frame of frames) {
const lines = frame.split(/\r?\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-6-sol-web-search',
'messages': [
{
'role': 'user',
'content': 'Find the latest public information about Flaq AI and summarize it for a product brief.',
}
],
'stream': True,
'max_tokens': 2048,
},
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-6-sol-web-search",
"messages": [
{
"role": "user",
"content": "Find the latest public information about Flaq AI and summarize it for a product brief."
}
],
"stream": true,
"max_tokens": 2048
}'
| 參數 | 價格 | 原價 | 折扣 |
|---|
GPT 6 Sol Web Search API 結合 GPT-6 Sol 推理與網頁檢索,在 Flaq AI 上支援研究與市場分析。此網頁搜尋 API 整合協助開發者和研究團隊調查持續變化的主題、比較公開來源,並根據對話訊息撰寫簡報。團隊在採信結果之前,應對照原始來源查證重要論述。
注意 請確保提示詞、附件素材與檢索任務符合 OpenAI 使用政策、Flaq AI 條款及適用的網站服務條款。如果發生錯誤,請縮小查詢範圍、移除受限詞語或附件,然後重試。
GPT 6 Sol Web Search 與 GPT 6 Astra Web Search
GPT 6 Astra 是 OpenAI 面向最高難度推理工作的旗艦選擇。GPT 6 Sol Web Search 在研究能力與成本之間取得平衡,適用於經常執行的正式環境工作流程。
GPT 6 Sol Web Search 與 GPT 6 Luna Web Search
GPT 6 Luna Web Search 適合成本敏感的大量查詢。當工作流程需要較長篇幅的比較,以及對互相矛盾來源的深入審查時,可以選擇 GPT 6 Sol Web Search。
GPT 6 Sol Web Search 與搜尋優先的答案引擎
搜尋優先的答案引擎通常著重連結與簡短答案。GPT 6 Sol Web Search 可依使用者的問題,將檢索資料整理為較長篇幅的說明與比較。
GPT 6 Sol Web Search 與 Gemini Grounded Search
Gemini 以檢索為依據的搜尋模型專為 Google 生態系整合與原生網頁工具設計。GPT 6 Sol Web Search 提供 OpenAI 原生檢索方案,並透過 Flaq AI 統一的聊天補全 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