4Z API

/fal-ai/flux-pro/kontext/max/text-to-image

Endpoint: POST https://4zapi.com/fal-ai/flux-pro/kontext/max/text-to-image

Official documentation: https://fal.ai/models/fal-ai/flux-pro/kontext/max/text-to-image

Request body (application/json)

  • prompt (string, required): Tips for generating images.
  • aspect_ratio (string): The aspect ratio of the generated image. Default value: "1:1" Support: 21:9, 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 9:21
  • guidance_scale (number): The CFG (Classifier Free Guidance) scale is a measure of how closely you want the model to follow the cues when finding relevant images. Default value: 3.5 Range value 1-20
  • num_images (integer): The number of images generated. Default value: 1 Range value 1-4
  • output_format (string): The format of the generated image. Default value: "jpeg" supports default, png, jpeg
  • safety_tolerance (string): The safety tolerance level of the generated image. 1 is the strictest and 5 is the loosest. Default value: "2"

Request example

{
  "aspect_ratio": "1:1",
  "guidance_scale": 3.5,
  "num_images": 1,
  "output_format": "jpeg",
  "prompt": "Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word \"FLUX\" is painted over it in big, white brush strokes with visible texture.",
  "safety_tolerance": "2"
}