HUB
API
Get a key at console.x.ai. The stills model is grok-imagine-image-2.0. Download the URL; it expires.
- APIAdd spoken dialogue with reference_audios on Imagine videoadd-spoken-dialogue-with-reference-audios
- APIAdd web search to a Grok API requestadd-web-search-to-an-api-request
- APIAnimate an image to video with the Imagine APIanimate-image-to-video-with-imagine-api
- APIAttach files to a Grok chat requestattach-files-to-a-chat-request
- APIAuthenticate with mTLSauthenticate-with-mtls
- APICall a function with the Grok APIcall-a-function-with-grok-api
- APIChain Responses with previous_response_idchain-responses-with-previous-id
- APIConnect a remote MCP server in the Grok APIconnect-remote-mcp-in-grok-api
- APICreate a collection and upload documents via APIcreate-a-collection-via-api
- APICreate a public URL for a Files API filecreate-a-file-public-url
- APIDebug Grok API errorsdebug-grok-api-errors
- APIDelete a stored responsedelete-a-stored-response
- APIDisable store on Responses requestsdisable-store-on-responses
- APIDrive Responses API over WebSocketuse-responses-api-over-websocket
- APIEdit a video with the Imagine APIedit-a-video-with-imagine-api
- APIEdit an image with the Imagine APIedit-an-image-with-imagine-api
- APIEdit multiple images with the Imagine APIedit-multiple-images-with-imagine-api
- APIEnable image search in web searchenable-image-search-in-web-search
- APIEnable image understanding in web searchenable-web-search-image-understanding
- APIEnable image understanding on X Searchenable-x-search-image-understanding
- APIEnable video understanding on X Searchenable-x-search-video-understanding
- APIExclude domains from web searchexclude-web-search-domains
- APIExclude handles from X Searchexclude-x-search-handles
- APIExecute code with the Grok APIexecute-code-with-grok-api
- APIExtend an Imagine video with the APIextend-an-imagine-video-api
- APIGenerate a still with the Imagine Image 2.0 APIgenerate-a-still-with-imagine-api
- APIGenerate a video from reference imagesgenerate-reference-to-video
- APIGenerate text-to-video with the Imagine APIgenerate-text-to-video-with-imagine-api
- APIMaximize Grok API prompt cache hitsmaximize-prompt-cache-hits
- APIMigrate Chat Completions calls to Responsesmigrate-chat-completions-to-responses
- APIPersist an Imagine output with a public URLpersist-imagine-public-url
- APIRestrict web search to allowed domainsrestrict-web-search-to-domains
- APIRestrict X Search to specific handlesrestrict-x-search-to-handles
- APIRetrieve a stored responseretrieve-a-stored-response
- APIReturn structured JSON from the Grok APIreturn-structured-json-from-grok-api
- APIRun a Batch API jobrun-a-batch-api-job
- APIRun a deferred Grok chat completionrun-deferred-chat-completion
- APIRun multi-agent research on grok-4.20-multi-agentrun-multi-agent-research
- APISearch collections with the Grok APIsearch-collections-with-grok-api
- APISend async concurrent Grok API requestssend-async-concurrent-requests
- APISend your first Grok API requestsend-a-first-api-request
- APISet a TTL on Files API uploadsset-files-api-ttl
- APISet an X Search date rangeset-x-search-date-range
- APISet reasoning effort on grok-4.6set-reasoning-effort
- APIStream reasoning summaries on grok-4.6stream-reasoning-summaries
- APITrack request cost in usd tickstrack-request-cost-in-usd-ticks
- APIUnderstand an image with the Grok APIunderstand-an-image-with-grok-api
- APIUse context compactionuse-context-compaction
- APIUse encrypted reasoning contentuse-encrypted-reasoning-content
- APIUse priority processinguse-priority-processing
- APIUse the Files API with Imagineuse-files-api-with-imagine
- APIUse the image generation tool in a conversationuse-image-generation-tool