models

Zhipu AI: CogVideoX 2

Markdown · JSON

Zhipu AI: CogVideoX 2

CogVideoX 2 generates video from a text description or a supplied image. The maker documents selectable frame sizes, 30 or 60 fps, quality or speed modes and optional generated sound effects for shaping a short visual scene.

About the model

This description covers the model’s capabilities. Available in Ailoot inputs, outputs and options are listed for the selected method below.

CogVideoX 2 is Zhipu AI’s video-generation model for a written scene description or a supplied image. Text establishes the subject, setting and action; an image can provide the visual basis for the generated sequence. Use the input that best represents the material already available for the shot, then describe the visible motion the finished video should contain.

For text-driven creation, define one coherent event. A person opening a workshop door, a small boat moving past a pier or an object turning under steady light each gives the shot a readable purpose. State the important subject features, the viewpoint and the direction of movement. Choose an ending that can be used in the intended edit rather than leaving the scene’s final composition unspecified.

For image-based creation, prepare a clear view of the subject and describe how the scene should move from it. The maker accepts PNG, JPEG and JPG references up to 5 MB, supplied by image URL or encoded image data. Keep important edges, facial features and object details visible in the reference, and leave space for the requested action within the composition.

The maker limits the written prompt to 512 characters. Use this space for the decisive details: subject, action, setting and viewpoint. A short description that explains which object moves and what remains fixed is easier to assess than a list of broad style adjectives. If the result misses the goal, revise the instruction tied to the observed motion or framing problem.

The published output sizes include square, landscape and portrait formats, with choices ranging from 720×480 through 3840×2160 pixels. The maker also documents 30 or 60 frames per second. Select the shape and frame rate for the destination before generation, then inspect the actual clip to see whether the subject and its important details remain readable in that framing.

Quality and speed are named output modes in the maker’s workflow. Optional AI-generated sound effects are controlled separately from the visual brief. Retain the selected mode and sound-effect setting with the prompt and any reference image so different candidate clips can be compared using their actual generation settings.

Generation is asynchronous: a task identity is returned before the finished video is available. Keep that identity through result checking and preserve all completed video files associated with the operation. Save the clip itself for editing, together with the source image when used, rather than depending on a temporary result location or a preview frame.

Review the entire sequence for continuity, timing and the requested action. A product shot needs stable shape and material details through movement; a character shot needs coherent appearance and gestures. Check the final composition and any generated sound against the shot’s purpose. Keep the successful scene elements when revising a concrete mismatch, and use the same viewing conditions to compare the original and revised videos.

Ailoot Ultra · Video POST /v1/videos cogvideox-2

cogvideox-2

Zhipu AI /cogvideox-2

Overview

CogVideoX 2 generates video from a text description or a supplied image. The maker documents selectable frame sizes, 30 or 60 fps, quality or speed modes and optional generated sound effects for shaping a short visual scene.

Accepted inputs
Text
Results
Video

Available in Ailoot · inputs & methods

Ailoot Ultra · Video POST /v1/videos
Input types
text
Output types
video
FieldTypeRequirementValues & limitsDefault
FieldmodelTypestringRequirementRequiredValues & limits
cogvideox-2
Conditions: Use the exact Ailoot model selector.
Default—
FieldpromptTypestringRequirementRequiredValues & limits
Conditions: Describe the scene and motion.
Default—
FieldqualityTypebooleanRequirementOptionalValues & limits
Conditions: Optional quality flag; this selected schema supplies no compatible enum or default.
Default—
Fieldwith_audioTypebooleanRequirementOptionalValues & limits
Conditions: Generate AI sound effects when enabled.
Defaultfalse
FieldsizeTypestringRequirementOptionalValues & limits
Conditions: Supply the documented size string when selecting explicit dimensions.
Default—
FieldfpsTypestringRequirementOptionalValues & limits
30, 60
Conditions: Frame rate is represented as a string on this selected native method.
Default30
FielddurationTypestringRequirementOptionalValues & limits
5, 10
Conditions: Duration in seconds is represented as a string on this selected native method.
Default5
Method parameters and lifecycle
ParameterContract
Parametercontent_typeContractapplication/json
ParameterrequiredContractmodel, prompt
ParameteroptionalContractquality, with_audio, size, fps, duration
Parametermaterial_typesContracttext
ParameterconditionsContractUse the exact Ailoot model selector., Describe the scene and motion., Optional quality flag; this selected schema supplies no compatible enum or default., Generate AI sound effects when enabled., Supply the documented size string when selecting explicit dimensions., Frame rate is represented as a string on this selected native method., Duration in seconds is represented as a string on this selected native method.

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.

ConfigurationRate scheduleForecast quantityBilling quantityCharge
ConfigurationBase token ratesRate scheduleBase rateForecast quantity—Billing 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
ConfigurationPer requestRate schedule—Forecast quantity—Billing quantityone requestCharge
Input · Estimate for comparison only $0.2 per request
ConfigurationEstimated generation costRate schedule—Forecast quantityone generation estimateBilling quantity—Charge
Output · Estimated generation cost · Estimate for comparison only $0.2 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

curl · create once and retain receiptRead the original taskSave every completed owned asset
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
cat > request.json <<'JSON'
{
  "model": "cogvideox-2",
  "prompt": "A cat is walking on grass."
}
JSON
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
# Create once; retain id, polling_url, original task identifiers and every 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}/content
  • GET /v1/media/assets
  • GET /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
FieldType
FieldidTypestring
Fieldpolling_urlTypestring
Fieldprovider_task_idTypestring
FieldidTypestring
Fieldtask_statusTypestring
Fieldvideo_result[].urlTypestring

Aliases

Model aliases

Ailoot Ultra cogvideox-2

Method path aliases

/v1/videos/generations

Related caller IDs

cogvideox-2

FAQ · Zhipu AI: CogVideoX 2
What inputs and results are available?

POST /v1/videos · cogvideox-2: text → video

Which fields does the request use?

POST /v1/videos · cogvideox-2: model, prompt, quality, with_audio, size, fps, duration

More details

Connect Ailoot to Claude Code, OpenCode, Hermes or your own app.

The company and its project portfolio

The company and its project portfolio: millions of customers; monthly sales in the billions.

Buy tokens at a discount.

Subscription discounts for regular use. Promo codes offer up to 50% off token purchases.

Subscription
Choose a discounted plan for your regular requests.
Promo code: up to 50% off
Enter your code at checkout. The price updates to reflect the current promotion.
Spending in your history
The model, tokens and amount are recorded for each request.

Choose a subscription · View model prices

Connect the API to a product you sell.

Use Ailoot in SaaS, apps and bots under its official service offer and licence agreement. Request a reseller licence for resale.

Commercial application
Add text, image, video and audio generation to paid features in your service.
Reseller licence
Send a description of your project and how you provide access. Request written terms for use and resale.
Documents on the website
The service offer, licence agreement and data processing policy are available before you connect.

Request a reseller licence · Service offer and licence agreement