---
title: "Get information about a model with its model_id, including pricing."
method: GET
path: "/v1/models/{model_id}"
tags: ["v1"]
---

# Get information about a model with its model_id, including pricing.

`GET /v1/models/{model_id}`

## Path parameters

- `model_id` string, required

## Response `200`

Success

- Model — OpenAI-compatible model response returned by `/v1/models`. Includes optional pricing fields populated based on the model type.
  - `aliases` string[], required — Alias ID(s) of the model that user can use in a request's model field.
  - `cached_prompt_text_token_price` integer, nullable — Price of a prompt text token (in USD cents per 100 million tokens) that was cached previously.
  - `cached_prompt_text_token_price_long_context` integer, nullable — Price of the cached prompt text token for long context requests (USD cents per 100 million tokens).
  - `completion_text_token_price` integer, nullable — Price of the completion text token in USD cents per 100 million tokens.
  - `completion_text_token_price_long_context` integer, nullable — Price of the completion text token for long context requests (USD cents per 100 million tokens).
  - `context_length` integer, nullable — The maximum context length supported by the model, in tokens.
  - `created` integer, required — Model creation time in Unix timestamp.
  - `id` string, required — Model ID. Obtainable from <https://console.x.ai/team/default/models> or <https://docs.x.ai/docs/models>.
  - `image_price` integer, nullable — Price per image in USD cents (image generation models). The default tier: medium quality at the default (1k) resolution. See `pricing` for the full quality/resolution matrix.
  - `long_context_threshold` integer, nullable — Token count at or above which the long context prices apply.
  - `object` string, required — The object type, which is always `"model"`.
  - `owned_by` string, required — Owner of the model.
  - `pricing` ImagePricingTier[] — Per-image prices by (quality, resolution) tier (image generation models). Omitted when the model prices all qualities identically (see `image_price`).
    - `price_per_image` integer, required — Price per generated image, in 1/100,000,000ths of a USD cent.
    - `quality` string, required — Quality tier this price applies to: `"low"`, `"medium"`, or `"high"`. Medium is the default quality a request serves at when it leaves `quality` unset.
    - `resolution` string, required — Output resolution this price applies to: `"1k"` or `"2k"`. 1k is the default when a request leaves `resolution` unset.
  - `prompt_image_token_price` integer, nullable — Price of the prompt image token in USD cents per 100 million tokens.
  - `prompt_text_token_price` integer, nullable — Price of the prompt text token in USD cents per 100 million tokens.
  - `prompt_text_token_price_long_context` integer, nullable — Price of the prompt text token for long context requests (USD cents per 100 million tokens).

## Other responses

- `400` — Bad request. The request is invalid or an invalid API key is provided.
- `404` — Model not found

---

[API](https://skmtc.net/x/apis/xai-s-rest-api.md) · [All operations](https://skmtc.net/x/apis/xai-s-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/x/xai-s-rest-api/revisions/0b56d0413ce0/schema)
