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

[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-3-small",
            "dimensions": 128
        }
    },
)
print(resp)
----
