# Probe models on a configured LLM backend

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

Requires model_backend.read on the specified backend.


```http
POST https://api.moi.matrixorigin.cn/v5/llm/backends/{backend_id}/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/backends/$BACKEND_ID/probe-models" \
  --header "X-API-Key: $MOI_KEY" \
  --header "X-Workspace-ID: $WORKSPACE_ID" \
  --header "Content-Type: application/json" \
  --data-raw '{"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. |
| `api_key` | Body | string | Yes | Provider key for this request; must be nonempty after trimming. Does not automatically reuse the saved backend key. |
| `backend_id` | Path | integer | Yes | Positive backend ID from the list of the same backend kind. |

Requires model_backend.read on the specified backend. Reads the first online candidate URL filtered by the DAO, without rotating through other candidates. Fails without an online candidate. Candidates are not automatically saved to the backend's model list; updating requires a separate operation.

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

## 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.
