delete-inference.asciidoc 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. [role="xpack"]
  2. [[delete-inference-api]]
  3. === Delete {infer} API
  4. experimental[]
  5. Deletes an {infer} endpoint.
  6. IMPORTANT: The {infer} APIs enable you to use certain services, such as built-in
  7. {ml} models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio or
  8. Hugging Face. For built-in models and models uploaded though Eland, the {infer}
  9. APIs offer an alternative way to use and manage trained models. However, if you
  10. do not plan to use the {infer} APIs to use these models or if you want to use
  11. non-NLP models, use the <<ml-df-trained-models-apis>>.
  12. [discrete]
  13. [[delete-inference-api-request]]
  14. ==== {api-request-title}
  15. `DELETE /_inference/<inference_id>`
  16. `DELETE /_inference/<task_type>/<inference_id>`
  17. [discrete]
  18. [[delete-inference-api-prereqs]]
  19. ==== {api-prereq-title}
  20. * Requires the `manage_inference` <<privileges-list-cluster,cluster privilege>>
  21. (the built-in `inference_admin` role grants this privilege)
  22. [discrete]
  23. [[delete-inference-api-path-params]]
  24. ==== {api-path-parms-title}
  25. <inference_id>::
  26. (Required, string)
  27. The unique identifier of the {infer} endpoint to delete.
  28. <task_type>::
  29. (Optional, string)
  30. The type of {infer} task that the model performs.
  31. [discrete]
  32. [[delete-inference-api-example]]
  33. ==== {api-examples-title}
  34. The following API call deletes the `my-elser-model` {infer} model that can
  35. perform `sparse_embedding` tasks.
  36. [source,console]
  37. ------------------------------------------------------------
  38. DELETE /_inference/sparse_embedding/my-elser-model
  39. ------------------------------------------------------------
  40. // TEST[skip:TBD]
  41. The API returns the following response:
  42. [source,console-result]
  43. ------------------------------------------------------------
  44. {
  45. "acknowledged": true
  46. }
  47. ------------------------------------------------------------
  48. // NOTCONSOLE