4Z API

text-to-video

Endpoint: POST https://4zapi.com/kling/text-to-video/kling-3.0-turbo

Parameters

  • Content-Type (header, string): Request body Content-Type, usually application/json
  • Accept (header, string): Expected response Content-Type
  • Authorization (header, string): Bearer API Key

Request body (application/json)

  • contents (array<object>): [Alternative] Prompt array form, mutually exclusive with top-level prompt. Each item type must be "prompt" (text-to-video does not support first_frame). Gateway extracts contents[].text into top-level prompt then forwards upstream.
  • options (object): Task control parameters, all optional.
  • prompt (string): [Recommended] top-level prompt. max 3072 characters. full-width punctuation(, ; : )auto-converted to half-width by the gateway. Mutually exclusive with contents[]; if both are set, contents[] is ignored.
  • settings (object): Generation params, all optional. Gateway defaults when missing: resolution=720p, aspect_ratio=16:9, duration=5.

Request example

{
  "contents": [
    {
      "text": "A cat running",
      "type": "prompt"
    }
  ],
  "settings": {
    "duration": 5,
    "resolution": "720p"
  }
}