# Probe LLM models

```{raw} html
<div class="mo-api-page-show-toc" aria-hidden="true"></div>
```

Requires regular access to the current Workspace.


```http
POST https://api.moi.matrixorigin.cn/v5/llm/probe-models
```

## Before you call this API

Set `BASE_URL` to the product API prefix `https://api.moi.matrixorigin.cn/v5`. For private deployments, use the corresponding product API URL.

[Configure identity, Workspace, and model information in the same environment](objects.md#prepare).

## Request

:::::::{div} mo-api-tabs
::::::{tab-set}
:::::{tab-item} Request example

```bash
curl --request POST \
  "$BASE_URL/llm/probe-models" \
  --header "X-API-Key: $MOI_KEY" \
  --header "X-Workspace-ID: $WORKSPACE_ID" \
  --header "Content-Type: application/json" \
  --data-raw '{"address":"https://provider.example.invalid/v1","api_key":"provider-key-example"}'
```

:::::
:::::{tab-item} Parameters

| Parameter | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Workspace-ID` | Headers | string | Yes | Workspace ID in the same environment. |
| `address` | Body | string | Yes | Provider API root URL. The product trims it and appends /models. |
| `api_key` | Body | string | No | Provider model-list credentials; optional for services requiring no key. Separate from MOI_KEY. |

Requires regular access to the current Workspace. Sends GET /models to the provider, using Bearer when a key is supplied. Does not create a backend. Name patterns distinguish LLM/Embedding without proving capabilities; duplicates are not guaranteed to merge. Non-200 responses, invalid responses, and size-limit violations fail.

:::::
::::::
:::::::

## Successful response

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "models": [
      "chat-example"
    ]
  }
}
```

:::::
:::::{tab-item} Fields

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | OK on success. |
| `data` | object | [Model, probe, or configuration results](objects.md#response). |

:::::
::::::
:::::::

## Error responses

[States and errors](objects.md#errors) distinguishes string and numeric protocols. Confirm probe candidates, saved configuration, and actual inference separately.
