Skip to main content
POST
/
generate
/
k
/
flux2-flex-image-to-image
Flux 2 Flex Image-to-Image
curl --request POST \
  --url https://api.sinancode.com/v1/generate/k/flux2-flex-image-to-image \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input_urls": [
    "https://example.com/image1.png",
    "https://example.com/image2.png"
  ],
  "prompt": "Replace the can in image 2 with the can from image 1",
  "aspect_ratio": "auto",
  "resolution": "1K"
}
'
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}
Edit images using Black Forest Labs’ FLUX.2 Flex model. Key Features:
  • Adjustable Quality-Speed Tradeoff - Control generation steps to balance quality and speed
  • Superior Text Rendering - Industry-leading text generation for posters and product images
  • Multi-Reference Blending - Blend up to 10 reference images while maintaining style consistency
  • High Resolution Editing - Supports up to 4MP resolution with excellent detail preservation

Authorizations

Authorization
string
header
required

Please use your API Token for authentication

Body

application/json

Task parameters

input_urls
string[]
required

Input image URL list (required, 1-8 images)

Required array length: 1 - 8 elements
Example:
[
"https://example.com/image1.png",
"https://example.com/image2.png"
]
prompt
string
required

Prompt (required, 3-5000 characters)

Required string length: 3 - 5000
Example:

"Replace the can in image 2 with the can from image 1"

aspect_ratio
enum<string>
default:auto

Aspect ratio (optional, default auto)

Available options:
1:1,
4:3,
3:4,
16:9,
9:16,
3:2,
2:3,
auto
Example:

"auto"

resolution
enum<string>
default:1K

Resolution (optional, default 1K)

Available options:
1K,
2K
Example:

"1K"

Response

OK

task_id
string
required

Task ID

Example:

"01234567-89ab-cdef-0123-456789abcdef"