Get customers
Answer customers
Work for you
Reach people
Give agents tools
Run and ship
Generate text, embeddings, images and videos with xAI, and manage stored responses and files
Read the authenticated user's ID, team and zero data retention status.
List the models available to this key, including pricing metadata.
List chat and image-understanding model modalities and aliases.
Retrieve a model's information and pricing.
1 field
Generate a non-streaming chat completion from text messages.
4 fields
Generate a stored text response, optionally continuing an existing response.
6 fields
Retrieve a response created with storage enabled.
Permanently delete a stored response.
Read one page of a stored response's input items; use last_id as after.
Embed one or more texts, returning numeric vectors.
3 fields
Generate images as URLs. Enable deferred to obtain a request ID to poll.
Poll one deferred image job; HTTP 202 means it is still pending.
Start text-to-video generation; poll the returned request_id separately.
5 fields
Poll one video job; surface pending and failed jobs without retrying.
Count and inspect a model's tokens for text.
2 fields
Read one team file page. A full page may have more; pass pagination_token.
Retrieve metadata for one team file.
Permanently delete a team file and its attachment availability.
Publish an unauthenticated URL for a file; anyone with it can read it.
Revoke the file's public URL while retaining its authenticated content.