Kling AI icon

Kling AI

Consume Kling AI API

Actions12

Overview

This node interacts with the Kling AI API to manage virtual try-on tasks. Specifically, the "Get" operation under the "Virtual Try-on" resource retrieves details about a previously created virtual try-on task by its Task ID.

Typical use cases include:

  • Checking the status or results of a virtual try-on process where a human image and clothing image were combined.
  • Automating workflows that depend on the completion or output of virtual try-on tasks.
  • Integrating virtual try-on previews into e-commerce platforms or fashion apps.

Example: After submitting a virtual try-on creation request, you can use this node to poll for the task's completion and retrieve the generated try-on images or metadata.

Properties

Name Meaning
API Token JWT token for authenticating with the Kling AI API. Must be generated with specified header and payload; do not include "Bearer" prefix.
Task ID The unique identifier of the virtual try-on task whose details you want to retrieve.

Output

The node outputs JSON data representing the response from the Kling AI API for the requested virtual try-on task. This typically includes:

  • Status information about the virtual try-on task (e.g., pending, completed, failed).
  • Result data such as URLs or Base64-encoded images of the try-on output.
  • Metadata related to the task like timestamps, model used, or any error messages if applicable.

No binary data output is indicated for this operation.

Dependencies

  • Requires access to the Kling AI API endpoint at https://api.klingai.com.
  • An API authentication token in JWT format must be provided as the "API Token" property.
  • No additional external services or environment variables are explicitly required beyond the API token.

Troubleshooting

  • Authentication Errors:
    If the node throws an authentication failure error, verify that your JWT token is correctly generated according to Kling AI specifications and does not include the "Bearer" prefix.

  • Missing Task ID:
    Ensure the "Task ID" property is set and corresponds to a valid virtual try-on task. Omitting or providing an invalid ID will cause errors or empty responses.

  • API Response Issues:
    Network issues or incorrect API endpoint usage may result in no response or error messages. Check network connectivity and confirm the API URL has not changed.

  • Continue On Fail Behavior:
    If enabled, the node will output error details in the JSON field instead of stopping execution, which can help in debugging batch operations.

Links and References

  • Kling AI API Documentation (general reference): https://docs.klingai.com/
  • JWT Token Generation Guidelines: Refer to Kling AI API docs for correct JWT header and payload structure.

Discussion