内容更新日: 2026-06-09
Fal.ai 画像
Crazyrouter は Fal.ai の画像生成エンドポイントを代理し、テキストから画像生成と画像編集をサポートします。テキストから画像生成
POST /fal-ai/nano-banana
リクエストパラメータ
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
prompt | string | 必須 | 画像の説明プロンプト |
negative_prompt | string | 任意 | ネガティブプロンプト |
image_size | string | 任意 | 画像サイズ:square_hd、landscape_4_3、portrait_4_3、landscape_16_9、portrait_16_9 |
num_images | integer | 任意 | 生成数、初期値は 1 |
seed | integer | 任意 | ランダムシード |
guidance_scale | number | 任意 | ガイダンス強度 |
num_inference_steps | integer | 任意 | 推論ステップ数 |
リクエスト例
curl -X POST https://api.crazyrouter.com/fal-ai/nano-banana \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"prompt": "A majestic eagle soaring over snow-capped mountains at sunrise",
"image_size": "landscape_16_9",
"num_images": 1
}'
import requests
response = requests.post(
"https://api.crazyrouter.com/fal-ai/nano-banana",
headers={
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_KEY"
},
json={
"prompt": "A majestic eagle soaring over snow-capped mountains at sunrise",
"image_size": "landscape_16_9",
"num_images": 1
}
)
print(response.json())
レスポンス例
{
"images": [
{
"url": "https://fal.media/files/...",
"width": 1344,
"height": 768,
"content_type": "image/jpeg"
}
],
"seed": 42,
"prompt": "A majestic eagle soaring over snow-capped mountains at sunrise"
}
画像編集
POST /fal-ai/nano-banana/edit
リクエストパラメータ
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
prompt | string | 必須 | 編集プロンプト |
image_url | string | 必須 | 元画像のURL |
mask_url | string | 任意 | マスク画像URL |
strength | number | 任意 | 編集強度、0~1 |
リクエスト例
cURL
curl -X POST https://api.crazyrouter.com/fal-ai/nano-banana/edit \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"prompt": "Add a rainbow in the sky",
"image_url": "https://example.com/landscape.jpg",
"strength": 0.6
}'
レスポンス例
{
"images": [
{
"url": "https://fal.media/files/...",
"width": 1024,
"height": 1024,
"content_type": "image/jpeg"
}
]
}
Fal.ai エンドポイントは、複数の基盤モデルをサポートしています。利用可能なモデルについては モデル価格 ページをご参照ください。