Flux Kontext
Flux Kontextモデルによる高度な画像生成と編集
機能
- テキストから画像生成
- スタイル転送
- 画像編集
- 高忠実度出力
料金設定
| Model | Credits |
|---|---|
| flux-kontext-pro | 2 (~$0.02) |
| flux-kontext-max | 4 (~$0.04) |
エンドポイント
POST
/api/v1/images/generateパラメータ
| パラメータ | タイプ | 必須 | 説明 |
|---|---|---|---|
| model | string | 必須 | "flux-kontext-pro" or "flux-kontext-max" |
| type | string | オプション | "text-to-image" or "image-to-image" (default: text-to-image) |
| prompt | string | 必須 | Text description |
| image_urls | string[] | オプション | Input image URLs or base64 for editing/style transfer |
| input_image | string | オプション | Deprecated. Alias for image_urls[0] |
| image_size | string | オプション | Output image size (e.g. 1024x1024) |
リクエストの例
{
"model": "flux-kontext-pro",
"type": "image-to-image",
"prompt": "Transform into a watercolor painting style",
"image_urls": ["https://tempfile.aiquickdraw.com/workers/nano/image_1772780968156_ygk0zm.png"]
}レスポンス例
{
"success": true,
"data": {
"task_id": "task_flux123",
"credits_used": 2,
"remaining_credits": 498
}
}コード例
curl -X POST https://gateway.bananapro.site/api/v1/images/generate \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "flux-kontext-pro",
"type": "image-to-image",
"prompt": "Transform into a watercolor painting style",
"image_urls": ["https://tempfile.aiquickdraw.com/workers/nano/image_1772780968156_ygk0zm.png"]
}'