> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# xAI

> How to set up the xAI connector, plus the actions that are available.

![xAI](https://stackone-logos.com/api/xai/filled/svg)

Previewv0.1.0[See changelog](https://docs.stackone.com/connectors/xai/changelog.md)

[99 actions](#actions) · 3 auth methods

AI
IAM

## Getting Started

**1. Create or Select a Project**

Set up a new project or select an existing one. See [Organizations & Projects](https://docs.stackone.com/gateway/concepts/organizations-and-projects.md).

**2. Configure the Connector**

Enable the connector and create a Connector Profile in your project. See [Setup Connector Profile](https://docs.stackone.com/gateway/quickstart.md#setup-connector-profile).

> [card] [Grok Team Admin API Key · Connector Profile](https://docs.stackone.com/connectors/xai/guides/connector-profile/grok-team-admin-api-key.md)
>
> Reads the members, roles and directory groups of one Grok team on The X Subscription through the Cursor Admin API. Does...

> [card] [Management Key · Connector Profile](https://docs.stackone.com/connectors/xai/guides/connector-profile/management-key.md)
>
> Calls the xAI Management API for one console team, covering API keys, billing, collections, team models and audit events...

> [card] [API Key · Connector Profile](https://docs.stackone.com/connectors/xai/guides/connector-profile/api-key.md)
>
> Uses an xAI API key from one console team to call the xAI API, covering chat, responses, embeddings, images, video, spee...

**3. Link an Account**

Link an account [from the dashboard](https://docs.stackone.com/connect/managing-connectors/linking-accounts.md#link-from-the-dashboard) (or via [StackOne Hub](https://docs.stackone.com/embed/account-linking/overview)).

See the guide for the authentication type chosen in the Connector Profile:

> [card] [Grok Team Admin API Key · Link Account](https://docs.stackone.com/connectors/xai/guides/link-account/grok-team-admin-api-key.md)

> [card] [Management Key · Link Account](https://docs.stackone.com/connectors/xai/guides/link-account/management-key.md)

> [card] [API Key · Link Account](https://docs.stackone.com/connectors/xai/guides/link-account/api-key.md)

**4. Use Actions**

Connect an AI platform to the linked account's actions. See [AI Platforms](https://docs.stackone.com/ai-platforms/overview.md).

Other ways to call actions are listed in [Protocols & SDKs](https://docs.stackone.com/connect/protocols-and-sdks.md).

## Actions

Authentication type

Select all
|
Clear

API Key

Grok Team Admin API Key

Management Key

No auth methods found

99 actions

ActionDescription

Get API Key Info`xai_get_api_key_info`

Get the name, status and permissions of the xAI API key the connection uses.

Get Me`xai_get_me`

Get the user, team and API key behind the xAI connection.

List API Keys`xai_list_api_keys`

List the API keys of an xAI console team.

Create API Key`xai_create_api_key`

Create an API key in an xAI console team.

Update API Key`xai_update_api_key`

Change the name, limits, permissions or disabled state of an xAI API key.

Rotate API Key`xai_rotate_api_key`

Replace the secret of an xAI API key, ending the old secret.

Delete API Key`xai_delete_api_key`

Delete an xAI API key for good.

Get API Key Propagation`xai_get_api_key_propagation`

Check whether an xAI API key has reached every inference cluster.

List Audit Events`xai_list_audit_events`

List the audit events of an xAI console team, such as API key and membership changes.

Create Batch`xai_create_batch`

Create an xAI batch to run many model requests in the background at a lower price.

List Batches`xai_list_batches`

List the batches of the xAI team, a page at a time.

Get Batch`xai_get_batch`

Get one xAI batch with its progress counts.

List Batch Requests`xai_list_batch_requests`

List the requests in an xAI batch with the state of each, a page at a time.

Add Batch Requests`xai_add_batch_requests`

Add chat, responses, image or video requests to an xAI batch.

List Batch Results`xai_list_batch_results`

List the answers of the finished requests in an xAI batch, a page at a time.

Cancel Batch`xai_cancel_batch`

Stop an xAI batch so its pending requests are not processed.

Get Billing Info`xai_get_billing_info`

Get the billing name, address, email and tax ID of an xAI console team.

Set Billing Info`xai_set_billing_info`

Save the billing name, address, email and tax ID of an xAI console team.

List Invoices`xai_list_invoices`

List the invoices of an xAI console team, with line items and payment status.

List Payment Methods`xai_list_payment_methods`

List the cards and bank accounts on file for an xAI console team.

Set Default Payment Method`xai_set_default_payment_method`

Make a payment method on file the default for an xAI console team.

Preview Postpaid Invoice`xai_preview_postpaid_invoice`

Preview what an xAI console team owes for postpaid usage this billing period.

Get Spending Limits`xai_get_spending_limits`

Get the monthly postpaid spending limits of an xAI console team.

Set Spending Limit`xai_set_spending_limit`

Set the monthly postpaid spending limit of an xAI console team.

Get Prepaid Balance`xai_get_prepaid_balance`

Get the prepaid credit balance of an xAI console team and its history.

Top Up Prepaid Credits`xai_top_up_prepaid_credits`

Buy prepaid credits for an xAI console team, charged to its default payment method.

Get Usage`xai_get_usage`

Get the API usage and spend of an xAI console team over time, grouped as asked.

Create Chat Completion`xai_create_chat_completion`

Send a conversation to a Grok model and get its reply.

Get Deferred Chat Completion`xai_get_deferred_chat_completion`

Fetch the result of a chat completion started with deferred set to true.

Search Collections`xai_search_collections`

Search the documents in one or more xAI collections and return the best-matching chunks.

Create Collection`xai_create_collection`

Create an xAI collection that indexes documents for search.

List Collections`xai_list_collections`

List the collections of an xAI team, a page at a time.

Get Collection`xai_get_collection`

Get the settings of one xAI collection.

Update Collection`xai_update_collection`

Rename an xAI collection or change its chunking and document fields.

Delete Collection`xai_delete_collection`

Delete an xAI collection for good.

Add Collection Document`xai_add_collection_document`

Add an uploaded xAI file to a collection so it can be searched.

List Collection Documents`xai_list_collection_documents`

List the documents in an xAI collection with their indexing status, a page at a time.

Get Collection Document`xai_get_collection_document`

Get one document of an xAI collection with its indexing status.

Regenerate Collection Document`xai_regenerate_collection_document`

Rebuild the search index of one document in an xAI collection.

Remove Collection Document`xai_remove_collection_document`

Remove a document from an xAI collection.

Batch Get Collection Documents`xai_batch_get_collection_documents`

Get several documents of an xAI collection in one call.

Create Embeddings`xai_create_embeddings`

Turn text into embedding vectors with an xAI embedding model.

List Files`xai_list_files`

List the files stored in the xAI team, a page at a time.

Get File`xai_get_file`

Get the details of one stored xAI file.

Delete File`xai_delete_file`

Delete a stored xAI file for good.

Create File Public URL`xai_create_file_public_url`

Publish a stored xAI file at a public URL anyone can open.

Revoke File Public URL`xai_revoke_file_public_url`

Turn off the public URL of a stored xAI file.

List Grok Team Members`xai_list_grok_team_members`

List every member of the Grok team with their role and removal status.

List Grok Team Directory Groups`xai_list_grok_team_directory_groups`

List the Grok team's directory groups with their member counts and spend limits.

Get Grok Team Directory Group`xai_get_grok_team_directory_group`

Get one of the Grok team's directory groups by ID.

List Grok Team Directory Group Members`xai_list_grok_team_directory_group_members`

List the members of one Grok team directory group.

Get Unified Credentials`xai_unified_get_me`

Get the current xAI connection's unified credentials and identity.

List Unified Groups`xai_unified_list_groups`

List unified directory groups in a Grok team.

Get Unified Group`xai_unified_get_group`

Get a unified Grok team directory group by ID.

List Unified Roles`xai_unified_list_roles`

List the built-in roles of a Grok team.

Get Unified Role`xai_unified_get_role`

Get a built-in Grok team role by ID.

List Unified Users`xai_unified_list_users`

List unified users in a Grok team.

Get Unified User`xai_unified_get_user`

Get a unified Grok team member by ID.

Generate Image`xai_generate_image`

Generate images from a text prompt with a Grok image model.

Edit Image`xai_edit_image`

Edit one or more images from a text prompt with a Grok image model.

Get Deferred Image`xai_get_deferred_image`

Fetch the result of an image generation or edit started with deferred set to true.

Validate Management Key`xai_validate_management_key`

Check the xAI management key the connection uses and return its scope and permissions.

List Models`xai_list_models`

List the models the xAI API key can use, with prices.

Get Model`xai_get_model`

Get one model by ID or alias, with its prices.

List Language Models`xai_list_language_models`

List the chat and image understanding models the xAI API key can use, with prices.

Get Language Model`xai_get_language_model`

Get one chat and image understanding model by ID or alias, with its prices.

List Image Generation Models`xai_list_image_generation_models`

List the image generation models the xAI API key can use, with prices.

Get Image Generation Model`xai_get_image_generation_model`

Get one image generation model by ID or alias, with its prices.

List Video Generation Models`xai_list_video_generation_models`

List the video generation models the xAI API key can use, with prices.

Get Video Generation Model`xai_get_video_generation_model`

Get one video generation model by ID or alias, with its prices.

List Embedding Models`xai_list_embedding_models`

List the embedding models the xAI API key can use, with prices.

Get Embedding Model`xai_get_embedding_model`

Get one embedding model by ID or alias, with its prices.

Create Response`xai_create_response`

Generate a Grok model response from text, image or file input, stored for later retrieval.

Get Response`xai_get_response`

Get a stored Grok model response by ID.

Delete Response`xai_delete_response`

Delete a stored Grok model response.

Compact Response Input`xai_compact_response_input`

Shorten a long Responses input window into one compacted item to send next time.

List Response Input Items`xai_list_response_input_items`

List the input items of a stored Grok model response, a page at a time.

List Skills`xai_list_skills`

List the hosted skills uploaded to the xAI team, a page at a time.

Get Skill`xai_get_skill`

Get the details of one hosted xAI skill.

Delete Skill`xai_delete_skill`

Delete a hosted xAI skill for good.

List Team Models`xai_list_team_models`

List the models an xAI console team can use, with prices and rate limits.

List Team Endpoint ACLs`xai_list_team_endpoint_acls`

List the endpoint ACLs that can be given to API keys of an xAI console team.

Tokenize Text`xai_tokenize_text`

Split text into the tokens a Grok model reads, with each token id.

Generate Video`xai_generate_video`

Start generating a video from a text prompt, an image or reference images.

Edit Video`xai_edit_video`

Start editing a video from a text prompt.

Extend Video`xai_extend_video`

Start generating a continuation of a video from a text prompt.

Get Deferred Video`xai_get_deferred_video`

Fetch the status and result of a video generation, edit or extension.

Create Phone Number`xai_create_phone_number`

Add a phone number that routes SIP calls to an xAI voice agent or webhook.

List Phone Numbers`xai_list_phone_numbers`

List the phone numbers of the xAI team, a page at a time.

Delete Phone Number`xai_delete_phone_number`

Remove a Direct SIP or Twilio-imported phone number from the xAI team.

Transfer SIP Call`xai_transfer_sip_call`

Transfer an active xAI SIP call to a phone number or SIP address.

Hang Up SIP Call`xai_hang_up_sip_call`

End an active xAI SIP call.

Create Speech`xai_create_speech`

Turn text into spoken audio with an xAI voice, returned as base64 with timings.

List TTS Voices`xai_list_tts_voices`

List the built-in xAI voices for text to speech.

Get TTS Voice`xai_get_tts_voice`

Get one built-in xAI text to speech voice.

List Custom Voices`xai_list_custom_voices`

List the custom voices the xAI team has made, a page at a time.

Get Custom Voice`xai_get_custom_voice`

Get one custom voice of the xAI team.

Update Custom Voice`xai_update_custom_voice`

Change the name, description or labels of a custom xAI voice.

Delete Custom Voice`xai_delete_custom_voice`

Delete a custom xAI voice for good.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.