Reference spec for the implemented Grok Imagine text-to-video node. See KIE_GrokImagine_T2V.md for the ComfyUI node surface.
- Method:
POST - Path:
/api/v1/jobs/createTask - Base URL:
https://api.kie.ai - Model:
grok-imagine/text-to-video
{
"model": "grok-imagine/text-to-video",
"callBackUrl": "https://your-domain.com/api/callback",
"input": {
"prompt": "A couple of doors open to the right one by one randomly and stay open, to show the inside, each is either an living room, or a kitchen, or a bedroom or an office, with little people living inside.",
"aspect_ratio": "2:3",
"mode": "normal",
"duration": "6",
"resolution": "480p"
}
}model(STRING, required): Must begrok-imagine/text-to-video.callBackUrl(STRING, optional): Receives task completion notifications when provided.input(OBJECT, required): Generation parameters for the model.
prompt(STRING, required): Motion prompt for the generated video. Max length:5000.aspect_ratio(STRING, optional): One of2:3,3:2,1:1,9:16,16:9.mode(STRING, optional): One offun,normal,spicy.duration(STRING, optional): One of6,10,15seconds.resolution(STRING, optional): One of480p,720p.
{
"code": 200,
"message": "success",
"data": {
"taskId": "task_12345678"
}
}If callBackUrl is present, KIE posts task completion payloads to that URL for both success and failure states.
codedata.completeTimedata.costTimedata.createTimedata.modeldata.paramdata.resultJsondata.statedata.taskIddata.failCodedata.failMsgmsg
codedata.completeTimedata.costTimedata.createTimedata.failCodedata.failMsgdata.modeldata.paramdata.statedata.taskIddata.resultJsonmsg
Recommended node shape for this repo:
prompt:STRINGmultiline, required.aspect_ratio:COMBO, optional.mode:COMBO, optional.duration:COMBO, optional.resolution:COMBO, optional.log:BOOLEAN, optional.- Output:
VIDEO.
This fits the same helper pattern already used by Kling and Seedance text-to-video nodes:
- validate prompt and enum inputs before submission
- create task through
kie_api/jobs.py - poll through
kie_api/jobs.py - extract
resultUrlsthroughkie_api/results.py - download video and convert through
kie_api/video.py - log credits through
kie_api/credits.py
callBackUrlshould stay transport-level and does not need to be exposed in the first ComfyUI node pass.- Internal polling defaults can follow the current async video node pattern in this repo.
- The provided callback success example uses a
.jpgURL inresultUrls, which conflicts with the endpoint type. Treat that as a documentation inconsistency unless live API behavior proves otherwise.