Create an Google AI Studio inference endpoint Generally available
Path parameters
-
The type of the inference task that the model will perform.
Values are
completionortext_embedding. -
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,
googleaistudio.Value is
googleaistudio. -
Settings used to install the inference model. These settings are specific to the
googleaistudioservice.
PUT /_inference/{task_type}/{googleaistudio_inference_id}
Console
PUT _inference/completion/google_ai_studio_completion { "service": "googleaistudio", "service_settings": { "api_key": "api-key", "model_id": "model-id" } } resp = client.inference.put( task_type="completion", inference_id="google_ai_studio_completion", inference_config={ "service": "googleaistudio", "service_settings": { "api_key": "api-key", "model_id": "model-id" } }, ) const response = await client.inference.put({ task_type: "completion", inference_id: "google_ai_studio_completion", inference_config: { service: "googleaistudio", service_settings: { api_key: "api-key", model_id: "model-id", }, }, }); response = client.inference.put( task_type: "completion", inference_id: "google_ai_studio_completion", body: { "service": "googleaistudio", "service_settings": { "api_key": "api-key", "model_id": "model-id" } } ) $resp = $client->inference()->put([ "task_type" => "completion", "inference_id" => "google_ai_studio_completion", "body" => [ "service" => "googleaistudio", "service_settings" => [ "api_key" => "api-key", "model_id" => "model-id", ], ], ]); curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"service":"googleaistudio","service_settings":{"api_key":"api-key","model_id":"model-id"}}' "$ELASTICSEARCH_URL/_inference/completion/google_ai_studio_completion" client.inference().put(p -> p .inferenceId("google_ai_studio_completion") .taskType(TaskType.Completion) .inferenceConfig(i -> i .service("googleaistudio") .serviceSettings(JsonData.fromJson("{\"api_key\":\"api-key\",\"model_id\":\"model-id\"}")) ) ); Request example
Run `PUT _inference/completion/google_ai_studio_completion` to create an inference endpoint to perform a `completion` task type.
{ "service": "googleaistudio", "service_settings": { "api_key": "api-key", "model_id": "model-id" } }