クイックスタート
写真から GLB まで数分で。
1. API キーを作成
サーバーの環境変数に保管してください。
export WANDY3D_API_KEY="hg_live_…"2. 残高をチャージ
$5 から。無料の呼び出しでいつでも残高を確認できます。
curl https://api.wandy3d.com/api/platform/balance \ -H "Authorization: Bearer $WANDY3D_API_KEY"# → {"balance_usd": "<balance>", "month_spent_usd": "<spent>", …}3. モデルを生成
写真を送り、タスクをポーリングし、GLB をダウンロード。料金は残高から差し引かれ、応答に表示されます。
# 1. Start a generation from a photo (Wandy 2)curl -s -X POST "https://api.wandy3d.com/generate/cloud/ultra" \ -H "Authorization: Bearer $WANDY3D_API_KEY" \ -F "file=@photo.jpg"# → {"task_id": "<task_id>", "status": "queued", "billing": {"cost_usd": "<price>", "balance_usd": "<balance>"}, …}# 2. Poll until "status" is "done"curl -s "https://api.wandy3d.com/task/<task_id>/status" \ -H "Authorization: Bearer $WANDY3D_API_KEY"# → {"status": "done", "model_id": "<model_id>", …}# 3. Get a download link, then download the GLBcurl -s "https://api.wandy3d.com/model/<model_id>/export?format=glb" \ -H "Authorization: Bearer $WANDY3D_API_KEY"# → {"status": "ready", "url": "<download_url>", "filename": "<name>.glb", …}curl -L -o model.glb "<download_url>"4. 知っておくと便利
請求、エラー、上限の動作。
- すべての応答に請求情報有料呼び出しは billing.cost_usd と billing.balance_usd、さらに X-Wandy-Cost-USD / X-Wandy-Balance-USD ヘッダーを返します。
- エラー402 insufficient_balance / monthly_limit_reached / key_limit_reached、429 rate_limited / too_many_jobs。エラーはすべてコードとメッセージを含む JSON です。
- 自動返金失敗したジョブは残高に返金されます。受け取っていないモデルにお金を払うことはありません。
- 上限キーごとに毎分 60 リクエスト、アカウントごとに同時 5 ジョブ。月間上限は上限ページで設定できます。
