Claude Code Guide
Set up Flaq AI Claude models and explore Claude Code skills
Free to try Claude Opus 5 API by Anthropic for file analysis, document review, extraction, summaries, image-aware understanding, and professional reasoning on 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: 'claude-opus-5-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
})
});
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': 'claude-opus-5-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": "claude-opus-5-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 |
|---|
Claude Opus 5 File Analysis API helps applications understand uploaded files together with natural-language instructions. It supports text, image, and file inputs for document review, extraction, comparison, and research workflows that need multimodal context on Flaq AI.
Multimodal File Input: Analyze supported text, image, and uploaded file inputs within a structured conversation.
Document Understanding: Extract key information, summarize long material, and answer questions about the supplied content.
Cross-Reference Analysis: Compare multiple inputs, identify relationships, and organize findings into a requested format.
Image-Aware Interpretation: Use visual context from supported images together with text instructions when the task depends on layout or visual detail.
Structured Output Requests: Ask for tables, summaries, checklists, classifications, or other review-ready formats through natural language.
Conversation-Based Review: Continue analysis with follow-up questions while retaining the relevant task context.
Input: A text prompt with optional image and file uploads that provide the material to analyze.
Task Direction: Explain the review goal, important fields, comparison criteria, and expected output format.
Output: A structured analysis response returned through the Flaq AI chat workflow for review or application use.
Follow-Up: Ask focused questions to clarify findings, inspect a specific section, or refine the requested format.
Application Handling: Validate extracted information, handle upload or provider errors, and protect sensitive source material appropriately.
Document Review: Summarize contracts, reports, briefs, policies, and internal documents with focused questions.
Data Extraction: Convert unstructured files into structured fields, checklists, or review summaries.
Research and Comparison: Compare several source files and surface similarities, differences, and missing information.
Visual Document Analysis: Interpret charts, scanned pages, layouts, and other image-based material alongside instructions.
Knowledge Workflows: Add file-aware assistants to support, compliance, operations, and research applications.
Note Confirm file permissions and review extracted information before relying on it for legal, financial, medical, compliance, or other high-impact decisions.
Claude Opus 5 vs. GPT-5 Vision: GPT-5 Vision supports broad multimodal reasoning. Claude Opus 5 File Analysis is focused on document-centered review, extraction, and follow-up analysis across uploaded inputs.
Claude Opus 5 vs. Gemini 2.5 Pro: Gemini 2.5 Pro offers multimodal understanding within Google's ecosystem. Claude Opus 5 provides an alternative workflow centered on careful document interpretation and structured responses.
Claude Opus 5 vs. Qwen-VL: Qwen-VL is designed for visual-language tasks across Alibaba workflows. Claude Opus 5 is suited to teams prioritizing file review, contextual comparison, and clear analytical writing.
Claude Opus 5 vs. Mistral OCR: Mistral OCR focuses on document text extraction. Claude Opus 5 extends beyond extraction into question answering, comparison, synthesis, and multi-turn reasoning.
Claude Opus 5 vs. Gemini Flash: Gemini Flash emphasizes responsive multimodal interactions. Claude Opus 5 is a strong fit when uploaded files require deeper interpretation and carefully structured output.
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