Moonshot AI/kimi-2.7-image-to-text
kimi-2.7-image-to-text
Kimi 2.7 Image-to-Text APIを使い、画像理解、画像Q&A、OCR風の抽出、マルチモーダル推論を安定した本番ワークフローで活用できます。画像分析、資料認識、ビジュアル確認、制作参考の整理、マルチモーダルアプリの検証にも便利です。
Image Chat
関連するKimi 2.7モデル
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: 'kimi-2.7-image-to-text',
messages: [
{
role: 'user',
content: [
{
type: 'text',
text: 'What is roughly shown in this image?'
},
{
type: 'image_url',
image_url: {
url: 'https://example.com/sample-image.jpg'
}
}
]
}
],
stream: true,
max_tokens: 300
})
});
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': 'kimi-2.7-image-to-text',
'messages': [
{
'role': 'user',
'content': [
{
'type': 'text',
'text': 'What is roughly shown in this image?',
},
{
'type': 'image_url',
'image_url': {
'url': 'https://example.com/sample-image.jpg',
},
},
],
}
],
'stream': True,
'max_tokens': 300,
},
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": "kimi-2.7-image-to-text",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What is roughly shown in this image?"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/sample-image.jpg"
}
}
]
}
],
"stream": true,
"max_tokens": 300
}'
Kimi 2.7 Image to Textの料金
| パラメータ | 料金 | 元の料金 | 割引 |
|---|
README
安定かつ手頃な Kimi 2.7 Image-to-Text API(Moonshot AI 視覚理解)
Flaq AI の Kimi 2.7 Image-to-Text API は、視覚理解、画像 Q&A、OCR 風の抽出、画像に基づく推論ワークフロー向けに Moonshot AI のマルチモーダルモデルアクセスを提供します。この手頃な Kimi ビジョン API 統合により、開発者は画像入力を有用なテキスト説明、回答、要約、構造化された洞察へ変換できます。個別のビジョン基盤を維持せずに安定した画像分析を必要とするチーム向けに構築されています。
Kimi 2.7 Image-to-Text API の主な機能
- 視覚理解: Kimi 2.7 API 統合を通じて画像入力を分析し、明確なテキスト説明、解説、回答を返します。
- 画像に基づく推論: 視覚的な詳細とユーザーの質問を組み合わせ、商品分析、ドキュメントレビュー、クリエイティブフィードバック、マルチモーダルワークフローを支援します。
- OCR 風の抽出: 可視テキスト、ラベル、インターフェース内容、画像の詳細を抽出し、下流の自動化やデータ処理に活用できます。
- 開発者に扱いやすい API アクセス: 本番ワークフロー向けに設計された安定した Flaq AI ルートを通じて、アプリケーションに画像からテキストへの機能を追加できます。
- 柔軟なプロンプト指示: 自然言語の指示を使って、短いキャプション、詳細分析、構造化要約、タスク別の出力を依頼できます。
- 手頃な視覚ワークフロー: コスト効率の高い Moonshot AI モデルアクセスで、スケーラブルな視覚分析機能を構築できます。
Flaq AI で Kimi 2.7 Image-to-Text API を視覚分析に使う方法
- 入力: 画像入力に自然言語の質問または分析指示を組み合わせます。
- 出力: 視覚内容の説明、情報抽出、質問への回答、画像詳細の要約を行うテキストレスポンス。
- 画像サポート: 商品ビジュアル、スクリーンショット、ドキュメント、クリエイティブ素材など、一般的な画像入力ワークフローで利用できます。
- 機能: Kimi 2.7 API 統合を通じて、画像説明、視覚 QA、OCR 風の読み取り、マルチモーダル推論、スクリーンショット分析、構造化された視覚要約をサポートします。
Kimi 2.7 Image-to-Text API 統合の最適なユースケース
- スクリーンショットと UI 分析: アプリのスクリーンショットを説明、バグメモ、アクセシビリティ観点、構造化レビュー出力へ変換します。
- ドキュメントとフォームのレビュー: 画像から可視フィールド、ラベル、表、ドキュメント詳細を抽出し、内部ツールや自動化に活用します。
- E コマース画像理解: 商品を説明し、属性を特定し、カタログ画像を要約し、モデレーションやマーチャンダイジングのワークフローを支援します。
- クリエイティブ素材のフィードバック: プロンプトで導いた出力により、構図、視覚スタイル、ブランド一貫性、キャンペーンクリエイティブを分析します。
- マルチモーダル AI アシスタント: サポート、教育、生産性プロダクト内で、ユーザーが画像をアップロードして自然言語で質問できるようにします。
注意 画像入力とプロンプトが Moonshot AI および Flaq AI の安全要件に準拠していることを確認してください。エラーが発生した場合は、画像入力またはプロンプトを調整して再試行してください。
Kimi 2.7 Image-to-Text と競合の比較:比較分析
- Kimi 2.7 Image-to-Text vs. GPT Image-to-Text
GPT の画像理解は幅広いマルチモーダル対応を提供します。Kimi 2.7 Image-to-Text API は、Flaq AI を通じて手頃な視覚分析を求めるチーム向けの Moonshot AI 代替手段です。 - Kimi 2.7 Image-to-Text vs. Gemini Image-to-Text
Gemini は Google ネイティブの視覚推論に強みがあります。Kimi 2.7 は、画像説明、OCR 風の抽出、画像 Q&A 向けに、開発者へ別の安定したルートを提供します。 - Kimi 2.7 Image-to-Text vs. Claude Vision
Claude Vision は慎重な画像およびドキュメント解釈に役立ちます。Kimi 2.7 は、スケーラブルなプロダクト統合向けの実用的な画像からテキストへのワークフローに重点を置きます。 - Kimi 2.7 Image-to-Text vs. Grok Image-to-Text
Grok Image-to-Text は視覚分析向けに xAI モデルの挙動を提供します。Kimi 2.7 は、プロバイダーの挙動や応答スタイルを比較するチームに Moonshot AI のマルチモーダルアクセスを提供します。 - Kimi 2.7 Image-to-Text vs. Qwen Vision Models
Qwen の視覚モデルは強力な Alibaba 系オプションです。Kimi 2.7 Image-to-Text API は、本番の視覚理解に向けた Moonshot 搭載の代替手段を開発者に提供します。
