delete-inference.asciidoc 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. [role="xpack"]
  2. [[delete-inference-api]]
  3. === Delete {infer} API
  4. Deletes an {infer} model deployment.
  5. [discrete]
  6. [[delete-inference-api-request]]
  7. ==== {api-request-title}
  8. `DELETE /_inference/<task_type>/<model_id>`
  9. [discrete]
  10. [[delete-inference-api-prereqs]]
  11. ==== {api-prereq-title}
  12. * Requires the `manage` <<privileges-list-cluster,cluster privilege>>.
  13. [discrete]
  14. [[delete-inference-api-path-params]]
  15. ==== {api-path-parms-title}
  16. <model_id>::
  17. (Required, string)
  18. The unique identifier of the {infer} model to delete.
  19. <task_type>::
  20. (Required, string)
  21. The type of {infer} task that the model performs.
  22. [discrete]
  23. [[delete-inference-api-example]]
  24. ==== {api-examples-title}
  25. The following API call deletes the `my-elser-model` {infer} model that can
  26. perform `sparse_embedding` tasks.
  27. [source,console]
  28. ------------------------------------------------------------
  29. DELETE /_inference/sparse_embedding/my-elser-model
  30. ------------------------------------------------------------
  31. // TEST[skip:TBD]
  32. The API returns the following response:
  33. [source,console-result]
  34. ------------------------------------------------------------
  35. {
  36. "acknowledged": true
  37. }
  38. ------------------------------------------------------------
  39. // NOTCONSOLE