put-inference.asciidoc 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. [role="xpack"]
  2. [[put-inference-api]]
  3. === Create {infer} API
  4. experimental[]
  5. Creates an {infer} endpoint to perform an {infer} task.
  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, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI or Hugging Face.
  8. For built-in models and models uploaded through Eland, the {infer} APIs offer an alternative way to use and manage trained models.
  9. 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>>.
  10. [discrete]
  11. [[put-inference-api-request]]
  12. ==== {api-request-title}
  13. `PUT /_inference/<task_type>/<inference_id>`
  14. [discrete]
  15. [[put-inference-api-prereqs]]
  16. ==== {api-prereq-title}
  17. * Requires the `manage_inference` <<privileges-list-cluster,cluster privilege>>
  18. (the built-in `inference_admin` role grants this privilege)
  19. [discrete]
  20. [[put-inference-api-desc]]
  21. ==== {api-description-title}
  22. The create {infer} API enables you to create an {infer} endpoint and configure a {ml} model to perform a specific {infer} task.
  23. The following services are available through the {infer} API, click the links to review the configuration details of the services:
  24. * <<infer-service-amazon-bedrock,Amazon Bedrock>>
  25. * <<infer-service-azure-ai-studio,Azure AI Studio>>
  26. * <<infer-service-azure-openai,Azure OpenAI>>
  27. * <<infer-service-cohere,Cohere>>
  28. * <<infer-service-elasticsearch,Elasticsearch>> (for built-in models and models uploaded through Eland)
  29. * <<infer-service-elser,ELSER>>
  30. * <<infer-service-google-ai-studio,Google AI Studio>>
  31. * <<infer-service-google-vertex-ai,Google Vertex AI>>
  32. * <<infer-service-hugging-face,Hugging Face>>
  33. * <<infer-service-mistral,Mistral>>
  34. * <<infer-service-openai,OpenAI>>