| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- [role="xpack"]
- [[delete-inference-api]]
- === Delete {infer} API
- experimental[]
- Deletes an {infer} endpoint.
- IMPORTANT: The {infer} APIs enable you to use certain services, such as built-in
- {ml} models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio or
- Hugging Face. For built-in models and models uploaded though Eland, the {infer}
- APIs offer an alternative way to use and manage trained models. However, if you
- do not plan to use the {infer} APIs to use these models or if you want to use
- non-NLP models, use the <<ml-df-trained-models-apis>>.
- [discrete]
- [[delete-inference-api-request]]
- ==== {api-request-title}
- `DELETE /_inference/<inference_id>`
- `DELETE /_inference/<task_type>/<inference_id>`
- [discrete]
- [[delete-inference-api-prereqs]]
- ==== {api-prereq-title}
- * Requires the `manage_inference` <<privileges-list-cluster,cluster privilege>>
- (the built-in `inference_admin` role grants this privilege)
- [discrete]
- [[delete-inference-api-path-params]]
- ==== {api-path-parms-title}
- <inference_id>::
- (Required, string)
- The unique identifier of the {infer} endpoint to delete.
- <task_type>::
- (Optional, string)
- The type of {infer} task that the model performs.
- [discrete]
- [[delete-inference-api-example]]
- ==== {api-examples-title}
- The following API call deletes the `my-elser-model` {infer} model that can
- perform `sparse_embedding` tasks.
- [source,console]
- ------------------------------------------------------------
- DELETE /_inference/sparse_embedding/my-elser-model
- ------------------------------------------------------------
- // TEST[skip:TBD]
- The API returns the following response:
- [source,console-result]
- ------------------------------------------------------------
- {
- "acknowledged": true
- }
- ------------------------------------------------------------
- // NOTCONSOLE
|