Claude Code 指南
設定 Flaq AI Claude 模型並探索 Claude Code 技能
透過 Flaq AI 穩定、實惠的 API 體驗 OpenAI GPT 6 Luna 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-luna-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
})
});
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-luna-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-luna-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
}'
| 參數 | 價格 | 原價 | 折扣 |
|---|
Flaq AI 上的 GPT 6 Luna 圖像轉文字 API 為圖像檢查、視覺問答和 OCR 輔助資料擷取提供具成本效益的 GPT-6 選擇。開發者可以在大量視覺工作流程和互動式應用程式中,結合附帶的問題分析支援的圖像。
注意 請確保視覺輸入和提示訊息符合 OpenAI 的安全與使用政策以及 Flaq AI 條款。如果發生錯誤,請檢查圖像是否包含不支援的屬性或受限元素,調整提示詞後再試一次。
GPT 6 Luna 圖像轉文字與 GPT 6 Sol 圖像轉文字
GPT 6 Sol 圖像轉文字專為深入的圖表解讀、複雜架構示意圖和高強度多步驟視覺推理而設計。GPT 6 Luna 圖像轉文字著重於快速回應和經濟高效的處理,適用於大量視覺標註和即時使用者提問。
GPT 6 Luna 圖像轉文字與 GPT 5.6 Luna 圖像轉文字
GPT 5.6 Luna 圖像轉文字是用於高效率視覺工作流程的較早選擇。GPT 6 Luna 圖像轉文字將更新的 GPT-6 系列帶入大量圖像問答;遷移前,請使用自己的圖像測試視覺準確度與成本。
GPT 6 Luna 圖像轉文字與專用 OCR 引擎
當轉錄是主要任務時,專用 OCR 工具很有幫助。GPT 6 Luna 圖像轉文字也能回答有關周圍視覺情境的問題,並以文字形式整理所需細節。
GPT 6 Luna 圖像轉文字與 Gemini Flash 視覺能力
Gemini Flash 模型與 Google Cloud 基礎設施緊密整合。GPT 6 Luna 圖像轉文字提供靈活的 OpenAI 原生視覺解決方案,可配合 Flaq AI 上的標準聊天補全格式使用,定價可預期且具成本效益。
設定 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