
by xAI
The Grok Imagine API generates, edits and restyles images and video through one API. It supports text-to-video and image-to-video, with clips up to 15 seconds.
APIUsage-based
Step 1: Create an account at console.x.ai and load it with credits.
Step 2: Generate an API key on the API Keys page and set it as XAI_API_KEY.
Step 3: Install the xAI Python SDK, or the OpenAI SDK with the xAI base URL.
Step 4: Send a prompt to the video or image endpoint with options such as duration, aspect ratio and resolution.
Step 5: For video, poll the returned request ID until the result is ready.
Step 6: Try prompts first in the Playground if you want to experiment without code.
It generates images and video from text or images, edits them, and restyles video. Video clips run up to 15 seconds and images go up to 2K resolution.
Create an account at console.x.ai, load it with credits and generate an API key.
Yes. The page shows the OpenAI SDK configured with the xAI base URL and your xAI API key.
Billing is usage-based, charged against credits on your account, with video priced per second and images per image.
Grok APIThe Grok API gives developers access to Grok models for text, code, reasoning, image and video generation, voice, and live web and X search. It is for developers and companies building apps and agents on Grok.
Grok Voice APIGrok Voice API provides real-time speech-to-speech voice agents, text-to-speech and speech-to-text through one API. It supports tool calling, custom cloned voices and 25+ languages.
Grok DeepSearchGrok DeepSearch uses AI for AI research mode for searching online information and synthesizing multi-source answers.
Bria AIBria AI uses AI for commercially oriented visual generative AI APIs for image creation, editing, background operations, and brand workflows.