Can I use a more detailed version of a model only for rendering?

I’m making a scene with lots of boxes.

I’d like to be able to replace the mesh used for these boxes with a bit more detailed one, but in the preview the detailed model duplicated tens of times works very slow.

Look up group instances, or the particle instance modifier (depending on what you’re doing.). Both will speed up your viewport as well as your render.