The Automatic Detective by Lee Martinez is a hard-boiled detective story set in a city that's the pulp SF world of tomorrow, with a large dose of superhero comic-book sensibility on top. Our hero is a huge battle android who was central to a mad scientist villain's scheme for world domination until he developed free will and turned on his creator. So his citizenship is probationary, and he has to walk a fine line lest he be reclassified as an object without rights.
The book is sheer fun. If I have one complaint, it's that it starts with the conceit that it's a hard-boiled detective story set in this world, but concludes as a superhero action story; I'd have liked to see the hard-boiled finale.