- camera_control: only kling-v1 and kling-v1-5 support it (not v3)
- For preset types (down_back etc.), config must be absent — only
'simple' type uses config fields
- camera_control and image_tail are mutually exclusive in I2V
- cfg_scale not supported by kling-v2.x models — now skipped
- duration sent as string to match API examples
- v3/v3-omni removed from camera control UI list
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Camera/motion control is only supported by kling-v1, kling-v1-5,
kling-v3, kling-v3-omni. Backend silently drops the camera_control
field for all other models. Frontend hides the camera control UI
and auto-clears the selection when switching to an unsupported model.
New models added: kling-v3-omni, kling-video-o1, kling-v1 (cam ctrl),
kling-v2-master. Duration validation loosened for v3/v3-omni (3-15s).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Kling image2video endpoint expects:
image: "<base64>" (no data URI prefix)
image_tail: "<base64>" (optional, for interpolation)
Not image_url/image_tail_url with data URIs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Kling:
- camera_control.type: use preset name directly (down_back etc.), not 'predefined'
- camera_control.config: all 6 integer fields required even for preset types
- duration: cast to integer (API rejects strings)
- I2V images: use image_url/image_tail_url with data URI prefix (not plain base64 in image/image_tail)
Veo:
- image/lastFrame: use inlineData format (Gemini API), not bytesBase64Encoded (Vertex AI)
- durationSeconds: send as string "4"/"6"/"8", not integer
Docker:
- Add uploads.ini: post_max_size=100M, upload_max_filesize=100M, memory_limit=512M
(ini_set cannot override these at runtime in php-fpm)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Kling video generation:
- Full T2V, I2V, extend, and lip sync workflows via Kling API
- V3, V2.6, V2.5 Turbo, V2.1 Master, V1.6 model support
- Resolution selector (720p std / 1080p pro) with model constraints
- Native audio toggle with dialogue input for Kling
- Video ID tracking for extend and lip sync chains
- Camera control presets (pan, tilt, arc)
Prompt optimizer rework:
- Intent-preserving refinement (camera, action, mood are sacred)
- Mode-aware: T2V adds subject/environment detail, I2V describes only motion
- Reference images analyzed for content, not re-described
- Platform-specific quality anchors woven into positive prompt
- Negative prompts removed from optimizer (positive-only approach)
- 15-60 word target for concise, effective prompts
Backend fixes:
- Gemini responseModalities: ['TEXT', 'IMAGE'] for Flash model compatibility
- Veo first-frame resize to exact target dimensions (prevents letterboxing)
- Session directory re-creation in saveImage (auto-cleanup race condition)
- Kling API error logging with HTTP codes and payload details
- Lip sync endpoint updated to /v1/videos/lip-sync with video_id
Frontend stability:
- Tab persistence via CSS hidden (generation survives tab switches)
- Project switch protection (confirm dialog when generation in progress)
- Retina thumbnails (480px/q0.8) for library grid — prevents OOM crashes
- Thumbnail backfill migration for existing project items
- Project items refresh on tab visibility and after save
- 1:1 aspect ratio container for Kling videos
- Expanded video view matches library modal behavior
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add kling-v3 and kling-v3-omni to model selector and backend validation
- Set V3 as the new default model (was V2.6)
- V3 Omni includes built-in audio generation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Integrates Kling AI as a second video engine in the Video Gen tab with
three cinema-relevant workflows: Generate (T2V/I2V with camera control),
Extend (video extension up to 3 min), and Lip Sync (image + audio).
Backend: New kling_api.php with pure PHP JWT auth, all workflows, async
status polling, and CDN video download. Env files updated with Kling
credential placeholders.
Frontend: Engine selector toggle, workflow-specific settings panels,
Kling polling, engine badges in ProjectsTab, rerun support.
Also includes image model toggle changes (Gemini Pro/Flash).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>