> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/open-webui/open-webui/llms.txt
> Use this file to discover all available pages before exploring further.

# List Models

> Retrieve a paginated list of models with filtering and sorting options

## Query Parameters

<ParamField query="query" type="string">
  Search query to filter models by name, base\_model\_id, or user information
</ParamField>

<ParamField query="view_option" type="string">
  Filter models by ownership:

  * `created` - Only models created by the current user
  * `shared` - Only models shared with the current user
</ParamField>

<ParamField query="tag" type="string">
  Filter models by tag name
</ParamField>

<ParamField query="order_by" type="string">
  Field to sort by:

  * `name` - Sort by model name
  * `created_at` - Sort by creation date
  * `updated_at` - Sort by last update date
</ParamField>

<ParamField query="direction" type="string">
  Sort direction:

  * `asc` - Ascending order
  * `desc` - Descending order (default)
</ParamField>

<ParamField query="page" type="integer" default={1}>
  Page number for pagination (30 items per page)
</ParamField>

## Response

<ResponseField name="items" type="array">
  Array of model objects with access information

  <ResponseField name="id" type="string">
    The model's unique identifier used in API calls
  </ResponseField>

  <ResponseField name="user_id" type="string">
    ID of the user who created the model
  </ResponseField>

  <ResponseField name="base_model_id" type="string">
    Optional pointer to the actual model used when proxying requests
  </ResponseField>

  <ResponseField name="name" type="string">
    Human-readable display name of the model
  </ResponseField>

  <ResponseField name="params" type="object">
    JSON object containing model parameters
  </ResponseField>

  <ResponseField name="meta" type="object">
    Metadata about the model

    <ResponseField name="profile_image_url" type="string">
      URL or data URI for the model's profile image
    </ResponseField>

    <ResponseField name="description" type="string">
      User-facing description of the model
    </ResponseField>

    <ResponseField name="capabilities" type="object">
      Object describing model capabilities
    </ResponseField>
  </ResponseField>

  <ResponseField name="access_grants" type="array">
    Array of access grant objects defining permissions
  </ResponseField>

  <ResponseField name="is_active" type="boolean">
    Whether the model is currently active
  </ResponseField>

  <ResponseField name="write_access" type="boolean">
    Whether the current user has write access to this model
  </ResponseField>

  <ResponseField name="user" type="object">
    Information about the user who created the model

    <ResponseField name="id" type="string">
      User ID
    </ResponseField>

    <ResponseField name="name" type="string">
      User's display name
    </ResponseField>

    <ResponseField name="email" type="string">
      User's email address
    </ResponseField>
  </ResponseField>

  <ResponseField name="created_at" type="integer">
    Unix timestamp of when the model was created
  </ResponseField>

  <ResponseField name="updated_at" type="integer">
    Unix timestamp of when the model was last updated
  </ResponseField>
</ResponseField>

<ResponseField name="total" type="integer">
  Total number of models matching the filter criteria
</ResponseField>

## Example Request

```bash theme={null}
curl -X GET "https://api.example.com/api/models/list?page=1&order_by=created_at&direction=desc" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Example Response

```json theme={null}
{
  "items": [
    {
      "id": "gpt-4-custom",
      "user_id": "user123",
      "base_model_id": "gpt-4",
      "name": "Custom GPT-4",
      "params": {
        "temperature": 0.7,
        "max_tokens": 2000
      },
      "meta": {
        "profile_image_url": "/static/favicon.png",
        "description": "A customized GPT-4 model for specific tasks",
        "capabilities": {
          "vision": true,
          "function_calling": true
        }
      },
      "access_grants": [],
      "is_active": true,
      "write_access": true,
      "user": {
        "id": "user123",
        "name": "John Doe",
        "email": "john@example.com"
      },
      "created_at": 1704067200,
      "updated_at": 1704153600
    }
  ],
  "total": 1
}
```
