xAI's REST API — v1
xAI's REST API — v1. 33 operations. Lead operation: Get information about an API key, including name, status, permissions and users who created or modified this key.. Self-contained Naftiko capability covering one Xai business surface.
What You Can Do
MCP Tools
get-information-about-api-key
Get information about an API key, including name, status, permissions and users who created or modified this key.
create-chat-response-text-image
Create a chat response from text/image chat prompts. This is the endpoint for making requests to chat and image understanding models.
tries-fetch-result-previously-started
Tries to fetch a result for a previously-started deferred completion. Returns `200 Success` with the response body, if the request has been completed. Returns `202 Accepted` when the request is pending processing.
legacy-not-supported-reasoning-models
(Legacy - Not supported by reasoning models) Create a text completion response. This endpoint is compatible with the Anthropic API.
legacy-not-supported-reasoning-models-2
(Legacy - Not supported by reasoning models) Create a text completion response for a given prompt. Replaced by /v1/chat/completions.
search-content-related-query-within
Search for content related to the query within the given collections.
list-all-embedding-models-available
List all embedding models available to the authenticating API key with full information. Additional information compared to /v1/models includes modalities, pricing, fingerprint and alias(es).
get-full-information-about-embedding
Get full information about an embedding model with its model_id.
create-embedding-vector-representation-corresponding
Create an embedding vector representation corresponding to the input text. This is the endpoint for making requests to embedding models.
list-files-owned-authenticated-team
List files owned by the authenticated team, paginated. The response
upload-file-xai-s-storage-returns
Upload a file to xAI's storage. Returns the file's metadata. Files can
retrieve-metadata-single-file-id
Retrieve metadata for a single file by ID. Errors with 404 if the file
delete-file-id-after-this
Delete a file by ID. After this returns, the file no longer appears in
download-contents-file-stream-raw
Download the contents of a file as a stream of raw bytes. The response
list-all-image-generation-models
List all image generation models available to the authenticating API key with full information. Additional information compared to /v1/models includes modalities, pricing, fingerprint and alias(es).
get-full-information-about-image
Get full information about an image generation model with its model_id.
edit-image-based-prompt-this
Edit an image based on a prompt. This is the endpoint for making edit requests to image generation models.
generate-image-based-prompt-this
Generate an image based on a prompt. This is the endpoint for making generation requests to image generation models.
list-all-chat-and-image
List all chat and image understanding models available to the authenticating API key with full information. Additional information compared to /v1/models includes modalities, pricing, fingerprint and alias(es).
get-full-information-about-chat
Get full information about a chat or image understanding model with its model_id.
create-messages-response-this-endpoint
Create a messages response. This endpoint is compatible with the Anthropic API.
list-all-models-available-authenticating
List all models available to the authenticating API key with minimalized information, including model names (ID), creation times, etc.
get-minimalized-information-about-model
Get minimalized information about a model with its model_id.
generates-response-based-text-image
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 without repeating prior context. New responses will be stored for 30 days and then permanently d
retrieve-previously-generated-response
Retrieve a previously generated response.
delete-previously-generated-response
Delete a previously generated response.
tokenize-text-specified-model
Tokenize text with the specified model
list-all-video-generation-models
List all video generation models available to the authenticating API key with full information.
get-full-information-about-video
Get full information about a video generation model with its model_id.
edit-video-based-prompt
Edit a video based on a prompt.
extend-video-generating-continuation-content
Extend a video by generating continuation content.
generate-video-text-prompt-and
Generate a video from a text prompt and optionally an image.
get-result-deferred-video-generation
Get the result of a deferred video generation request.