> ## Documentation Index
> Fetch the complete documentation index at: https://sgl-project-mini-sglang.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Models

> List available models using the /v1/models endpoint

## Endpoint

```http theme={null}
GET /v1/models
```

Returns a list of available models. Mini-SGLang currently serves a single model specified at server startup.

## Request

No request parameters required.

## Response Format

**object** `string`

Always "list" for model list responses.

**data** `array`

Array of model objects. Each model object contains:

**id** `string`

The model identifier (typically the model path).

**object** `string`

Always "model" for model objects.

**created** `integer`

Unix timestamp of when the model was created/loaded.

**owned\_by** `string`

Always "mini-sglang".

**root** `string`

The root model path.

## Examples

### List Models with curl

```bash theme={null}
curl http://localhost:8000/v1/models
```

### Example Response

```json theme={null}
{
  "object": "list",
  "data": [
    {
      "id": "meta-llama/Llama-3.1-8B-Instruct",
      "object": "model",
      "created": 1709510400,
      "owned_by": "mini-sglang",
      "root": "meta-llama/Llama-3.1-8B-Instruct"
    }
  ]
}
```

### Using Python OpenAI Client

```python theme={null}
from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:8000/v1",
    api_key="dummy"  # API key not required
)

# List all available models
models = client.models.list()

for model in models.data:
    print(f"Model ID: {model.id}")
    print(f"Owned by: {model.owned_by}")
    print(f"Created: {model.created}")
```

### Using Python Requests

```python theme={null}
import requests

response = requests.get("http://localhost:8000/v1/models")
data = response.json()

for model in data["data"]:
    print(f"Available model: {model['id']}")
```

## Notes

* Mini-SGLang currently supports serving one model at a time
* The model ID matches the model path specified when starting the server
* Use the model ID from this endpoint when making requests to `/v1/chat/completions`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.