Path parameters
-
The type of the inference task that the model will perform.
Values are
completionorchat_completion. -
The unique identifier of the inference endpoint.
Query parameters
-
Specifies the amount of time to wait for the inference endpoint to be created.
Values are
-1or0.External documentation
PUT
/_inference/{task_type}/{ai21_inference_id}
curl \
--request PUT 'http://api.example.com/_inference/{task_type}/{ai21_inference_id}' \
--header "Content-Type: application/json" \
--data '"{\n \"service\": \"ai21\",\n \"service_settings\": {\n \"api_key\": \"ai21-api-key\",\n \"model_id\": \"jamba-large\" \n }\n}"'
Request examples
Put ai21 request example1
Run `PUT _inference/completion/ai21-completion` to create an AI21 inference endpoint that performs a `completion` task.
{
"service": "ai21",
"service_settings": {
"api_key": "ai21-api-key",
"model_id": "jamba-large"
}
}
Run `PUT _inference/chat-completion/ai21-chat-completion` to create a AI21 inference endpoint that performs a `chat_completion` task.
{
"service": "ai21",
"service_settings": {
"api_key": "ai21-api-key",
"model_id": "jamba-mini"
}
}