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

[source, python]
----
resp = client.inference.put(
    task_type="text_embedding",
    inference_id="openai_embeddings",
    inference_config={
        "service": "openai",
        "service_settings": {
            "api_key": "<api_key>",
            "model_id": "text-embedding-ada-002"
        }
    },
)
print(resp)
----
