Gunakan POST /grok/v1/videos/edits untuk mengedit video sumber dengan prompt teks, mempertahankan gerakan, dan mendapatkan request_id untuk polling hasil async.
curl --request POST \
--url https://api.cometapi.com/grok/v1/videos/edits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Add snow to the scene.",
"video": {
"url": "https://example.com/source.mp4"
}
}
'{
"request_id": "e55813f7-911f-cfa8-208c-9c8e693b4d38"
}video.url yang dapat diaksesrequest_id yang dikembalikan, karena edit menggunakan alur polling yang sama seperti generasiPoll untuk hasil akhir
Bearer token authentication. Use your CometAPI key.
Edit instruction describing the change you want.
"Add snow to the scene."
Source video to edit. xAI documents an input limit of about 8.7 seconds.
Show child attributes
xAI video model id.
"grok-imagine-video"
Optional output delivery configuration.
Optional end-user identifier.
Request accepted.
Deferred request id used for polling.
curl --request POST \
--url https://api.cometapi.com/grok/v1/videos/edits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Add snow to the scene.",
"video": {
"url": "https://example.com/source.mp4"
}
}
'{
"request_id": "e55813f7-911f-cfa8-208c-9c8e693b4d38"
}