Delete inference API
editDelete inference API
editThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
Deletes an inference endpoint.
The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the Machine learning trained model APIs.
Request
editDELETE /_inference/<inference_id>
DELETE /_inference/<task_type>/<inference_id>
Prerequisites
edit-
Requires the
manage
cluster privilege.
Path parameters
edit- <inference_id>
- (Required, string) The unique identifier of the inference endpoint to delete.
- <task_type>
- (Optional, string) The type of inference task that the model performs.
Examples
editThe following API call deletes the my-elser-model
inference model that can
perform sparse_embedding
tasks.
resp = client.inference.delete_model( task_type="sparse_embedding", inference_id="my-elser-model", ) print(resp)
response = client.inference.delete_model( task_type: 'sparse_embedding', model_id: 'my-elser-model' ) puts response
DELETE /_inference/sparse_embedding/my-elser-model
The API returns the following response:
{ "acknowledged": true }