# xAI (Grok) integration

> xAI API for Grok models: responses, chat completions, image and video generation, text-to-speech and speech-to-text, embeddings, files, batches, collections search, models, and tokenization

- Authentication: apiKey

## Tools (65)

- **Add Batch Requests**: Add multiple chat completion requests to an existing batch.
- **Cancel Batch**: Cancel processing of all requests in a batch.
- **Compact Response Input**: Compacts a full Responses API input window into a shorter canonical window.
- **Create Batch**: Create a new batch for processing requests.
- **Create Chat Completion**: Create a chat response from text/image chat prompts (chat and image understanding models).
- **Create Custom Voice**: Create a custom voice from a reference audio clip.
- **Create Embeddings**: Create embedding vectors for input text.
- **Create File Public URL**: Create a permanent unauthenticated public URL for an existing file.
- **Create Message (Anthropic-Compatible)**: Create a messages response; compatible with the Anthropic Messages API.
- **Create Phone Number**: Create a phone number for API-controlled SIP calls.
- **Create Realtime Client Secret**: Create an ephemeral client secret for browser-side Realtime API connections.
- **Create Response**: Generates a response based on text or image prompts. The response ID can be used to retrieve the response later or to continue the conversation.
- **Delete Custom Voice**: Delete a custom voice.
- **Delete File**: Delete a file by ID.
- **Delete Phone Number**: Remove a Direct SIP or Twilio-imported phone number.
- **Delete Response**: Delete a previously generated response.
- **Delete Skill**: Delete a skill by ID.
- **Download Custom Voice Audio**: Download the reference audio for a custom voice.
- **Download File Content**: Download the contents of a file as a stream of raw bytes.
- **Download Skill Content**: Download a skill as raw zip bytes.
- **Edit Image**: Edit one or more images based on a prompt with an image generation model.
- **Edit Video**: Edit a video based on a prompt. Asynchronous: returns a request_id to poll.
- **Extend Video**: Extend a video by generating continuation content. Asynchronous: returns a request_id to poll.
- **Generate Image**: Generate an image from a prompt with an image generation model.
- **Generate Video**: Generate a video from a text prompt and optionally images. Asynchronous: returns a request_id to poll.
- **Get API Key Info**: Get information about the current API key: name, status, permissions, team and users.
- **Get Batch**: Get information about a specific batch.
- **Get Current Caller**: Get identity, team and ZDR status of the authenticated caller.
- **Get Custom Voice**: Get a single custom voice.
- **Get Deferred Chat Completion**: Fetch the result of a deferred chat completion; 200 when complete, 202 while pending.
- **Get Deferred Image**: Poll a deferred image generation or edit: 202 while pending, 200 with data when done or error when failed.
- **Get Embedding Model**: Get full information about an embedding model.
- **Get File**: Retrieve metadata for a single file by ID.
- **Get Image Generation Model**: Get full information about an image generation model.
- **Get Language Model**: Get full information about a chat or image understanding model.
- **Get Model**: Get information about a model by id, including pricing.
- **Get Response**: Retrieve a previously generated response.
- **Get Skill**: Retrieve a skill by ID.
- **Get TTS Voice**: Get details for a specific text-to-speech voice.
- **Get Video Generation Model**: Get full information about a video generation model.
- **Get Video Result**: Get the result of a deferred video generation, edit or extension request.
- **Hang Up Realtime Call**: End an active SIP call.
- **List Batches**: List all batches for the current team.
- **List Batch Requests**: List metadata for all requests in a batch.
- **List Batch Results**: List the processing results for a batch.
- **List Custom Voices**: List custom voices owned by your team.
- **List Embedding Models**: List embedding models with full information including modalities.
- **List Files**: List files owned by the authenticated team, paginated.
- **List Image Generation Models**: List image generation models with full information including modalities and pricing.
- **List Language Models**: List chat and image understanding models with full information including modalities.
- **List Models**: List all models available to the API key, with creation times and pricing.
- **List Phone Numbers**: List phone numbers for the authenticated team.
- **List Response Input Items**: List the input items of a previously generated response.
- **List Skills**: List uploaded skills.
- **List TTS Voices**: List all available text-to-speech voices.
- **List Video Generation Models**: List video generation models with full information including modalities.
- **Revoke File Public URL**: Revoke the active public URL for a file; idempotent.
- **Search Collection Documents**: Search for content related to a query within the given collections.
- **Speech to Text**: Transcribe an audio file (upload or URL) to text.
- **Text to Speech**: Convert text into speech audio; returns base64-encoded audio in JSON.
- **Tokenize Text**: Tokenize text with the specified model.
- **Transfer Realtime Call**: Transfer an active SIP call to a PSTN or SIP destination.
- **Update Custom Voice**: Update custom voice metadata.
- **Upload File**: Upload a file (max 50 MB) to xAI storage and get its metadata.
- **Upload Skill**: Upload a skill as a zip file or a directory of files.

Connect xAI (Grok) in General Input: https://www.generalinput.com/apps/xai