The present invention refers to a pharmaceutical formulation for injection comprising nanoparticles as in vivo diagnostics and therapeutics. The present invention relates to an injectable pharmaceutical formulation for human medicine and/or veterinary use, comprising 5% to 50% per weight of a poloxamer, 0.1 nM to 10.0 µM nanoparticles and water or an aqueous buffer, wherein the pharmaceutical formulation is liquid at 4°C - 30°C and forms a gel at about 37°C, their use as an in vivo marker and methods of their preparation. The inventive formulation is useful for local control and prevention of spreading/diffusion of nanoparticles, and thus allows full utilization of their quantum physics properties for example as a tool to enable surgical precision of tumor removal even without tumor specific epitope binding antibodies.