Skip to main content
POST
/
generate
/
k
/
flux2-pro-text-to-image
Flux 2 Pro Text-to-Image
curl --request POST \
  --url https://api.sinancode.com/v1/generate/k/flux2-pro-text-to-image \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "Hyperrealistic supermarket blister pack on clean olive green surface",
  "aspect_ratio": "auto",
  "resolution": "1K"
}
'
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}
Generate professional-grade images from text using Black Forest Labs’ FLUX.2 Pro model. Key Features:
  • Photorealistic Quality - 32B parameters with realistic lighting and physics, eliminating AI artifacts
  • 4MP Ultra High Resolution - Generate highly detailed images up to 4 megapixels
  • Precise Typography - Reliably generate legible text, UI elements, and infographics
  • Brand Color Control - Specify exact brand colors via HEX codes

Authorizations

Authorization
string
header
required

Please use your API Token for authentication

Body

application/json

Task parameters

prompt
string
required

Prompt (required, 3-5000 characters)

Required string length: 3 - 5000
Example:

"Hyperrealistic supermarket blister pack on clean olive green surface"

aspect_ratio
enum<string>
default:auto

Aspect ratio (optional, default 1:1)

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"