Path parameters
- inference_id
string Required The unique identifier for the inference endpoint.
Body
input
string | array[string] Required The text on which you want to perform the inference task. It can be a single string or an array.
NOTE: Inference endpoints for the completion task type currently only support a single string as input.
- task_settings
object
POST /_inference/completion/{inference_id}/_stream
curl \
--request POST 'http://api.example.com/_inference/completion/{inference_id}/_stream' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '"{\n \"input\": \"What is Elastic?\"\n}"'
Request example
Run `POST _inference/completion/openai-completion/_stream` to perform a completion on the example question with .
{
"input": "What is Elastic?"
}