Here's the Lemmy HTTP API documentation.
In Rust, you can use a HTTP client like reqwest and the lemmy_api_common crate (along with the lemmy_api
and lemmy_api_crud
crates in the README) which provides the data types needed to send/receive data when making HTTP requests.
You can use an external image hosting site like Imgur to upload the screenshot. The JSON error happens because lemm.ee has a 100 KB size limit for image uploads.