4Z API

Vincentian picture

Endpoint: POST https://4zapi.com/kling/v1/images/generations

Generate images based on text prompt words.

Request body (application/json)

  • model_name (string, required): Image model version ["kling-v1", "kling-v1-5", "kling-v2", "kling-v2-1"]
  • prompt (string, required): Image description prompt words
  • aspect_ratio (string): Aspect ratio, e.g. 16:9, 9:16, 1:1 ["16:9", "9:16", "1:1", "4:3", "3:4"]
  • callback_url (string): callback URL
  • image_fidelity (number): Image fidelity (picture-to-picture scene)
  • n (integer): Generate quantity
  • negative_prompt (string): negative cue word
  • resolution (string): Output resolution ["1k", "2k"]

Request example

{
  "aspect_ratio": "1:1",
  "model_name": "kling-v1-5",
  "n": 1,
  "prompt": "一只可爱的橘猫坐在窗台上,水彩风格",
  "resolution": "1k"
}