Kling v2.1
Kling v2.1 generates videos from a reference image and a written motion brief. Its documented image-to-video entry lists five- and ten-second duration choices, with std and pro modes for planning the sequence.
About the model
This description covers the model’s capabilities. Available in Ailoot inputs, outputs and options are listed for the selected method below.
Kling v2.1 is a Kling video model with image-to-video capability in the documented catalogue. Begin with a reference still that establishes the scene, then describe the motion that turns it into a useful shot. A product image, illustrated setting or character frame can supply the composition from which the sequence develops.
Choose a reference that makes the intended action possible to understand. A subject positioned beside a door gives a clear starting point for entering a room; an object placed on an uncluttered surface makes its outline easier to inspect. Preserve the reference at its original quality and keep it associated with the generated clip.
Describe one coherent piece of action. Specify the subject, direction of movement and intended final state. For an interaction, explain the relationship between the participants: who reaches, what is touched and where the action ends. Use visible details that can be checked in the resulting sequence.
Frame the shot for its destination. The documented image-to-video entry lists landscape, portrait and square ratios, with five- and ten-second duration choices. Establish where the subject should remain within the selected frame. A portrait composition and a wide establishing shot place different demands on the same movement.
The documented image-to-video controls include std and pro generation modes. Keep the chosen mode with the result when comparing candidates. Assess the output against the brief: the requested action, composition, subject appearance and timing. A mode label alone does not describe how well an individual shot meets those needs.
Use camera direction to support the event. A fixed camera can show a changing pose, a lateral movement can reveal a setting and a forward movement can emphasize a detail. State the intended relationship between subject and viewpoint so camera motion does not compete with the action the viewer needs to follow.
Review continuity through the whole clip. For a product, inspect shape, markings and material appearance as the viewpoint changes. For a person, inspect facial features, hands, clothing and contact with nearby objects. Check the final composition in the context of the next shot or graphic in the edit.
Save the completed video, reference, prompt and selected settings as one shot record. When revising, identify the specific visual mismatch and retain the parts that already serve the scene. Compare candidates at the same playback size and speed so the choice reflects the motion and composition the audience will actually see.
Ailoot Ultra · Video POST /v1/videos kling-v2-1
kling-v2-1Overview
Kling v2.1 generates videos from a reference image and a written motion brief. Its documented image-to-video entry lists five- and ten-second duration choices, with std and pro modes for planning the sequence.
- Accepted inputs
- Text · Images
- Results
- Video
Available in Ailoot · inputs & methods
Ailoot Ultra · Video POST /v1/videos
- Input types
text,image- Output types
video
| Field | Type | Requirement | Values & limits | Default |
|---|---|---|---|---|
Fieldmodel | Typestring | RequirementRequired | Values & limits kling-v2-1 Conditions: Use this exact Ailoot routing selector. | Default— |
Fieldmode | Typestring | RequirementOptional | Values & limits std, pro Conditions: Use the selected-model documented field and listed choices; omit an unspecified optional value. | Defaultstd |
Fieldaspect_ratio | Typestring | RequirementOptional | Values & limits 16:9, 9:16, 1:1 Conditions: Use the selected-model documented field and listed choices; omit an unspecified optional value. | Default— |
Fieldduration | Typeinteger | RequirementOptional | Values & limits 5, 10 Conditions: Use the selected-model documented field and listed choices; omit an unspecified optional value. | Default— |
Fieldend_image | Typestring | RequirementOptional | Values & limits Conditions: Use the selected-model documented field and listed choices; omit an unspecified optional value. | Default— |
Fieldimage | Typestring or array<string> | RequirementRequired | Values & limits Conditions: Supply your actual reachable image URL. A list is accepted only where the parameter schema lists an array. | Default— |
Fieldnegative_prompt | Typestring | RequirementOptional | Values & limits Conditions: Use the selected-model documented field and listed choices; omit an unspecified optional value. | Default— |
Fieldprompt | Typestring | RequirementRequired | Values & limits Conditions: Use the selected-model documented field and listed choices; omit an unspecified optional value. | Default— |
Method parameters and lifecycle
| Parameter | Contract |
|---|---|
Parametercontent_type | Contractapplication/json |
Parameterrequired | Contractmodel, prompt, image |
Parameteroptional | Contractmode, aspect_ratio, duration, end_image, negative_prompt |
Parametermaterial_types | Contracttext, image |
Parameterconditions | ContractUse this exact Ailoot routing selector., Use the selected-model documented field and listed choices; omit an unspecified optional value., Use the selected-model documented field and listed choices; omit an unspecified optional value., Use the selected-model documented field and listed choices; omit an unspecified optional value., Use the selected-model documented field and listed choices; omit an unspecified optional value., Supply your actual reachable image URL. A list is accepted only where the parameter schema lists an array., Use the selected-model documented field and listed choices; omit an unspecified optional value., Use the selected-model documented field and listed choices; omit an unspecified optional value. |
Method aliases: /v1/videos/generations
Lifecycle: submit_once_poll_original
GET /v1/videos/{request_id}
GET /v1/videos/generations/{request_id}
GET /v1/videos/{request_id}/content
GET /v1/media/assets
GET /v1/media/assets/{asset_id}
Pricing
How the final charge is calculated
The displayed rates estimate the cost before generation. The final charge is calculated from the cost recorded for the original generation. Measured output duration and forecast quantities are not the final billable quantity.
Tariff references do not add request options. Supported parameters are listed for the selected method.
- Fast mode
- Not specified When fast mode is selected
- Flex mode
- Not specified When flex mode is selected
- Maximum reasoning effort
- Not specified When maximum reasoning effort uses the default adjustment
Estimated rates for comparison
Prices by configuration
Match each charge to the conditions shown. Use one rate for each set of alternative configurations.
| Configuration | Rate schedule | Forecast quantity | Charge |
|---|---|---|---|
| ConfigurationBase token rates | Rate scheduleBase rate | Forecast quantity— | Charge Input · Input tokens · Estimate for comparison only — / 1K tokens Output · Output tokens · Estimate for comparison only — / 1K tokens Input · Cache read · Estimate for comparison only — / 1K tokens Input · Cache write · Estimate for comparison only — / 1K tokens Input · Cache write, 1 hour · Estimate for comparison only — / 1K tokens |
| ConfigurationEstimated generation cost | Rate schedule— | Forecast quantityone generation estimate | Charge Output · Estimated generation cost · Estimate for comparison only $6 estimate before generation This estimate is not an additional charge or a fixed rate for the completed generation. |
Ailoot reserves an estimated amount before a request. After the result, it settles the final charge from measured usage. Streaming settlement uses the final usage record. How reservation and settlement work →
Example requests
Ailoot Ultra · Video
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
export AILOOT_API_KEY
: "${AILOOT_IMAGE_URL:?Set an actual customer material or documented value}"
export AILOOT_IMAGE_URL
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "kling-v2-1", "prompt": "A cat is walking on grass.", "image": "YOUR_ACCESSIBLE_IMAGE_URL"}')
p['image']=os.environ['AILOOT_IMAGE_URL']
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/videos \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
# Submit once. Retain the complete result, original identifiers and every response header.
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
export AILOOT_API_KEY
python3 - <<'PY_STATUS'
import json,os,subprocess
from pathlib import Path
from urllib.parse import urljoin,urlsplit
r=json.loads(Path("result.json").read_text())
u=urljoin("https://api.ailoot.ai",r["polling_url"])
p=urlsplit(u)
if p.scheme!="https" or p.netloc!="api.ailoot.ai" or p.username or p.password:
raise SystemExit("Unexpected returned polling URL; preserve the response")
subprocess.run(["curl","--fail-with-body","--silent","--show-error",u,"-H","Authorization: Bearer "+os.environ["AILOOT_API_KEY"],"-D","status-headers.txt","-o","status.json"],check=True)
# Read this same original polling_url again while pending.
# Preserve unknown/result_pending_check; do not repeat creation.
PY_STATUS
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
export AILOOT_API_KEY
python3 - <<'PY_ASSETS'
import json,os,subprocess
from pathlib import Path
from urllib.parse import urljoin,urlsplit
r=json.loads(Path("status.json").read_text())
roles={}
def visit(v,path=""):
if isinstance(v,dict):
for k,x in v.items(): visit(x,path+"/"+k)
elif isinstance(v,list):
for i,x in enumerate(v): visit(x,path+"/"+str(i))
elif isinstance(v,str):
u=urljoin("https://api.ailoot.ai",v); p=urlsplit(u)
if p.scheme=="https" and p.netloc=="api.ailoot.ai" and not p.username and not p.password and p.path.startswith("/v1/media/assets/") and p.path.endswith("/content"):
roles.setdefault(u,[]).append(path)
visit(r)
if not roles: raise SystemExit("No completed owned assets; retain the original status")
manifest=[]
for i,(u,paths) in enumerate(roles.items()):
target=Path(f"asset-{i}.bin")
subprocess.run(["curl","--fail-with-body","--silent","--show-error",u,"-H","Authorization: Bearer "+os.environ["AILOOT_API_KEY"],"-o",str(target)],check=True)
raw=target.read_bytes()
if not raw: raise SystemExit("Empty asset; retain original status and metadata")
ext="glb" if raw[:4]==b"glTF" else "png" if raw[:8]==b"\x89PNG\r\n\x1a\n" else "jpg" if raw[:3]==b"\xff\xd8\xff" else "webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else "mp4" if raw[4:8]==b"ftyp" else "bin"
name=f"asset-{i}.{ext}"
if target.name!=name: target.rename(name)
manifest.append({"file":name,"response_paths":paths,"bytes":len(raw)})
Path("asset-manifest.json").write_text(json.dumps(manifest,indent=2))
print("Saved",len(manifest),"unique owned assets; every response role retained")
PY_ASSETS
Receive and save results
Ailoot Ultra · Video
GET /v1/videos/{request_id}GET /v1/videos/generations/{request_id}GET /v1/videos/{request_id}/contentGET /v1/media/assetsGET /v1/media/assets/{asset_id}
Keep all completed results
Save every completed video or returned file; retrieve every actual returned asset URL.
Retain the complete response and headers, original identifiers, every actual output and all usage/accounting fields. Save each unique owned asset and retain every role pointing to it.
If the original response needs checking
Keep the returned public task or operation id and all headers. Read only the original task; unknown or result_pending_check does not authorize another creation.
Response fields
| Field | Type |
|---|---|
Fieldid | Typestring |
Fieldpolling_url | Typestring |
Fieldprovider_task_id | Typestring |
Fieldtask_id | Typestring |
Fieldstatus | Typestring |
Fieldvideo_url | Typestring |
Errors and next steps
| Response | Condition | Next step |
|---|---|---|
Response400 · invalid_request_error | ConditionA required field, model selector, type or input representation is invalid. | Next stepInspect the returned validation detail before preparing a separate request. |
Response | ConditionThe original request or result is unknown or requires a check. | Next stepKeep original identifiers and headers; read only supported status/library records. Do not submit creation again. |
Aliases
Model aliases
Ailoot Ultra kling-v2-1
Method path aliases
/v1/videos/generations
Related caller IDs
FAQ · Kling v2.1
- What inputs and results are available?
POST /v1/videos·kling-v2-1:text,image→video- Which fields does the request use?
POST /v1/videos·kling-v2-1:model,mode,aspect_ratio,duration,end_image,image,negative_prompt,prompt