Image processing API for MRKT
- Rust installed
- A device or server capable of running 24/7
1. Download the repository manually or clone it:
git clone https://github.com/GDPS-MRKT/Images.git
cd Images2. Create a .env file and fill it according to your needs using .env.example as a template
3. Start the instance with:
cargo run --releasefor productioncargo runfor development/testing
Once you've done all of this, you should have a running instance!
Once you've got your instance running, you may use these endpoints:
| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
Check if the server's up or not |
GET |
/info |
Get some information about the server |
POST |
/process |
Process an image (resolution, format) |
POST /process expects a multipart form-data; here's what you can put inside:
| Field | Required | Description |
|---|---|---|
file |
Yes (not if link is provided) |
An image to process |
link |
Yes (not if file is provided) |
A link to an image to process |
resolution |
No | Something like WIDTHxHEIGHT or just a 1:1 ratio |
format |
Yes | Either png, jpg, jpeg, gif or webp |
This project is licensed under the MIT License.