Skip to content

Delete PhrasesView as MarkdownView this page as plain textOpen in ClaudeAsk questions about this pageOpen in ChatGPTAsk questions about this page

Remove phrases from a custom model by value. Removing is idempotent: phrases that are not present are reported as skipped.

POST https://api.reson8.dev/v1/custom-model/{id}/phrases/delete

Request

Headers

Header Value
Authorization ApiKey <api_key> or Bearer <access_token>
Content-Type application/json

Path Parameters

Parameter Type Description
id string ID of the custom model

Body

Field Type Required Description
phrases string[] Yes Phrases to remove (must not be empty)

Example

curl -X POST "https://api.reson8.dev/v1/custom-model/a1b2c3d4-e5f6-7890-abcd-ef1234567890/phrases/delete" \
  -H "Authorization: ApiKey <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "phrases": ["pericarditis", "tachycardia"]
  }'
import requests

response = requests.post(
    "https://api.reson8.dev/v1/custom-model/a1b2c3d4-e5f6-7890-abcd-ef1234567890/phrases/delete",
    headers={
        "Authorization": "ApiKey <your_api_key>",
        "Content-Type": "application/json",
    },
    json={"phrases": ["pericarditis", "tachycardia"]},
)

result = response.json()

Response

200 OK

Field Type Description
deleted number Number of phrases removed
skipped number Number of submitted phrases not removed (not present or duplicate)

Example

In the request above tachycardia was not in the model:

{
  "deleted": 1,
  "skipped": 1
}

Errors

Status Code Description
400 INVALID_REQUEST Empty list or blank phrase
401 UNAUTHORIZED Invalid or expired credentials
404 NOT_FOUND Custom model not found
500 INTERNAL_ERROR Unexpected server error