How do i access and save a image file in uv-editor with python?

Under Image there is a Save As - option

i need to know how to access this and save the image to some location.

bpy.ops.image.save_as(save_as_render=False, filepath="\\\\C:\\JCJ\\Desktop\\3d_Project\\fbx\\1\\Textures\\ElementName.png", relative_path=True, show_multiview=False, use_multiview=False)

This line of code is what i have been trying to get to work. Doesn’t work though. I hope someone has an answer or a tip

Hello sir,
I’m also trying to achieve same thing have you found a way to bypass the context check or any scripted workarounds?

https://docs.blender.org/api/current/bpy.ops.html#overriding-context