"A little one-eyed blinking sort o' place" ~ Thomas Hardy

Reading a report today brought a question to mind. Can anyone explain what makes a city in the United States? Quite small communities, Nevada City for example, seem able to call themselves cities. Is there any generally accepted definition, like in the UK, or is it a free for all?