Claude Code 指南
配置 Flaq AI Claude 模型并探索 Claude Code 技能
免费试用 GPT 5.6 Sol 图生文 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-5.6-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
})
});
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-5.6-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-5.6-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
}'
| 参数 | 价格 | 原价 | 折扣 |
|---|
Flaq AI 上的 GPT 5.6 Sol 图像到文本 API 将 OpenAI 旗舰 GPT-5.6 的推理能力与专注的视觉理解相结合。这项可用于生产环境的视觉 API 集成让开发者能够通过自然语言指令分析图像、布局、可见文本、图表、对象和场景细节。借助可选的文本指引、对话上下文和流式响应,团队无需维护独立的视觉基础设施,即可将复杂视觉输入转化为清晰描述和结构化洞察。
注意 请确保您的提示词和上传图像符合 OpenAI 的安全与使用准则。如果发生错误,请检查输入中是否包含受限制或不支持的内容,简化请求后重试。
GPT 5.6 Sol 与 GPT 5.6 Terra
GPT 5.6 Terra 为注重成本的生产工作负载提供均衡的视觉分析能力。GPT 5.6 Sol 则定位于要求最严苛的图像推理和专业审查任务。
GPT 5.6 Sol 与 GPT 5.6 Luna
GPT 5.6 Luna 优先为大规模应用提供快速、高效的图像理解。当复杂视觉上下文比最高吞吐量更重要时,GPT 5.6 Sol 更重视深度推理。
GPT 5.6 Sol 与 GPT 5.5 图像到文本
GPT 5.5 为现有 OpenAI 工作流提供可靠的视觉分析。GPT 5.6 Sol 则将 GPT-5.6 的旗舰定位带入 Flaq AI 上的图像到文本应用。
GPT 5.6 Sol 与 Claude 视觉工作流
Claude 模型在 Anthropic 生态系统中提供缜密的多模态分析。GPT 5.6 Sol 则为视觉推理和结构化图像分析提供先进的 OpenAI 原生路径。
GPT 5.6 Sol 与 Gemini 视觉模型
Gemini 模型能够自然融入以 Google 为中心的多模态系统。GPT 5.6 Sol 专为偏好旗舰 GPT 推理能力和 OpenAI 风格集成的团队设计。