Create a Mistral inference endpoint Generally available; Added in 8.15.0
Path parameters
-
The task type. The only valid task type for the model to perform is
text_embedding
.Value is
text_embedding
. -
The unique identifier of the inference endpoint.
PUT /_inference/{task_type}/{mistral_inference_id}
Console
PUT _inference/text_embedding/mistral-embeddings-test { "service": "mistral", "service_settings": { "api_key": "Mistral-API-Key", "model": "mistral-embed" } }
resp = client.inference.put( task_type="text_embedding", inference_id="mistral-embeddings-test", inference_config={ "service": "mistral", "service_settings": { "api_key": "Mistral-API-Key", "model": "mistral-embed" } }, )
const response = await client.inference.put({ task_type: "text_embedding", inference_id: "mistral-embeddings-test", inference_config: { service: "mistral", service_settings: { api_key: "Mistral-API-Key", model: "mistral-embed", }, }, });
response = client.inference.put( task_type: "text_embedding", inference_id: "mistral-embeddings-test", body: { "service": "mistral", "service_settings": { "api_key": "Mistral-API-Key", "model": "mistral-embed" } } )
$resp = $client->inference()->put([ "task_type" => "text_embedding", "inference_id" => "mistral-embeddings-test", "body" => [ "service" => "mistral", "service_settings" => [ "api_key" => "Mistral-API-Key", "model" => "mistral-embed", ], ], ]);
curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"service":"mistral","service_settings":{"api_key":"Mistral-API-Key","model":"mistral-embed"}}' "$ELASTICSEARCH_URL/_inference/text_embedding/mistral-embeddings-test"
client.inference().put(p -> p .inferenceId("mistral-embeddings-test") .taskType(TaskType.TextEmbedding) .inferenceConfig(i -> i .service("mistral") .serviceSettings(JsonData.fromJson("{\"api_key\":\"Mistral-API-Key\",\"model\":\"mistral-embed\"}")) ) );
Request example
Run `PUT _inference/text_embedding/mistral-embeddings-test` to create a Mistral inference endpoint that performs a text embedding task.
{ "service": "mistral", "service_settings": { "api_key": "Mistral-API-Key", "model": "mistral-embed" } }