Can not deploy ELSER to my ML cluster

I am trying to add ELSER to my existing ES index. When I run the below code following the docs:

    # Creates the ELSER model configuration. Automatically downloads the model if it doesn't exist.
    res = client.ml.put_trained_model(
        model_id=".elser_model_2",
        input={"field_names": ["text_field"]},
    )
    print(res)

I get the following error:

elasticsearch.BadRequestError: BadRequestError(400, 'action_request_validation_exception', "Validation Failed: 
1: [model_type] must be set if [definition] is not defined.;
2: [inference_config] must not be null.;
3: Invalid model_id; '.elser_model_2' can contain lowercase alphanumeric (a-z and 0-9), hyphens or underscores; must start and end with alphanumeric;")

Any ideas what I am doing wrong here?