## Basic tool info Tool name: THUDM/CogVideoX-2b Tool description: Entry-level model, balancing compatibility. Low cost for running and secondary development. Tool cover: https://cdn.wiro.ai/uploads/models/CogVideoX-2b-cover.mp4 Tool categories: - model - cogvideo - text-to-video - checkpoint-folder - fp16 - quick-showcase Tool tags: - text-to-video - diffusers - safetensors - english - cogvideoxpipeline - cogvideox - video-generation - thudm - apache-2.0 Run Task Endpoint (POST): https://api.wiro.ai/v1/Run/THUDM/CogVideoX-2b Get Task Detail Endpoint (POST): https://api.wiro.ai/v1/Task/Detail ## Tool Inputs: - name: prompt label: prompt help: prompt-help type: textarea default: A sprawling futuristic city illuminated by neon lights, with flying cars zipping through the air. The skyline is filled with towering skyscrapers, and holographic advertisements flicker on every corner. The camera zooms through the streets, capturing the hustle and bustle of a technologically advanced society. - name: steps label: inferencesteps help: inferencesteps-help type: number default: 50 - name: scale label: guidancescale help: guidancescale-help type: float default: 6.0 - name: seed label: seed help: seed-help type: text default: 123456 ## Tool Parameter Inspires: - prompt: A majestic view of an untouched tropical rainforest during sunrise, with vibrant green foliage glistening from morning dew, sunlight breaking through the thick canopy of trees, exotic colorful birds like toucans and parrots flying in slow motion, a gentle mist covering the ground, and a small stream flowing over mossy rocks, accompanied by the faint sounds of chirping birds and rustling leaves. - negativePrompt: No human activity, no signs of deforestation, no dull or gray colors, no buildings, no vehicles, no flat landscapes, no low resolution, no cluttered composition. - prompt: An ancient stone castle standing tall on a grassy hilltop, surrounded by a dense morning fog, its weathered walls glowing faintly in the golden light of dawn, with distant silhouettes of knights on horseback patrolling the grounds, and the faint fluttering of flags bearing medieval crests. A soft breeze rustling the tall grass adds a timeless atmosphere. - negativePrompt: No modern elements, no power lines, no trash, no futuristic objects, no artificial lighting, no bright neon colors, no crowds of tourists. - prompt: A vibrant underwater scene teeming with life, featuring a majestic sea turtle gliding gracefully above a colorful coral reef, schools of fish shimmering in the sunlight, small sharks swimming in the background, and rays of light piercing the crystal-clear blue water, creating a sense of peace and wonder in the ocean depths. - negativePrompt: No murky water, no pollution, no fishing nets, no dead coral, no debris, no lifeless environments, no poorly lit scenes, no chaotic composition. - prompt: A close-up shot of a powerful tiger prowling through tall golden savanna grass under the warm glow of a setting sun, its intense amber eyes locked onto its surroundings, each muscle rippling with quiet strength, the background blending into a serene mix of orange and purple hues of the evening sky. - negativePrompt: No zoo cages, no unnatural settings, no human interference, no faded or dull colors, no blurry focus, no irrelevant background distractions. - prompt: A determined athlete climbing a steep rocky mountain under a fiery orange sky, with sweat glistening on their face, a backpack slung over their shoulder, gripping onto jagged rocks with one hand while reaching for the summit with the other, the sun breaking over the peak, symbolizing perseverance and triumph over adversity. - negativePrompt: No cloudy or rainy weather, no lazy or tired expressions, no distractions like other climbers, no modern equipment like drones, no dull or lifeless tones, no chaotic background. - prompt: A creative entrepreneur sketching ideas on a whiteboard in a cozy, warmly lit studio, with motivational quotes pinned to the walls, a cup of coffee steaming on the desk, and a vision board featuring plans for the future, the glow of a laptop in the background illuminating their focused expression as they work late into the night. - negativePrompt: No messy desks, no distractions like phones or TVs, no lazy body language, no irrelevant clutter, no pale or washed-out colors, no chaotic or dark settings. - prompt: A runner jogging along a scenic lakeside trail during the golden hour, with soft sunlight reflecting off the rippling water, autumn leaves crunching underfoot, and a slight breeze moving through the vibrant orange and yellow foliage, creating a calm yet energetic mood to start the day with motivation. - negativePrompt: No dark skies, no urban environments, no traffic noise, no signs of pollution, no lazy or unmotivated actions, no irrelevant objects like trash cans. - prompt: A peaceful lakeside at twilight, where the water mirrors the soft pastel hues of the sky, a gentle mist floating just above the surface, a single rowboat docked quietly against the shore, and delicate reeds swaying in the breeze, evoking a sense of calm and introspection. - negativePrompt: No sharp artificial lights, no urban structures, no irrelevant people, no over-saturated colors, no cluttered composition, no loud or chaotic elements. - prompt: A tender moment between two people holding hands on a secluded beach at sunset, their silhouettes framed by the golden glow of the sun dipping below the horizon, gentle waves lapping at their feet, and their footprints trailing behind them in the soft sand, symbolizing love and connection. - negativePrompt: No crowded beaches, no harsh lighting, no irrelevant objects, no litter or debris, no exaggerated or dramatic gestures, no neon tones, no urban backdrops. - prompt: A lone traveler sitting cross-legged on a cliff edge, gazing at a vast expanse of starry sky with a glowing Milky Way, a warm campfire glowing softly beside them, their shadow merging into the natural beauty of the moment, symbolizing peace and self-reflection. - negativePrompt: No other people, no harsh or artificial lighting, no blurry stars, no modern structures, no loud or disruptive backgrounds, no neon colors, no irrelevant props. ## Integration Header Prepare ```bash # Sign up Wiro dashboard and create project export YOUR_API_KEY="{{useSelectedProjectAPIKey}}"; export YOUR_API_SECRET="XXXXXXXXX"; # unix time or any random integer value export NONCE=$(date +%s); # hmac-SHA256 (YOUR_API_SECRET+Nonce) with YOUR_API_KEY export SIGNATURE="$(echo -n "${YOUR_API_SECRET}${NONCE}" | openssl dgst -sha256 -hmac "${YOUR_API_KEY}")"; ``` ## Run Command - Make HTTP Post Request ```bash curl -X POST "https://api.wiro.ai/v1/Run/THUDM/CogVideoX-2b" -H "Content-Type: multipart/form-data" -H "x-api-key: ${YOUR_API_KEY}" -H "x-nonce: ${NONCE}" -H "x-signature: ${SIGNATURE}" -d '{ "prompt": "A sprawling futuristic city illuminated by neon lights, with flying cars zipping through the air. The skyline is filled with towering skyscrapers, and holographic advertisements flicker on every corner. The camera zooms through the streets, capturing the hustle and bustle of a technologically advanced society.", "steps": 50, "scale": "6.0", "seed": "123456", "callbackUrl": "You can provide a callback URL; Wiro will send a POST request to it when the task is completed." }'; ``` ## Run Command - Response ```json { "errors": [], "taskid": "2221", "socketaccesstoken": "eDcCm5yyUfIvMFspTwww49OUfgXkQt", "result": true } ``` ## Get Task Detail - Make HTTP Post Request ```bash curl -X POST "https://api.wiro.ai/v1/Task/Detail" -H "Content-Type: multipart/form-data" -H "x-api-key: ${YOUR_API_KEY}" -H "x-nonce: ${NONCE}" -H "x-signature: ${SIGNATURE}" -d '{ "tasktoken": 'eDcCm5yyUfIvMFspTwww49OUfgXkQt', }'; ``` ## Get Task Detail - Response ```json { "total": "1", "errors": [], "tasklist": [ { "id": "2221", "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd", "socketaccesstoken": "eDcCm5yyUfIvMFspTwww49OUfgXkQt", "parameters": {}, "debugoutput": "", "debugerror": "", "starttime": "1734513809", "endtime": "1734513813", "elapsedseconds": "6.0000", "status": "task_postprocess_end", "createtime": "1734513807", "canceltime": "0", "assigntime": "1734513807", "accepttime": "1734513807", "preprocessstarttime": "1734513807", "preprocessendtime": "1734513807", "postprocessstarttime": "1734513813", "postprocessendtime": "1734513814", "outputs": [ { "id": "6bc392c93856dfce3a7d1b4261e15af3", "name": "0.png", "contenttype": "image/png", "parentid": "6c1833f39da71e6175bf292b18779baf", "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd", "size": "202472", "addedtime": "1734513812", "modifiedtime": "1734513812", "accesskey": "dFKlMApaSgMeHKsJyaDeKrefcHahUK", "url": "https://cdn1.wiro.ai/6a6af820-c5050aee-40bd7b83-a2e186c6-7f61f7da-3894e49c-fc0eeb66-9b500fe2/0.png" } ], "size": "202472" } ], "result": true } ``` ## Task Status Information This section defines the possible task status values returned by the API when polling for task completion. ### Completed Task Statuses (Polling can stop) These indicate that the task has reached a terminal state — either success or failure. Once any of these is received, polling should stop. - task_postprocess_end : Task completed successfully and post-processing is done. - task_cancel : Task was cancelled by the user or system. ### Running Task Statuses (Continue polling) These statuses indicate that the task is still in progress. Polling should continue if one of these is returned. - task_queue : Task is waiting in the queue. - task_accept : Task has been accepted for processing. - task_assign : Task is being assigned to a worker. - task_preprocess_start : Preprocessing is starting. - task_preprocess_end : Preprocessing is complete. - task_start : Task execution has started. - task_output : Output is being generated.