คู่มือ Claude Code
ตั้งค่าโมเดล Claude ของ Flaq AI และสำรวจสกิล Claude Code
ลอง API GPT 6.1 Sol จาก OpenAI เพื่อทำความเข้าใจภาพ ถามคำถามเกี่ยวกับภาพ และวิเคราะห์ภาพผ่าน API ที่เสถียรและคุ้มค่าของ Flaq AI พร้อมการตอบกลับแบบสตรีม
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.1-sol-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.1-sol-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.1-sol-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.1 Sol Image-to-Text API เชื่อมโยงอินพุตภาพกับคำตอบแบบข้อความบน Flaq AI ส่งภาพและคำถามเมื่อ จำเป็น เพื่อขอคำบรรยาย คำอธิบายเนื้อหาที่มองเห็น หรือคำตอบที่มุ่งเน้นรายละเอียดเฉพาะ นักพัฒนาสามารถใช้ API ทำความเข้าใจภาพนี้ในเครื่องมือตรวจทานภาพ เวิร์กโฟลว์เนื้อหา และผลิตภัณฑ์สนทนา พร้อมเอาต์พุตแบบสตรีมและความยาวคำตอบที่ปรับได้
คำถามที่อ้างอิงภาพ: ใช้คำสั่งภาษาธรรมชาติเพื่อให้ระบบมุ่งความสนใจไปยังวัตถุ ความสัมพันธ์ หรือบริเวณเฉพาะ ภายในภาพ
ผลลัพธ์เป็นข้อความบรรยาย: ขอคำบรรยายเนื้อหาที่มองเห็นเพื่อการตรวจทาน การจัดทำดัชนี หรือการเตรียมงาน บรรณาธิการ
คำแนะนำผ่านพรอมต์แบบเลือกใช้: เพิ่มคำถามหรือคำสั่งด้านรูปแบบเพื่อให้คำตอบสอดคล้องกับข้อมูล ที่เวิร์กโฟลว์ของคุณต้องการ
การตรวจทานภาพแบบเจาะจง: ถามเกี่ยวกับองค์ประกอบภาพ วัตถุที่มองเห็น หรือเนื้อหาในภาพที่อ่านได้ โดยไม่เปลี่ยน คำขอเป็นงานสร้างภาพ
คำตอบแบบสตรีม: แสดงคำตอบแบบข้อความทีละส่วนในหน้าจอสนทนาหรือตรวจทาน
ขอบเขตคำตอบที่ยืดหยุ่น: ตั้งขีดจำกัดโทเคนขาออกและขอคำบรรยายสั้น ๆ หรือคำอธิบายที่ละเอียดขึ้น
อินพุต: ภาพที่รองรับ โดยอาจแนบคำถามหรือคำสั่งแบบข้อความมาด้วย
เอาต์พุต: คำบรรยาย คำอธิบาย หรือคำตอบแบบข้อความเกี่ยวกับเนื้อหาภาพที่ให้มา
การควบคุม: การกำหนดจุดสนใจผ่านพรอมต์ ขีดจำกัดโทเคนขาออกที่เลือกตั้งค่าได้ และการส่งคำตอบแบบสตรีมหรือไม่สตรีม
ความสามารถ: การตอบคำถามเกี่ยวกับภาพ การบรรยายภาพ และการตรวจทานเนื้อหาที่มองเห็นในภาพเป็นข้อความ
การจัดทำแค็ตตาล็อกภาพ: เตรียมข้อความบรรยายสำหรับชุดภาพผลิตภัณฑ์หรือภาพสำหรับงานบรรณาธิการ พร้อมตรวจทานก่อน เผยแพร่
ร่างคำบรรยายเพื่อการเข้าถึง: สร้างคำบรรยายภาพเบื้องต้นให้บรรณาธิการตรวจสอบและปรับให้เข้ากับเนื้อหา โดยรอบ
ผู้ช่วยตรวจทานภาพ: ให้ผู้ใช้ถามคำถามเกี่ยวกับภาพถ่ายหรือภาพหน้าจอที่ส่งมา
การวิเคราะห์งานสร้างสรรค์: ขอข้อสังเกตเกี่ยวกับองค์ประกอบและรายละเอียดที่มองเห็นเพื่อใช้ประกอบการหารือด้านการออกแบบ
การเตรียมเนื้อหา: เปลี่ยนภาพอ้างอิงเป็นข้อความตั้งต้นสำหรับคำบรรยายหรือสรุปโจทย์
หมายเหตุ ใช้ภาพที่ชัดเจนและคำถามที่เจาะจง ตรวจสอบผลการอ่านข้อความขนาดเล็ก รายละเอียดปลีกย่อย และคำบรรยายที่ได้จากการอนุมาน เทียบกับภาพต้นฉบับ เส้นทางนี้ส่งคืนข้อความ ไม่ใช่ภาพที่แก้ไขหรือสร้างขึ้น
GPT 6.1 Sol Image-to-Text เทียบกับ GPT 6.1 Sol Text-to-Text Text-to-Text รับข้อความโดยไม่มีภาพ แนบ Image-to-Text เป็นเส้นทางรับอินพุตภาพสำหรับงานที่จำเป็นต้องใช้ตัวภาพเอง
GPT 6.1 Sol Image-to-Text เทียบกับ GPT 6.1 Sol File Analysis File Analysis รองรับเอกสารแนบนอกเหนือจาก อินพุตภาพ Image-to-Text เน้นเวิร์กโฟลว์ที่ใช้สื่อภาพ และไม่รับไฟล์แนบใน การกำหนดค่าบน Flaq AI
GPT 6.1 Sol Image-to-Text เทียบกับ Claude Sonnet 5.5 File Analysis เส้นทาง File Analysis ของ Claude สามารถรับ ภาพควบคู่กับเอกสารได้เช่นกัน เปรียบเทียบคำตอบจากภาพที่เป็นตัวแทนของงานจริงเมื่อต้องเลือกระหว่างเวิร์กโฟลว์ที่เน้นภาพกับ เวิร์กโฟลว์ที่เน้นเอกสาร
GPT 6.1 Sol Image-to-Text เทียบกับ GPT 6.1 Sol Web Search Web Search ออกแบบมาสำหรับการค้นคว้าออนไลน์และรับ เอกสารแนบประกอบได้ Image-to-Text จัดการภาพที่ให้มาโดยไม่เปิดใช้การค้นหาเว็บ
ตั้งค่าโมเดล Claude ของ Flaq AI และสำรวจสกิล Claude Code

ตั้งค่าโมเดล GPT ของ Flaq AI และสำรวจสกิล Codex
ใช้โมเดล LLM ของ Flaq AI ใน Hermes Agent
ใช้ GLM 5.2, Kimi K3 และ DeepSeek v4 ใน ZCode
เรียกใช้ DeepSeek Harness กับโมเดล DeepSeek ของ Flaq AI
เชื่อมต่อเอเจนต์ AI กับเครื่องมือสร้างรูปภาพและวิดีโอของ Flaq
ใช้ GPT 6 Astra และ Claude Fable 5.1 ใน WorkBuddy