Claude Code ガイド
Flaq AI の Claude モデルを設定し、Claude Code スキルを探す
高速な複数ファイルの抽出、要約、比較、低価格で大量処理が可能な文書ワークフローに対応するGPT 5.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-5.6-luna-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': 'gpt-5.6-luna-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-5.6-luna-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
}'
| パラメータ | 料金 | 元の料金 | 割引 |
|---|
Flaq AI の GPT 5.6 Luna File Analysis API は、スケーラブルな本番ワークフロー向けに、高速でコスト効率の高い文書理解を提供します。この OpenAI API 統合により、開発者は自然言語の指示と、サポート対象の複数ファイルおよび任意の画像コンテキストを組み合わせ、抽出、要約、比較、日常的な分析を行えます。会話形式の追加質問とストリーミング応答により、Luna は個別のファイル分析基盤を構築せずに、反復的な文書ワークロードを処理できるようにします。
注意 プロンプト、アップロードしたファイル、アプリケーションワークフローが OpenAI の安全性および利用ガイドラインに準拠していることを確認してください。エラーが発生した場合は、入力に制限対象またはサポート対象外のコンテンツがないか確認し、リクエストを簡略化して再試行してください。
GPT 5.6 Luna と GPT 5.6 Sol の比較
GPT 5.6 Sol は、フラッグシップ層で最も複雑な文書推論を対象とします。GPT 5.6 Luna は、スケーラブルなワークロード向けに、高速でコスト効率の高いファイル処理を優先します。
GPT 5.6 Luna と GPT 5.6 Terra の比較
GPT 5.6 Terra は、専門的な文書分析と低コストのバランスを取ります。GPT 5.6 Luna は、反復的なファイルタスクで最大限の速度と効率を重視します。
GPT 5.6 Luna と GPT 5.5 File Analysis の比較
GPT 5.5 は、複雑な専門業務向けに信頼性の高い文書ワークフローをサポートします。GPT 5.6 Luna は、大量の分析に、より高速でコスト効率の高い選択肢を提供します。
GPT 5.6 Luna と Claude File Analysis の比較
Claude モデルは、Anthropic エコシステム内で強力な文書推論を提供します。GPT 5.6 Luna は、スケーラブルなファイル分析向けに、効率的な OpenAI ネイティブの手段を提供します。
GPT 5.6 Luna とオープンモデル文書パイプラインの比較
オープンモデルはデプロイを制御できますが、追加のサービング基盤と文書処理基盤が必要です。GPT 5.6 Luna は、Flaq AI の API ワークフローを通じて管理された分析を提供します。
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の画像・動画生成ツールに接続