Create a VoyageAI inference endpoint
          
      Generally available; Added in 8.19.0
 
        
        
        Path parameters
- 
    
  
The type of the inference task that the model will perform.
Values are
text_embeddingorrerank. - 
    
  
The unique identifier of the inference endpoint.
 
Query parameters
- 
    
  
Specifies the amount of time to wait for the inference endpoint to be created.
External documentation  
      
  
    
  
        Body
      
    Required
 
    
  
  - 
    
  
The chunking configuration object.
External documentation  - 
    
  
The type of service supported for the specified task type. In this case,
voyageai.Value is
voyageai. - 
    
  
Settings used to install the inference model. These settings are specific to the
voyageaiservice. - 
    
  
Settings to configure the inference task. These settings are specific to the task type you specified.
 
        PUT
    /_inference/{task_type}/{voyageai_inference_id}
  
  
                    Console
      
        
  PUT _inference/text_embedding/openai-embeddings
{
    "service": "voyageai",
    "service_settings": {
        "model_id": "voyage-3-large",
        "dimensions": 512
    }
}
              resp = client.inference.put(
    task_type="text_embedding",
    inference_id="openai-embeddings",
    inference_config={
        "service": "voyageai",
        "service_settings": {
            "model_id": "voyage-3-large",
            "dimensions": 512
        }
    },
)
              const response = await client.inference.put({
  task_type: "text_embedding",
  inference_id: "openai-embeddings",
  inference_config: {
    service: "voyageai",
    service_settings: {
      model_id: "voyage-3-large",
      dimensions: 512,
    },
  },
});
              response = client.inference.put(
  task_type: "text_embedding",
  inference_id: "openai-embeddings",
  body: {
    "service": "voyageai",
    "service_settings": {
      "model_id": "voyage-3-large",
      "dimensions": 512
    }
  }
)
              $resp = $client->inference()->put([
    "task_type" => "text_embedding",
    "inference_id" => "openai-embeddings",
    "body" => [
        "service" => "voyageai",
        "service_settings" => [
            "model_id" => "voyage-3-large",
            "dimensions" => 512,
        ],
    ],
]);
              curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"service":"voyageai","service_settings":{"model_id":"voyage-3-large","dimensions":512}}' "$ELASTICSEARCH_URL/_inference/text_embedding/openai-embeddings"
              client.inference().put(p -> p
    .inferenceId("openai-embeddings")
    .taskType(TaskType.TextEmbedding)
    .inferenceConfig(i -> i
        .service("voyageai")
        .serviceSettings(JsonData.fromJson("{\"model_id\":\"voyage-3-large\",\"dimensions\":512}"))
    )
);
    
        Request examples
  
  
                    A text embedding task
      
        
  
              Run `PUT _inference/text_embedding/voyageai-embeddings` to create an inference endpoint that performs a `text_embedding` task. The embeddings created by requests to this endpoint will have 512 dimensions.
            
          {
    "service": "voyageai",
    "service_settings": {
        "model_id": "voyage-3-large",
        "dimensions": 512
    }
}
              Run `PUT _inference/rerank/voyageai-rerank` to create an inference endpoint that performs a `rerank` task.
            
          {
    "service": "voyageai",
    "service_settings": {
        "model_id": "rerank-2"
    }
}