# Delete an embedding backend through the root-level API

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

Delete an embedding model backend and its endpoints.


```http
DELETE https://api.moi.matrixorigin.cn/v5/embedding/backends/{backend_id}
```

## 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 object permissions in the same environment](objects.md#prepare).

## Request

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

```bash
curl --request DELETE \
  "$BASE_URL/embedding/backends/$BACKEND_ID" \
  --header "X-API-Key: $MOI_KEY" \
  --header "X-Workspace-ID: $WORKSPACE_ID"
```

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

| Parameter | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Workspace-ID` | Headers | string | Yes | Workspace ID in the same environment. |
| `backend_id` | Path | integer | Yes | Positive ID returned by an earlier read. |

Requires object model_backend.delete. Backend and endpoint deletion outcomes depend on the transaction and IAM lifecycle together. DAO handling of missing rows is not a public idempotency guarantee.

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

## Successful response

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

```json
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "success": true
  }
}
```

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

HTTP 200。

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | OK on success. |
| `msg` | string | OK on success. |
| `data` | object | [Actual objects for this protocol](objects.md#responses). |

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

## Error responses

[Errors and result confirmation](objects.md#errors) distinguishes the two protocols. Parse omitted fields, SDK zero values, and empty HTTP responses separately. Confirm writes using the corresponding read operation.
