Giky API / Docs
MODEL API REFERENCE

Grok Video 2.0 API Documentation

Generate videos with Grok Video 2.0. Submit a request, save the task ID, then query for the finished video.

On this pageOverviewAuthenticationRequest examplesRequest parametersText to Video inputCreate responseQuery the resultResponse parametersWebhooks (optional)Webhook parametersErrors & retries

Overview

Model ID: grok-video-2-0. Text to Video. Check the current price and availability before your first request.

POST/v1/tasksCreate a task
GET/v1/tasks/{id}Get the result

Authentication

Use Authorization: Bearer YOUR_API_KEY. For task creation, also send Content-Type: application/json and a unique Idempotency-Key. The example below includes all three headers.

Request examples

A priced configuration is not available for this model yet. Check the model page for availability before integrating.

Request parameters

The request body contains model, operation and input. Model-specific fields belong inside input; their accepted values are listed below.

ParameterTypeRequiredDescription
modelstringYesgrok-video-2-0
operationstringYestext-to-video
inputobjectYesParameters for your selected operation.
callbackobjectNoUse an endpoint_id saved in your account’s Webhooks settings. Omit this field when polling.

Text to Video input

No published price for this operation yet. The fields below describe its schema; check availability before calling.

ParameterTypeRequiredDescription / accepted values
promptstringYesDescribe the scene, style or edit you want to make. Minimum 2 characters. Maximum 1000 characters.
resolutionstringYesOutput resolution. Choose a resolution listed in the model pricing. Accepted: 720p.
duration_secondsnumberYesLength of the generated video, in seconds. Accepted: 5.

Create response

HTTP 202 means the task was accepted. Save id and use it to query the result. The response below is illustrative; generation has not finished at this stage.

{
  "id": "00000000-0000-4000-8000-000000000001",
  "status": "queued",
  "outputs": [],
  "error_code": null,
  "created_at": "2026-11-02T00:00:00Z",
  "updated_at": "2026-11-02T00:00:00Z"
}

Query the result

Replace TASK_ID with the returned id. Use the same API key and poll every five seconds or more. When status is succeeded, read the file URLs from outputs.

GET/v1/tasks/{id}Retrieve a task
curl --fail-with-body 'https://gikyapi.com/v1/tasks/TASK_ID' -H 'Authorization: Bearer YOUR_API_KEY'

Response parameters

Creation and status queries return the same task structure.

FieldTypeDescription
idstringTask ID used in subsequent status queries.
statusstringqueued / submitting / running / succeeded / failed / needs_review
outputsstring[]Generated file URLs when the task succeeds. Save files to your own storage.
error_codestring | nullFailure code when available; null if there is no error.
created_atstringTime the task was created.
updated_atstringTime of the last task update.
{
  "id": "00000000-0000-4000-8000-000000000001",
  "status": "succeeded",
  "outputs": [
    "https://example.com/result.mp4"
  ],
  "error_code": null,
  "created_at": "2026-11-02T00:00:00Z",
  "updated_at": "2026-11-02T00:00:00Z"
}

Webhooks (optional)

Add an endpoint in Dashboard → Webhooks and save the signing secret on your server. Include its ID in the task request. You can also poll task status without configuring a callback.

ParameterTypeRequired with callbackDescription
callback.endpoint_idstringYesID of a callback endpoint owned by your account.
{
  "callback": {
    "endpoint_id": "YOUR_ENDPOINT_ID"
  }
}

Webhook parameters

Completion events use task.succeeded or task.failed. Verify the signature before processing and deduplicate by event id. A missing callback does not mean the task failed; query its status.

FieldTypeDescription
idstringUnique event ID; use it to deduplicate deliveries.
typestringtask.succeeded or task.failed
task_idstringThe generation task ID.
statusstringTask status at the time of the event.
outputsstring[]Generated file URLs for a successful task.

Errors & retries

If a submission times out, retry with the same Idempotency-Key and identical body. If you already have a task ID, query that task instead of creating another one.

StatusWhat to do
400Check required fields, accepted values and the priced configuration.
401Check your API key, expiry and restrictions.
409Check the error code: refresh changed configurations or resolve a reused request key.
429Wait at least 60 seconds before retrying.
failedRead error_code and check the consumption record.
needs_reviewKeep the task ID and stop automatic resubmission.