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

# List locally installed OpenAI-compatible models.

Returns the OpenAI model-list shape for models already installed in reachable local runtimes. Local clients can use the same `b3iq_local_` key they use for `/v1/chat/completions`; setup/operator access is also accepted for local administration. 

` GET /v1/models `

List locally installed OpenAI-compatible models.

Returns the OpenAI model-list shape for models already installed in
reachable local runtimes. Local clients can use the same `b3iq_local_`
key they use for `/v1/chat/completions`; setup/operator access is also
accepted for local administration.


## Servers

- ` http://127.0.0.1:8831 ` — Default local host-agent listener.

## Authentication

The operation accepts these alternatives. Schemes within one alternative are required together.

### Alternative 1

- ` LocalBearer `: ` http `

  - HTTP scheme: ` bearer ` (b3iq_local)

  - Local API key with local chat scope.

### Alternative 2

- ` LocalAPIKeyHeader `: ` apiKey `

  - Credential: ` X-B3IQ-API-Key ` in ` header `

  - Alternate header for local API keys.

### Alternative 3

- ` SetupBearer `: ` http `

  - HTTP scheme: ` bearer `

  - Setup token before operator configuration, or an authenticated operator session outside this spec.

## Responses

### ` 200 ` — Installed local models.

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` object `, ` data `

  - ` object `: type ` string `

    - enum: ` ["list"] `

  - ` data `: type ` array `

    - ` array item `: type ` object `

      - Required fields: ` id `, ` object `, ` created `, ` owned_by `

      - ` id `: type ` string `

      - ` object `: type ` string `

        - enum: ` ["model"] `

      - ` created `: type ` integer ` — Unix timestamp when known. Local host-agent uses 0 for runtime-discovered models.

      - ` owned_by `: type ` string `

        - example: ` "b3iq-local" `

### ` default ` — B3IQ-native problem response.

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` object `

    - Required fields: ` status `, ` title `, ` detail `

    - ` status `: type ` integer `

    - ` title `: type ` string `

    - ` detail `: type ` string `

    - ` code `: type ` string ` — Stable B3IQ code when present. See docs/error-codes.md.

## Request examples

### cURL

```curl
curl -X GET 'http://127.0.0.1:8831/v1/models' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://127.0.0.1:8831/v1/models', {
  method: 'GET',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN"
  }
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.get('http://127.0.0.1:8831/v1/models', headers=headers)
print(response.json())
```