---
title: "List all models available to the authenticating API key, including model names (ID), creation times, and pricing."
method: GET
path: "/v1/models"
tags: ["v1"]
---

# List all models available to the authenticating API key, including model names (ID), creation times, and pricing.

`GET /v1/models`

## Response `200`

Success

- ListModelsResponse
  - `data` Model[], required — A list of models with with minimalized information.
    - `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).
    - `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.
    - `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).
  - `object` string, required — The object type of `data` field, which is always `"list"`.

## Other responses

- `400` — Bad request. The request is invalid or an invalid API key is provided.

---

[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/versions/8f6014272113/schema)
