// This file is autogenerated, DO NOT EDIT
// inference/service-azure-openai.asciidoc:165

[source, python]
----
resp = client.inference.put(
    task_type="completion",
    inference_id="azure_openai_completion",
    inference_config={
        "service": "azureopenai",
        "service_settings": {
            "api_key": "<api_key>",
            "resource_name": "<resource_name>",
            "deployment_id": "<deployment_id>",
            "api_version": "2024-02-01"
        }
    },
)
print(resp)
----
