PeumeAPI

AI generation

Generate or Edit Video 4.0

Multimodal video generation and editing with Kling 4.0.

From $0.0005 per unit

Call it

curl https://api.peume.com/v1/call/generate-or-edit-video-4-0 \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "prompt": "your prompt",
    "media": [],
    "resolution": "720p",
    "aspect_ratio": "adaptive",
    "duration": 5,
    "audio": "native"
  }
}'

Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: generate-or-edit-video-4-0.

Parameters

promptRequiredstring

Text prompt (max 26000 characters). Refer to media by the id you gave it (@image_1, @video_1) and say what each reference is for; for edits, state what to change and what to keep. Kling allows 26,000 English or 11,000 non-English characters (mixed text: English / 26,000 + other / 11,000 ≤ 1); only the 26,000 total is checked here, and a longer non-English prompt is rejected by Kling at no charge.

mediaarray

Reference material. Omit for pure text-to-video.

Example: []

resolutionRequiredstring

Output resolution (720p | 1080p) — also the price selector.

720p · 1080p

aspect_ratiostring

Aspect ratio of the output, or adaptive: follow the prompt, else the base video, the first frame, then the feature video (16:9 when none applies). Default adaptive.

21:9 · 16:9 · 9:16 · 1:1 · adaptive

Example: adaptive

durationinteger

Output duration in seconds (3-30). Default 5. Billed per second.

Example: 5

audiostring

native: generate synchronized audio. original: keep the input video's own sound (needs a feature_video or base_video; the base video's audio wins). Default native. No price impact.

native · original

Example: native

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.