GROKDOWNLOADER

Grok Imagine / INFORMATION

Use the Grok Downloader API with its actual limits

This API checks supported public Imagine posts and returns the available media choices. It is part of Grok Downloader, not the official xAI generation API. It cannot access private accounts, export conversations, or bypass restrictions on Grok media.

Resolve a link

POST /api/resolve
Content-Type: application/json

{ "url": "https://grok.com/imagine/post/…" }

The response contains a temporary session ID, title, source URL, preview route and an array of formats. Sessions expire after ten minutes.

Download a source

GET /api/download?id=SESSION_ID&format=original

Supports a single byte Range request. Use the same domain that created the session. Public GET endpoint: /api/v1/resolve?url=ENCODED_URL, limited to 60 requests per hour per IP.

Prepare a conversion

POST /api/convert
{ "id": "SESSION_ID", "format": "gif" }

GET /api/progress/JOB_ID

The progress endpoint emits server-sent events. A done event includes a temporary download URL. A 503 BUSY response means another conversion is active. Files must be under 200 MB and 10 minutes.

Check several links

POST /api/batch
{ "urls": ["PUBLIC_SHARE_URL"] }

Up to ten links. Each result contains either a download session or an individual error. There is no API key and fair-use limits apply.

Treat resolved results as temporary

Use the returned formats array as the authority for each item. A Grok video may offer an original MP4, GIF, MP3, and first-frame JPG; an image result offers its source and applicable image conversions. Grok prompt and recipe exports are not supplied.

Resolve sessions and conversion jobs expire after 10 minutes. Keep the original post URL so your client can resolve again after EXPIRED. Conversion jobs are asynchronous, with progress and a final temporary download URL; there is capacity for one active conversion.

Handle access restrictions without retry storms

UPSTREAM_RESTRICTED means the source refused guest access. Present an official-platform fallback and avoid repeated immediate requests. FORMAT_UNAVAILABLE can occur when a video has no audio track for MP3. BUSY calls for a delayed retry; EXPIRED requires a new resolve.

The public resolve endpoint is limited to 60 requests per hour per IP. Browser resolve requests allow 30 per 10 minutes per IP. Batch accepts up to 10 supplied links, with individual results; its ZIP contains sources and has a combined 200 MB ceiling. Sources are limited to 200 MB and conversion processing to 10 minutes.

← Grok Downloader