Skip to main content
POST
/
flux
/
v1
/
:model
提交任务
curl --request POST \
  --url https://gptproto.com/flux/v1/:model \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "<string>",
  "input_image": "<string>",
  "input_image_2": "<string>",
  "input_image_3": "<string>",
  "input_image_4": "<string>",
  "seed": 123,
  "aspect_ratio": "<string>",
  "output_format": "<string>",
  "webhook_url": "<string>",
  "webhook_secret": "<string>",
  "prompt_upsampling": true,
  "safety_tolerance": 123
}'
{
  "error": {
    "message": "Invalid request parameters",
    "type": "invalid_request_error",
    "code": "invalid_parameters"
  }
}

Overview

参数描述,请参考官方文档 https://docs.bfl.ai/api-reference/tasks/edit-or-create-an-image-with-flux-kontext-pro

Authentication

This endpoint requires authentication using a Bearer token.
Authorization
string
required
Your API key in the format: Bearer YOUR_API_KEY

Path Parameters

string
模型名称,目前支持 flux-kontext-pro flux-kontext-max

Request Body

prompt
string
required
Prompt parameter
input_image
string
Input Image parameter
input_image_2
string
Input Image 2 parameter
input_image_3
string
Input Image 3 parameter
input_image_4
string
Input Image 4 parameter
seed
integer
Seed parameter
aspect_ratio
string
Aspect Ratio parameter
output_format
string
Output Format parameter
webhook_url
string
Webhook Url parameter
webhook_secret
string
Webhook Secret parameter
prompt_upsampling
boolean
Prompt Upsampling parameter
safety_tolerance
integer
Safety Tolerance parameter

Request Example

curl -X POST "https://gptproto.com/flux/v1/:model" \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "ein fantastisches bild",
  "input_image": "<string>",
  "input_image_2": "<string>",
  "input_image_3": "<string>",
  "input_image_4": "<string>",
  "seed": 42,
  "aspect_ratio": "<string>",
  "output_format": "jpeg",
  "webhook_url": "<string>",
  "webhook_secret": "<string>",
  "prompt_upsampling": false,
  "safety_tolerance": 2
}'

Response

Success
200
Successful response
{
  "status": "success"
}

Error Responses

{
  "error": {
    "message": "Invalid request parameters",
    "type": "invalid_request_error",
    "code": "invalid_parameters"
  }
}