API / JOIN

HUB

API

Get a key at console.x.ai. The stills model is grok-imagine-image-2.0. Download the URL; it expires.

  1. APIAdd spoken dialogue with reference_audios on Imagine videoadd-spoken-dialogue-with-reference-audios
  2. APIAdd web search to a Grok API requestadd-web-search-to-an-api-request
  3. APIAnimate an image to video with the Imagine APIanimate-image-to-video-with-imagine-api
  4. APIAttach files to a Grok chat requestattach-files-to-a-chat-request
  5. APIAuthenticate with mTLSauthenticate-with-mtls
  6. APICall a function with the Grok APIcall-a-function-with-grok-api
  7. APIChain Responses with previous_response_idchain-responses-with-previous-id
  8. APIConnect a remote MCP server in the Grok APIconnect-remote-mcp-in-grok-api
  9. APICreate a collection and upload documents via APIcreate-a-collection-via-api
  10. APICreate a public URL for a Files API filecreate-a-file-public-url
  11. APIDebug Grok API errorsdebug-grok-api-errors
  12. APIDelete a stored responsedelete-a-stored-response
  13. APIDisable store on Responses requestsdisable-store-on-responses
  14. APIDrive Responses API over WebSocketuse-responses-api-over-websocket
  15. APIEdit a video with the Imagine APIedit-a-video-with-imagine-api
  16. APIEdit an image with the Imagine APIedit-an-image-with-imagine-api
  17. APIEdit multiple images with the Imagine APIedit-multiple-images-with-imagine-api
  18. APIEnable image search in web searchenable-image-search-in-web-search
  19. APIEnable image understanding in web searchenable-web-search-image-understanding
  20. APIEnable image understanding on X Searchenable-x-search-image-understanding
  21. APIEnable video understanding on X Searchenable-x-search-video-understanding
  22. APIExclude domains from web searchexclude-web-search-domains
  23. APIExclude handles from X Searchexclude-x-search-handles
  24. APIExecute code with the Grok APIexecute-code-with-grok-api
  25. APIExtend an Imagine video with the APIextend-an-imagine-video-api
  26. APIGenerate a still with the Imagine Image 2.0 APIgenerate-a-still-with-imagine-api
  27. APIGenerate a video from reference imagesgenerate-reference-to-video
  28. APIGenerate text-to-video with the Imagine APIgenerate-text-to-video-with-imagine-api
  29. APIMaximize Grok API prompt cache hitsmaximize-prompt-cache-hits
  30. APIMigrate Chat Completions calls to Responsesmigrate-chat-completions-to-responses
  31. APIPersist an Imagine output with a public URLpersist-imagine-public-url
  32. APIRestrict web search to allowed domainsrestrict-web-search-to-domains
  33. APIRestrict X Search to specific handlesrestrict-x-search-to-handles
  34. APIRetrieve a stored responseretrieve-a-stored-response
  35. APIReturn structured JSON from the Grok APIreturn-structured-json-from-grok-api
  36. APIRun a Batch API jobrun-a-batch-api-job
  37. APIRun a deferred Grok chat completionrun-deferred-chat-completion
  38. APIRun multi-agent research on grok-4.20-multi-agentrun-multi-agent-research
  39. APISearch collections with the Grok APIsearch-collections-with-grok-api
  40. APISend async concurrent Grok API requestssend-async-concurrent-requests
  41. APISend your first Grok API requestsend-a-first-api-request
  42. APISet a TTL on Files API uploadsset-files-api-ttl
  43. APISet an X Search date rangeset-x-search-date-range
  44. APISet reasoning effort on grok-4.6set-reasoning-effort
  45. APIStream reasoning summaries on grok-4.6stream-reasoning-summaries
  46. APITrack request cost in usd tickstrack-request-cost-in-usd-ticks
  47. APIUnderstand an image with the Grok APIunderstand-an-image-with-grok-api
  48. APIUse context compactionuse-context-compaction
  49. APIUse encrypted reasoning contentuse-encrypted-reasoning-content
  50. APIUse priority processinguse-priority-processing
  51. APIUse the Files API with Imagineuse-files-api-with-imagine
  52. APIUse the image generation tool in a conversationuse-image-generation-tool