Claude Code 指南
設定 Flaq AI Claude 模型並探索 Claude Code 技能
透過 Flaq AI 穩定且支援串流回應的 API,體驗 OpenAI GPT 6 Astra API 的進階視覺推理、圖表解讀、OCR 和圖片問答能力。結合圖片內容與文字線索,為團隊的專業分析提供支援。
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-astra-image-to-text',
messages: [
{
role: 'user',
content: [
{ type: 'text', text: 'Describe the image and extract any visible text.' },
{
type: 'image_url',
image_url: {
url: 'https://example.com/sample-image.jpg'
}
}
]
}
],
stream: true,
max_tokens: 2048
})
});
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-6-astra-image-to-text',
'messages': [
{
'role': 'user',
'content': [
{'type': 'text', 'text': 'Describe the image and extract any visible text.'},
{
'type': 'image_url',
'image_url': {
'url': 'https://example.com/sample-image.jpg'
}
},
],
}
],
'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-astra-image-to-text",
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "Describe the image and extract any visible text." },
{
"type": "image_url",
"image_url": {
"url": "https://example.com/sample-image.jpg"
}
}
]
}
],
"stream": true,
"max_tokens": 2048
}'
| 參數 | 價格 | 原價 | 折扣 |
|---|
GPT 6 Astra 圖像轉文字 API 將 OpenAI 旗艦 GPT-6 Astra 的推理能力應用於 Flaq AI 上的圖像、圖表與視覺問答。這項圖像轉文字 API 整合協助開發者與專業團隊,將支援的圖像搭配選用的文字指令,轉化為描述、擷取的細節與結構化分析。模型提供視覺推理能力,Flaq AI 則提供穩定、高成本效益的 API 存取。
注意 使用符合 OpenAI 使用政策及 Flaq AI 條款的圖像與提示詞。如果發生錯誤,請檢查是否有受限或不支援的視覺內容,簡化問題,然後重試。
GPT 6 Astra 與 GPT 5.6 Sol 圖像轉文字
GPT 5.6 Sol 圖像轉文字仍是 Flaq AI 上的上一代 OpenAI 旗艦視覺模型。當視覺推理、圖表解讀或圖像問答需要更新一代 GPT 時,GPT 6 Astra 是目前的旗艦選項。
GPT 6 Astra 與 Claude 視覺工作流程
Claude Fable 模型擅長處理文件內嵌的圖表與表格,尤其是透過檔案分析 API。GPT 6 Astra 圖像轉文字 API 是專為圖像搭配選用文字分析而設的 OpenAI API,無須上傳文件。
GPT 6 Astra 與 Gemini 視覺模型
Gemini 視覺 API 很適合以 Google 為核心的多模態產品。GPT 6 Astra 圖像轉文字 API 則面向希望透過 Flaq AI 的圖像轉文字聊天介面,取得 OpenAI 旗艦視覺推理能力的團隊。
GPT 6 Astra 與專用 OCR 引擎
專用 OCR 工具著重最佳化從掃描影像中還原原始文字的能力。GPT 6 Astra 在可見文字的基礎上加入旗艦級視覺推理,因此,當任務是解讀、問答或圖表分析,而不只是轉錄時,它更有用。
設定 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