delete-inference.asciidoc 1.2 KB

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