Skip to main content
Grok logo
  • Category: artificial intelligence
  • Auth: API_KEY
  • Composio-managed OAuth available? N/A
  • Tools: 8
  • Triggers: 0
  • Slug: GROK
  • Version: 00000000_00

Tools

Slug: GROK_CREATE_EMBEDDINGSCreate vector embeddings for one or more text inputs with an xAI embedding model.

Input Parameters

string
Stable end-user identifier that helps xAI monitor and detect abuse.
string
required
One non-empty text value or a batch of up to 128 non-empty text values to embed.
string
required
xAI embedding model ID to use.
integer
Requested number of output dimensions when supported by the model.
string ("float" | "base64")
Embedding encoding to return: ‘float’ for numeric vectors or ‘base64’.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GROK_CREATE_RESPONSEGenerate a bounded, non-streaming Grok response from text or structured multimodal input, with optional reasoning, search, and function or web-search tools. Responses are ephemeral by default; set store=true to retain one for 30 days.

Input Parameters

string
required
Plain text, or structured message, function-call, and function-result items containing text, images, or files. To continue a tool call without store=true, replay the model’s function_call item followed by its function_call_output.
string
required
xAI model ID to use; obtain available IDs from GROK_LIST_MODELS.
boolean
Whether xAI should retain the input and response for retrieval or continuation. Defaults to false; stored responses are retained for 30 days.
array
Up to 128 function or web-search tool definitions available to the model.
number
Sampling temperature from 0 to 2.
string
Whether tools are disabled, automatic, required, or a named tool is forced.
string
System-level guidance; do not combine with previous_response_id.
string ("none" | "low" | "medium" | "high")
Reasoning effort supported by the selected model.
integer
Upper bound on generated output and reasoning tokens (1-128000).
object
Realtime web, X, news, or RSS search configuration.
string
Prior response ID whose conversation context should be continued.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GROK_GENERATE_IMAGEGenerate one or more images from a text prompt with an xAI image-generation model.

Input Parameters

string
Stable end-user identifier that helps xAI monitor and detect abuse.
string
xAI image-generation model ID; omit only when relying on the provider default.
string
required
Description of the image to generate.
string ("1k" | "2k")
Output resolution supported by grok-imagine models; omit to use the provider default.
integer
Number of images to generate (1-10).
string ("1:1" | "3:4" | "4:3" | "9:16" | "16:9" | "2:3" | "3:2" | "9:19.5" | "19.5:9" | "9:20" | "20:9" | "1:2" | "2:1" | "auto")
Output aspect ratio supported by grok-imagine models; omit to use the provider default.
string ("url" | "b64_json")
Image result format: ‘url’ for a generated-file URL or ‘b64_json’ for base64-encoded image bytes.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GROK_GENERATE_VIDEOStart asynchronous xAI video generation from a text prompt, optionally conditioned on an image, and return a request ID for status checks.

Input Parameters

string
Stable end-user identifier that helps xAI monitor and detect abuse.
string
Video-generation model ID; omit only to use xAI’s provider default.
string
required
Description of the video to generate.
integer
Requested video duration in seconds (1-15); xAI defaults to 8.
string
Optional public URL or base64 data URL for a JPEG, PNG, or WebP image to use as the video’s first frame.
string ("480p" | "720p" | "1080p")
Output video resolution supported by xAI.
string ("1:1" | "16:9" | "9:16" | "4:3" | "3:4" | "3:2" | "2:3")
Output aspect ratio supported by xAI.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GROK_GET_API_KEY_INFOInspect the connected xAI API key’s identity, wildcard or granular ACLs, and key or team blocking state.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GROK_GET_CURRENT_ACCOUNTVerify the connected xAI credential and return the caller, team, zero-data-retention status, and key blocking state.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GROK_GET_VIDEOCheck an asynchronous xAI video request. Returns pending while generation is in progress, the video and usage when done, or the structured generation error when failed.

Input Parameters

string
required
Deferred request ID returned by GROK_GENERATE_VIDEO.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GROK_LIST_MODELSList models available to the connected xAI key, including model IDs and published pricing metadata needed to choose a model for other tools.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not