> ## Documentation Index
> Fetch the complete documentation index at: https://docs.acedata.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Kling Talking Photo API (Kling Talking Photo)

> Kling video generation API guide - Ace Data Cloud

Verwandeln Sie mit einem Klick **ein Foto + eine Audiodatei** in ein „sprechendes Video“. Der Dienst führt intern automatisch zwei Schritte aus: Zuerst wird das Foto mit image2video animiert, dann wird mit lip-sync entsprechend der Audiodatei der Lippenabgleich durchgeführt. Sie müssen nur **einmal** aufrufen.

* **Schnittstellenadresse**：`POST https://api.acedata.cloud/kling/talking-photo`
* **Abrechnung**：Nach Dauer, 5 Sekunden **16.45 Credits**, 10 Sekunden **30.45 Credits** (= kombinierter Preis von image2video + lip-sync)

## Request-Header

| Feld | Wert |
| - | - |
| `authorization` | `Bearer ${API_KEY}` |
| `content-type` | `application/json` |

## Request-Parameter

| Parameter | Typ | Erforderlich | Standard | Beschreibung |
| - | - | - | - | - |
| `image_url` | string | Ja | — | Öffentliche URL des Personenfotos, ein klares Frontalfoto wird empfohlen |
| `audio_url` | string | Ja | — | Öffentliche URL der steuernden Audiodatei（.mp3/.wav/.m4a/.aac,≤5MB） |
| `prompt` | string | Nein | — | Prompt für Bewegungen/Gesichtsausdrücke in der Fotoanimationsphase |
| `model` | string | Nein | `kling-v2-1-master` | Für die Fotoanimation verwendetes Kling-Modell |
| `duration` | integer | Nein | `5` | Videodauer（5 oder 10 Sekunden） |
| `mode` | string | Nein | `pro` | Animationsqualität（std/pro） |
| `callback_url` | string | Nein | — | Bei Übergabe oder bei `async=true` wird `task_id` asynchron zurückgegeben |
| `async` | boolean | Nein | `false` | Asynchroner Modus, in Verbindung mit `/kling/tasks` für Polling oder Callback |

## Request-Beispiel

```bash theme={null}
curl -X POST 'https://api.acedata.cloud/kling/talking-photo' \
  -H 'authorization: Bearer ${API_KEY}' \
  -H 'content-type: application/json' \
  -d '{
    "image_url": "https://cdn.acedata.cloud/4hfydw.jpg",
    "audio_url": "https://cdn.acedata.cloud/6f7d62b18b.wav",
    "duration": 5
  }'
```

## Response-Beispiel

```json theme={null}
{
  "success": true,
  "task_id": "0c0b4d3a-2f1e-4a6b-9c2d-2b3c4d5e6f70",
  "video_id": "895055968777281546",
  "video_url": "https://cdn.acedata.cloud/assets/examples/kling/6c68c267-065b-4423-b66b-a0e4c59ee0d5-6a664a591a53.mp4",
  "source_video_url": "https://cdn.acedata.cloud/assets/examples/gemini/04a043bd-6b23-4b4e-945c-ce48158c3eee-3a89912507c7.mp4",
  "duration": 5,
  "state": "succeed"
}
```

| Feld | Beschreibung |
| - | - |
| `video_url` | Das endgültige sprechende Video（bereits im CDN dieser Plattform gespeichert） |
| `source_video_url` | Das zwischengeschaltete Fotoanimationsvideo（image2video-Ergebnis） |
| `video_id` | Kling-Video-ID |

## Hinweise

* Für das Foto wird ein klares Frontalfoto einer einzelnen Person empfohlen.
* Die Audiodauer sollte die Videodauer (5s/10s) möglichst nicht überschreiten.
* Die Abrechnung erfolgt bei Erfolg; bei fehlgeschlagener Parameterprüfung (4xx) erfolgt keine Abrechnung.
* Die Generierung dauert etwa 4–6 Minuten（zwei Schritte）, die Verwendung von `async=true` + `/kling/tasks` für Polling wird empfohlen.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.