Kling Generate
Use DeerAPI to call the Kling Generate endpoint with request details, response details, examples, and an OpenAPI playground.
Overview
Use this endpoint to call the Kling Generate workflow through DeerAPI. The API reference on this page shows the request schema, response schema, authentication requirements, and runnable examples for the configured endpoint.Before you start
Use the DeerAPI base URL and pass your API Key in theAuthorization header:
Model selection
Choose a current model ID from the live pricing page. Model availability changes over time, so avoid copying a model ID from an old project without checking the live list first.Implementation notes
- Use the OpenAPI playground for the exact request fields accepted by this endpoint.
- Keep API Keys on the server side when you build production applications.
- Log the request ID from failed calls so support can investigate the request.
- Retry
429,500, and503responses with exponential backoff.
Authorizations
Use a DeerAPI API Key as a Bearer token.
Headers
Must be application/json.
Body
Text prompt describing the image to generate. Maximum 500 characters.
Elements to exclude from the image. Maximum 200 characters.
Reference image as a Base64 string (without data: prefix) or public URL. Accepted formats: JPG, JPEG, PNG. Maximum 10 MB, minimum 300×300 px.
How closely the output follows the reference image. Range: 0–1.
Number of images to generate. Range: 1–9.
Output aspect ratio (width:height). Options: 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3.
Webhook URL to receive task status updates when the task completes.
Kling image model variant to use. See the Models page for current options.