I want to use my RPI as a IP camera to capture 4K images and stream them to another device or save them to SD card. Can I do this? Is RPI Version 3 capable of doing this?
Is there any documentation or sample code to do this?
No on every count I think. It's just not enough of a machine to pull off 4K video at usable frame rates.
The Pi camera module relies on hardware H.264 compression on the main Pi board to get the raw image capture down to a manageable size. It can't keep up with that amount of data at a usable (>24 fps) frame rate. Neither can the network controller or the USB sockets, which have maximum data rates of around 20MBps, which is slower that you'll need to successfully stream 4K footage.