// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples

[source, js]
----
const response = await client.inference.put({
  task_type: "text_embedding",
  inference_id: "alibabacloud_ai_search_embeddings",
  inference_config: {
    service: "alibabacloud-ai-search",
    service_settings: {
      api_key: "<api_key>",
      service_id: "ops-text-embedding-001",
      host: "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com",
      workspace: "default",
    },
  },
});
console.log(response);
----
