Setting container labels with the remote api

According to the docker api documentation (specifically the change notes for v1.17) it is possible to set the labels on a container when using /containers/create, but I cannot find any examples or details on how to achieve this. How should the JSON used to create a container look if I want to set labels on it?

have you looked at the full API docs? the example request includes labels

I found out that every label value had to be a key, so the json cannot have a label set to true or a number, it will be silently ignored. I’m fact, all labels will be silently removed!