Użyj POST /grok/v1/videos/edits, aby edytować źródłowe wideo za pomocą tekstowego promptu, zachować ruch i uzyskać request_id do asynchronicznego odpytywania o wyniki.
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.urlrequest_id, ponieważ edycje korzystają z tego samego mechanizmu odpytywania co generowanieOdpytywanie o wynik końcowy
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"
}