// This file is autogenerated, DO NOT EDIT
// tab-widgets/inference-api/infer-api-task.asciidoc:262

[source, python]
----
resp = 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": "<service_id>",
            "host": "<host>",
            "workspace": "<workspace>"
        }
    },
)
print(resp)
----
