guantao 9621c2df3b add kling and jimeng to tools. 5 dias atrás
..
tests 9621c2df3b add kling and jimeng to tools. 5 dias atrás
.python-version 9621c2df3b add kling and jimeng to tools. 5 dias atrás
README.md 9621c2df3b add kling and jimeng to tools. 5 dias atrás
kling_client.py 9621c2df3b add kling and jimeng to tools. 5 dias atrás
main.py 9621c2df3b add kling and jimeng to tools. 5 dias atrás
pyproject.toml 9621c2df3b add kling and jimeng to tools. 5 dias atrás

README.md

Kuaishou Kling AI Tool

A unified HTTP API wrapper for Kuaishou Kling AI services, supporting AI video generation, AI image generation, and AI lip sync.

Features

  • AI Image Generation: Generate 1-4 images from text prompts
  • AI Video Generation: Create videos from text or images with optional audio
  • AI Lip Sync: Add lip sync effects to videos using text or audio

API Endpoints

POST /generate

Create a generation task.

Request Body:

{
  "biz_type": "aiImage|aiVideo|aiLipSync",
  "prompt": "your prompt here",
  "aspect_ratio": "16:9",
  "image_count": 4,
  "cookie": "optional authentication cookie"
}

Response:

{
  "task_id": "task_123",
  "status": "process|finished|failed",
  "result": {
    "images": ["url1", "url2"],
    "videos": ["url1"]
  }
}

GET /status/{task_id}

Query task status.

Query Parameters:

  • biz_type: Business type (aiImage, aiVideo, aiLipSync)
  • cookie: Optional authentication cookie

Installation

cd tools/local/kuaishou_kling
uv sync

Running

uv run python main.py [port]

Default port: 8000

Testing

uv run python tests/test_core.py

Tool Registration

This tool has been registered to the tool registry with:

  • Tool ID: kuaishou_kling
  • Category: ai_generation
  • Runtime: local (uv environment)
  • Port: 8000