> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trellis.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# List Models

> Get available AI models and the default model

Returns the list of AI models available for chat conversations, along with the current default model. Each model object includes a `model_id` to pass as the `model` parameter when sending messages via [SSE](/api-reference/chats/send-message) or [WebSocket](/api-reference/chats/websocket), plus a human-readable display name and description.

<ParamField header="Authorization" type="string" required>
  Bearer token obtained from the authenticate endpoint.
</ParamField>

## Response

<ResponseField name="models" type="object[]" required>
  List of available model objects.

  <Expandable title="Model object">
    <ResponseField name="model_id" type="string" required>
      The model key. Pass this as the `model` parameter when sending a message to override the default.
    </ResponseField>

    <ResponseField name="display_name" type="string" required>
      Human-readable name for the model (e.g. `Claude Sonnet 4.6`).
    </ResponseField>

    <ResponseField name="description" type="string" required>
      Short description of the model's strengths and best use cases.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="default" type="string" required>
  The `model_id` used when no `model` parameter is specified.
</ResponseField>

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X GET https://api.trellis.sh/v1/models \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import requests

  response = requests.get(
      "https://api.trellis.sh/v1/models",
      headers={"Authorization": "Bearer YOUR_TOKEN"}
  )
  data = response.json()
  print(f"Default: {data['default']}")
  for model in data["models"]:
      print(f"{model['model_id']}: {model['display_name']} — {model['description']}")
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const response = await fetch("https://api.trellis.sh/v1/models", {
    headers: { Authorization: "Bearer YOUR_TOKEN" },
  });
  const { models, default: defaultModel } = await response.json();
  models.forEach(({ model_id, display_name, description }) => {
    console.log(`${model_id}: ${display_name} — ${description}`);
  });
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "models": [
      {
        "model_id": "claude-sonnet-4-6",
        "display_name": "Claude Sonnet 4.6",
        "description": "Best overall balance of speed and intelligence. Great for most tasks."
      },
      {
        "model_id": "claude-opus-4-6",
        "display_name": "Claude Opus 4.6",
        "description": "Most capable Claude model. Best for complex analysis and reasoning."
      },
      {
        "model_id": "claude-haiku-4-5",
        "display_name": "Claude Haiku 4.5",
        "description": "Fastest responses. Good for simple questions and quick lookups."
      },
      {
        "model_id": "gpt-5.2",
        "display_name": "GPT-5.2",
        "description": "Most capable OpenAI model. Excellent for complex analysis."
      },
      {
        "model_id": "gpt-5-mini",
        "display_name": "GPT-5 Mini",
        "description": "Lightweight and fast. Good for straightforward queries."
      },
      {
        "model_id": "gemini-3.0-pro",
        "display_name": "Gemini 3.0 Pro",
        "description": "Google's advanced model. Strong reasoning and analysis."
      },
      {
        "model_id": "gemini-3.0-flash",
        "display_name": "Gemini 3.0 Flash",
        "description": "Ultra-fast responses. Best for quick, simple tasks."
      }
    ],
    "default": "claude-sonnet-4-6"
  }
  ```
</ResponseExample>
