Skip to main content
POST
/
kling
/
v1
/
videos
/
text2video
cURL
curl https://api.deerapi.com/kling/v1/videos/text2video \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DEERAPI_KEY" \
  -d '{
    "prompt": "A cinematic shot of a quiet city street at sunset."
  }'
{
  "code": 123,
  "message": "<string>",
  "request_id": "<string>",
  "data": {
    "task_id": "<string>",
    "task_status": "<string>",
    "task_status_msg": "<string>",
    "task_info": {
      "external_task_id": "<string>"
    },
    "task_result": {
      "videos": {
        "id": "<string>",
        "url": "<string>",
        "duration": "<string>"
      }
    },
    "created_at": 123,
    "updated_at": 123
  }
}

Overview

Use this endpoint to call the Kling Text To Video 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 the Authorization header:
https://api.deerapi.com
Authorization: Bearer $DEERAPI_KEY

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, and 503 responses with exponential backoff.

Authorizations

Authorization
string
header
required

Use a DeerAPI API Key as a Bearer token.

Headers

Content-Type
string

Body

application/json

Use this field according to the endpoint schema.

prompt
string
default:Hello
required

Use this field according to the endpoint schema.

negative_prompt
string

Use this field according to the endpoint schema.

aspect_ratio
string

Use this field according to the endpoint schema.

callback_url
string

Use this field according to the endpoint schema.

model_name
string
default:kling-v1

Use this field according to the endpoint schema.

cfg_scale
number

Use this field according to the endpoint schema.

mode
enum<string>

Use this field according to the endpoint schema.

Available options:
std,
pro
duration
string

Use this field according to the endpoint schema.

camera_control
object

Use this field according to the endpoint schema.

external_task_id
string

Use this field according to the endpoint schema.

Response

200 - application/json

Use this field according to the endpoint schema.

code
integer
required

Use this field according to the endpoint schema.

message
string
required

Use this field according to the endpoint schema.

request_id
string
required

Use this field according to the endpoint schema.

data
object
required