クイックスタート
API Mall APIを数分で使い始める
1. APIキーの取得
アカウントにサインインし、APIキーページに移動して新しいAPIキーを作成してください。
2. 残高を確認する
curl https://gateway.apimall.ai/api/v1/account/balances \
-H "Authorization: Bearer sk-your-api-key"3. 最初の画像を生成する
curl -X POST https://gateway.apimall.ai/api/v1/images/generate \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-pro",
"prompt": "A beautiful sunset over mountains",
"aspect_ratio": "16:9"
}'返信:
{
"success": true,
"data": {
"task_id": "task_abc123",
"credits_used": 18,
"remaining_credits": 482
}
}4. タスクの状態を確認する
curl https://gateway.apimall.ai/api/v1/images/task_abc123 \
-H "Authorization: Bearer sk-your-api-key"返信:
{
"success": true,
"data": {
"task_id": "task_abc123",
"status": "completed",
"image_url": "https://cdn.example.com/image.png"
}
}完全なコード例
完全な動作例(複数言語対応)