Moondream2 Visual Query
Moondream2 is a highly efficient open-source vision language model that combines powerful image understanding capabilities with a remarkably small footprint.
API endpoint
https://lumozai.com/api/v4/run
Use this endpoint to run the model with your parameters. Authentication is required using your API key.
Sample code (PHP cURL)
<?php
// API endpoint URL
$apiUrl = 'https://lumozai.com/api/v4/run';
// Your API key
$apiKey = 'YOUR_API_KEY';
// Model parameters
$params = [
'model_id' => 'moondream2-visual-query',
'image_url' => '',
'query' => '',
];
// Initialize cURL session
$curl = curl_init();
// Set cURL options
curl_setopt_array($curl, [
CURLOPT_URL => $apiUrl,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $params,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'Authorization: Bearer ' . $apiKey
]
]);
// Execute the request
$response = curl_exec($curl);
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
// Check for errors
if (curl_errno($curl)) {
echo 'cURL Error: ' . curl_error($curl);
} else {
// Process the response
$result = json_decode($response, true);
if ($httpCode == 200 && isset($result['success']) && $result['success']) {
// Handle successful response
echo 'Model output: ';
print_r($result['data']['output']);
} else {
// Handle error response
echo 'Error: ' . ($result['message'] ?? 'Unknown error');
}
}
// Close cURL session
curl_close($curl);
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model_id |
string | Required | The ID of the model to run (moondream2-visual-query) |
api_key |
string | Required | Your API key for authentication (sent via Bearer token in the Authorization header) |
image_url |
string | Required | |
query |
string | Required |
Response format
{
"success": true,
"data": {
"output": "https://lumozai.com/storage/outputs/example.png"
}
}
モデル料金
実行した分だけお支払い。月額契約なしで、アカウント残高から直接引き落とされます。
Moondream2 Visual Query API の技術概要と導入ガイド
Moondream2 Visual Query は、LumozAI のサーバーレス GPU インフラストラクチャ上で実行される本番環境対応の AI 推論モデルです。コールドスタートを排除した低レイテンシー設計により、Web アプリケーション、モバイルアプリ、自動ワークフロー、およびクリエイティブ制作パイプラインへ即座に統合できます。
すべての API リクエストは単一の認証キー(Bearer トークン)で統一されており、Python、Node.js、cURL、PHP、および MCP(Model Context Protocol)クライアントから標準的な JSON ペイロードで呼び出すことが可能です。料金は使った分だけの従量課金制で、推論が失敗した場合は自動的にクレジットが返金されるため、開発テストから大規模運用まで安心してご利用いただけます。
よくある質問(FAQ)
いいえ、月額固定費は不要です。チャージしたクレジットから推論ごとに従量課金され、クレジットは1年間有効です。
LumozAI API および Playground で生成されたコンテンツの商用利用が可能であり、入力データが許可なく公開学習に使用されることはありません。
ページ上部の Playground タブからブラウザ上で直接プロンプトを入力して実行できるほか、API タブの cURL / Python サンプルコードをそのままコピーしてローカル環境から呼び出せます。