Claude Code Guide
Set up Flaq AI Claude models and explore Claude Code skills
Try GPT 6.1 Sol API by OpenAI for file analysis, document summaries, and file Q&A through Flaq AI's stable, affordable API with streaming responses.
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-file-analysis',
messages: [
{
role: 'user',
content: [
{ type: 'text', text: 'Summarize this file and extract the key risks.' },
{
type: 'file',
file: {
filename: 'demo.pdf',
file_data: 'https://example.com/demo.pdf'
}
}
]
}
],
stream: true,
max_tokens: 4096
})
});
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-file-analysis',
'messages': [
{
'role': 'user',
'content': [
{'type': 'text', 'text': 'Summarize this file and extract the key risks.'},
{
'type': 'file',
'file': {
'filename': 'demo.pdf',
'file_data': 'https://example.com/demo.pdf'
}
},
],
}
],
'stream': True,
'max_tokens': 4096,
},
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-file-analysis",
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "Summarize this file and extract the key risks." },
{
"type": "file",
"file": {
"filename": "demo.pdf",
"file_data": "https://example.com/demo.pdf"
}
}
]
}
],
"stream": true,
"max_tokens": 4096
}'
| Parameters | Price | Original Price | Discount |
|---|
GPT 6.1 Sol File Analysis API lets developers build document question answering and review workflows on Flaq AI. Provide supported files, images, and optional instructions to request written analysis of the supplied material. Whether the task is a report summary, a comparison of reference documents, or an explanation of a specific passage, the API offers conversational interaction, streaming delivery, and output length controls.
Attachment-Based Analysis: Work directly with supported files so the question can be considered alongside its source material.
Document Summaries: Request an overview of a report, a section-by-section brief, or a summary tailored to a particular audience.
Targeted Information Requests: Ask for relevant details or explanations and specify how the answer should be organized.
Related-File Comparison: Supply documents together to explore differences, overlapping themes, or questions that deserve further review.
Image and Text Context: Add supported visual references and text instructions when they help explain what to look for in the files.
Streaming with Output Controls: Display written analysis progressively and use an output token limit to manage response scope.
Input: Supported file or image attachments, optional text instructions, and relevant conversation messages.
Output: Written summaries, explanations, comparisons, or answers about the supplied content.
Controls: Question focus, requested response structure, an optional output token limit, and streaming selection.
Capabilities: Document review, file-based question answering, summarization, and analysis across supplied references.
Business Report Summaries: Turn uploaded reports into working briefs that highlight the sections relevant to a team.
Specification Review: Ask questions about project documents and collect points that need clarification.
Research Organization: Group findings from supplied reading material into a structured overview.
Document Assistants: Let users ask follow-up questions about the files attached to a conversation.
Editorial Source Review: Extract themes and supporting material for a draft while keeping the original documents available for checking.
Note Provide readable files and make the intended question explicit. Validate quotations, extracted values, and conclusions against the source documents before using the output.
GPT 6.1 Sol File Analysis vs. Claude Sonnet 5.5 File Analysis Both routes support document and image inputs on Flaq AI. Compare their interpretations of the same files to choose the fit for your review workflow.
GPT 6.1 Sol File Analysis vs. GPT 6.1 Sol Text-to-Text Text-to-Text receives written messages without file attachments. File Analysis is suited to tasks whose reference material arrives as uploaded documents.
GPT 6.1 Sol File Analysis vs. GPT 6.1 Sol Image-to-Text Image-to-Text handles visual questions without document attachments in its current configuration. File Analysis supports documents alongside visual context.
GPT 6.1 Sol File Analysis vs. GPT 6.1 Sol Web Search Web Search enables online research. File Analysis keeps the workflow centered on supplied attachments without enabling web search.
Set up Flaq AI Claude models and explore Claude Code skills

Set up Flaq AI GPT models and explore Codex skills
Use Flaq AI LLM models in Hermes Agent
Use GLM 5.2, Kimi K3, and DeepSeek v4 in ZCode
Run DeepSeek Harness with Flaq AI DeepSeek models
Connect AI agents to Flaq image and video generation tools
Use GPT 6 Astra and Claude Fable 5.1 in WorkBuddy