<span id="探测嵌入模型"></span>

# Probe embedding 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/embedding/probe-models
```

<span id="调用前准备"></span>

## Before you call this API

Set `BASE_URL` to the product API prefix `https://api.moi.matrixorigin.cn/v5`; use the corresponding product API URL for a dedicated deployment.

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

<span id="请求"></span>

## Request

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

```bash
curl --request POST \
  "$BASE_URL/embedding/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 base URL; the product trims whitespace and appends /models. |
| `api_key` | Body | string | No | Provider model-list credentials; optional for services requiring no key, and separate from MOI_KEY. |

Requires regular access to the current workspace. Sends GET /models to the provider, with Bearer when a key is supplied; creates no backend. Name patterns distinguish LLM/Embedding without proving actual capabilities. Duplicate candidates are not necessarily merged. Non-200 responses, invalid responses, and size-limit violations fail.

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

<span id="成功响应"></span>

## Successful response

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

```json
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "models": [
      "bge-m3"
    ]
  }
}
```

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

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

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

<span id="错误响应"></span>

## Error responses

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