Inference API
Models
List models
/v1/models
List all models available to the authenticating API key, including model names (ID), creation times, and pricing.
Response Body
dataarray<object>A list of models with with minimalized information.
objectstringThe object type of `data` field, which is always `"list"`.
No parameters.{
"data": [
{
"id": "latest",
"aliases": [],
"context_length": 131072,
"created": 1776556800,
"object": "model",
"owned_by": "xai",
"prompt_text_token_price": 12500,
"cached_prompt_text_token_price": 2000,
"prompt_image_token_price": 12500,
"completion_text_token_price": 25000
},
{
"id": "grok-420-reasoning",
"aliases": [],
"context_length": 256000,
"created": 1768003200,
"object": "model",
"owned_by": "xai",
"prompt_text_token_price": 20000,
"cached_prompt_text_token_price": 2000,
"prompt_image_token_price": 0,
"completion_text_token_price": 80000,
"prompt_text_token_price_long_context": 40000,
"completion_text_token_price_long_context": 160000,
"long_context_threshold": 128000,
"capabilities": {
"reasoning_effort": [
"low",
"medium",
"high",
"xhigh"
],
"default_reasoning_effort": "high"
}
},
{
"id": "grok-imagine-image",
"aliases": [],
"context_length": 1024,
"created": 1769472000,
"object": "model",
"owned_by": "xai",
"image_price": 200000000
}
],
"object": "list"
}Get model
/v1/models/{model_id}
Get information about a model with its model_id, including pricing.
Path Parameters
model_idstringID of the model to get.
Response Body
aliasesarray<string>Alias ID(s) of the model that user can use in a request's model field.
createdintegerModel creation time in Unix timestamp.
idstringModel ID. Obtainable from <https://console.x.ai/team/default/models> or <https://docs.x.ai/docs/models>.
objectstringThe object type, which is always `"model"`.
owned_bystringOwner of the model.
pricingarray<object>Per-image prices by (quality, resolution) tier (image generation models). Omitted when the model prices all qualities identically (see `image_price`).
No parameters.{
"id": "latest",
"created": 1776556800,
"object": "model",
"owned_by": "xai",
"prompt_text_token_price": 12500,
"cached_prompt_text_token_price": 2000,
"prompt_image_token_price": 12500,
"completion_text_token_price": 25000
}List language models
/v1/language-models
List all chat and image understanding models available to the authenticating API key with full information. Additional information compared to /v1/models includes modalities, fingerprint and alias(es).
Response Body
modelsarray<object>Array of available language models.
No parameters.{
"models": [
{
"id": "latest",
"fingerprint": "fp_777a9f8466",
"created": 1776556800,
"object": "model",
"owned_by": "xai",
"version": "1.0",
"input_modalities": [
"text",
"image"
],
"output_modalities": [
"text"
],
"prompt_text_token_price": 12500,
"cached_prompt_text_token_price": 2000,
"prompt_image_token_price": 12500,
"completion_text_token_price": 25000,
"search_price": 0,
"prompt_text_token_price_long_context": 0,
"cached_prompt_text_token_price_long_context": 0,
"completion_text_token_price_long_context": 0,
"long_context_threshold": 0,
"aliases": [
"grok-4.3-latest"
]
},
{
"id": "grok-420-reasoning",
"fingerprint": "fp_5319828d69",
"created": 1768003200,
"object": "model",
"owned_by": "xai",
"version": "1.0",
"input_modalities": [
"text"
],
"output_modalities": [
"text"
],
"prompt_text_token_price": 20000,
"cached_prompt_text_token_price": 2000,
"prompt_image_token_price": 0,
"completion_text_token_price": 80000,
"search_price": 0,
"prompt_text_token_price_long_context": 40000,
"cached_prompt_text_token_price_long_context": 0,
"completion_text_token_price_long_context": 160000,
"long_context_threshold": 128000,
"aliases": [],
"capabilities": {
"reasoning_effort": [
"low",
"medium",
"high",
"xhigh"
],
"default_reasoning_effort": "high"
}
}
]
}Get language model
/v1/language-models/{model_id}
Get full information about a chat or image understanding model with its model_id.
Path Parameters
model_idstringID of the model to get.
Response Body
aliasesarray<string>Alias ID(s) of the model that user can use in a request's model field.
cached_prompt_text_token_priceintegerPrice of a prompt text token (in USD cents per 100 million tokens) that was cached previously.
cached_prompt_text_token_price_long_contextintegerPrice of the cached prompt text token for long context requests (USD cents per 100 million tokens). When 0, falls back to cached_prompt_text_token_price.
completion_text_token_priceintegerPrice of the completion text token in USD cents per 100 million token.
completion_text_token_price_long_contextintegerPrice of the completion text token for long context requests (USD cents per 100 million tokens). When 0, the standard completion_text_token_price applies.
createdintegerCreation time of the model in Unix timestamp.
fingerprintstringFingerprint of the xAI system configuration hosting the model.
idstringModel ID. Obtainable from <https://console.x.ai/team/default/models> or <https://docs.x.ai/docs/models>.
input_modalitiesarray<string>The input modalities supported by the model, e.g. `"text"`, `"image"`.
long_context_thresholdintegerToken count at or above which the long context prices apply. When 0, the model has no long context pricing tier.
objectstringThe object type, which is always `"model"`.
output_modalitiesarray<string>The output modalities supported by the model, e.g. `"text"`, `"image"`.
owned_bystringOwner of the model.
prompt_image_token_priceintegerPrice of the prompt image token in USD cents per 100 million token.
prompt_text_token_priceintegerPrice of the prompt text token in USD cents per 100 million token.
prompt_text_token_price_long_contextintegerPrice of the prompt text token for long context requests (USD cents per 100 million tokens). When 0, the standard prompt_text_token_price applies at all context lengths.
search_priceintegerPrice of the search in USD cents per 100 million searches.
versionstringVersion of the model.
No parameters.{
"id": "latest",
"fingerprint": "fp_156d35dcaa",
"created": 1743724800,
"object": "model",
"owned_by": "xai",
"version": "1.0.0",
"input_modalities": [
"text"
],
"output_modalities": [
"text"
],
"prompt_text_token_price": 20000,
"cached_prompt_text_token_price": 0,
"prompt_image_token_price": 0,
"completion_text_token_price": 100000,
"aliases": [
"grok-4",
"grok-4-latest"
]
}List image generation models
/v1/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, fingerprint and alias(es).
Response Body
modelsarray<object>Array of available image generation models.
No parameters.{
"models": [
{
"id": "grok-imagine-image",
"fingerprint": "fp_ca78641a52",
"max_prompt_length": 1024,
"created": 1738961600,
"object": "model",
"owned_by": "xai",
"version": "1.0.0",
"prompt_text_token_price": 100000,
"prompt_image_token_price": 100000,
"generated_image_token_price": 100000,
"aliases": []
}
]
}Get image generation model
/v1/image-generation-models/{model_id}
Get full information about an image generation model with its model_id.
Path Parameters
model_idstringID of the model to get.
Response Body
aliasesarray<string>Alias ID(s) of the model that user can use in a request's model field.
createdintegerModel creation time in Unix timestamp.
fingerprintstringFingerprint of the xAI system configuration hosting the model.
idstringModel ID.
image_priceintegerPrice of a single image in USD cents. The default tier: medium quality at the default (1k) resolution. See `pricing` for the full quality/resolution matrix.
input_modalitiesarray<string>The input modalities supported by the model.
max_prompt_lengthintegerobjectstringThe object type, which is always `"model"`.
output_modalitiesarray<string>The output modalities supported by the model.
owned_bystringOwner of the model.
pricingarray<object>Per-image prices by (quality, resolution) tier. One entry per combination the model serves; omitted when the model prices all qualities identically (see `image_price`).
versionstringVersion of the model.
No parameters.{
"id": "grok-imagine-image",
"fingerprint": "fp_ca78641a52",
"max_prompt_length": 1024,
"created": 1737961600,
"object": "model",
"owned_by": "xai",
"version": "1.0.0",
"prompt_text_token_price": 100000,
"prompt_image_token_price": 100000,
"generated_image_token_price": 100000,
"aliases": []
}List video generation models
/v1/video-generation-models
List all video generation models available to the authenticating API key with full information.
Response Body
modelsarray<object>Array of available video generation models.
No parameters.{
"models": [
{
"id": "grok-imagine-video",
"fingerprint": "fp_898ae9f31c",
"created": 1743724800,
"object": "model",
"owned_by": "xai",
"version": "1.0.0",
"input_modalities": [
"text",
"image"
],
"output_modalities": [
"video"
],
"aliases": []
}
]
}Get video generation model
/v1/video-generation-models/{model_id}
Get full information about a video generation model with its model_id.
Path Parameters
model_idstringID of the model to get.
Response Body
aliasesarray<string>Alias ID(s) of the model that user can use in a request's model field.
createdintegerModel creation time in Unix timestamp.
fingerprintstringFingerprint of the xAI system configuration hosting the model.
idstringModel ID.
input_modalitiesarray<string>The input modalities supported by the model (e.g. "text", "image"; "audio" for models accepting reference audio).
objectstringThe object type, which is always `"model"`.
output_modalitiesarray<string>The output modalities supported by the model (e.g. "video").
owned_bystringOwner of the model.
versionstringVersion of the model.
No parameters.{
"id": "grok-imagine-video",
"fingerprint": "fp_898ae9f31c",
"created": 1743724800,
"object": "model",
"owned_by": "xai",
"version": "1.0",
"input_modalities": [
"text",
"image"
],
"output_modalities": [
"video"
],
"aliases": []
}Last updated:April 13, 2026