API Base URL: https://do.schogini.com:8084/api/
This API provides endpoints for checking connections, manipulating images, and universal module requests.
Method: Bearer Token
Header: Authorization: Bearer 123e4567-e89b-12d3-a456-426614174123
Endpoint: /check
Method: GET
Description: Verifies the connection using an API key.
Authorization: Bearer 123e4567-e89b-12d3-a456-426614174123
200 OK:
{
"connection_name": "sree@example.com"
}
401 Unauthorized:
{
"connection_name": "invalid"
}
Endpoint: /random_element_make
Method: POST
Description: Selects a random URL from the provided list of URLs.
x-api-key: 123e4567-e89b-12d3-a456-426614174000
{
"urls": [
"my_url_1.html",
"my_url_2.html",
"my_url_3.html"
]
}
200 OK:
"body":"{\"selected_url\":\"value1\"}"
401 Unauthorized:
{
"connection_name": "invalid"
}
422 Unprocessable Entity:
{
"error": "Unable to process image."
}
Endpoint: /universal-make
Method: POST (or PUT, PATCH as needed)
Description: Forwards the request to a target URL using custom headers and parameters.
x-api-key: 123e4567-e89b-12d3-a456-426614174000
{
"url": "random_element_make",
"method": "POST",
"headers": {
"Content-Type": "application/json"
},
"body": {
"urls": ["value1", "value2"]
}
}
200 OK:
{
"status_code": 200,
"headers": {
"date": "Thu, 05 Sep 2024 19:39:34 GMT",
"server": "uvicorn",
"content-type": "application/json"
},
"body": "{\"selected_url\":\"value1\"}"
}
Endpoint: /image-rotate
Method: POST
Description: Rotates the given image by the specified degrees.
{
"image_url": "https://example.com/image.png",
"degrees": 90
}
Binary image data with the "filename" header set to "rotated_.png"
Endpoint: /image-watermark
Method: POST
Description: Adds a watermark to the given image at the specified position and opacity.
{
"image_url": "https://example.com/image.png",
"watermark_url": "https://example.com/watermark.png",
"opacity": 50,
"position_x": 50,
"position_y": 50
}
Binary image data with the "filename" header set to "watermarked_.png"
Endpoint: /image-crop
Method: POST
Description: Crops the given image based on the specified top-left and bottom-right coordinates.
{
"image_url": "https://example.com/image.png",
"top_left_x": 10,
"top_left_y": 10,
"bottom_right_x": 90,
"bottom_right_y": 90
}
Binary image data with the "filename" header set to "cropped_.png"
Endpoint: /resize_image
Method: POST
Description: Resizes the given image to the specified width while maintaining aspect ratio.
{
"image_url": "https://example.com/image.png",
"output_format": "png",
"width": 800,
"image_as_url": false
}
Binary image data with the "filename" header set to "resized_.png"
Endpoint: /image-thumbnail
Method: POST
Description: Generates a thumbnail from the provided image URL based on the maximum width and height.
{
"image_url": "https://example.com/image.png",
"max_width": 150,
"max_height": 150
}
Binary image data with the "filename" header set to "thumbnail_.png"
Endpoint: /image-blur
Method: POST
Description: Applies a blur effect to the provided image URL based on the specified blur radius.
{
"image_url": "https://example.com/image.png",
"blur_radius": 5
}
Binary image data with the "filename" header set to "blurred_.png"
Endpoint: /image-grayscale
Method: POST
Description: Converts the provided image to greyscale.
{
"image_url": "https://example.com/image.png"
}
Binary image data with the "filename" header set to "grayscale_.png"
Endpoint: /image-format-convert
Method: POST
Description: Converts the image to the specified format (e.g., JPEG, PNG).
{
"image_url": "https://example.com/image.png",
"target_format": "jpeg"
}
Binary image data with the "filename" header set to "image_."
Endpoint: /image-info-metadata
Method: POST
Description: Retrieves metadata about the image, such as size, format, and mode.
{
"image_url": "https://example.com/image.png"
}
{
"status": "success",
"image_size_bytes": 10240,
"image_width": 800,
"image_height": 600,
"image_format": "PNG",
"image_mode": "RGBA"
}
Endpoint: /image-border
Method: POST
Description: Adds a border of specified thickness and color to the image.
{
"image_url": "https://example.com/image.png",
"border_thickness": 10,
"border_color": "#FF0000"
}
Binary image data with the "filename" header set to "image_.png"
Endpoint: /svg-reader
Method: POST
Description: Converts an SVG file from the provided URL into a PNG image.
{
"svg_url": "https://example.com/image.svg"
}
Binary image data with the "filename" header set to "image_.png"
Endpoint: /qrcode-reader
Method: POST
Description: Reads and decodes a QR code from an image URL, returning the text value encoded in the QR code.
{
"qrcode_url": "https://example.com/qrcode.png"
}
{
"value": "Decoded text from the QR code"
}
Endpoint: /qrcode
Method: POST
Description: Generates a QR code image based on the provided text input.
{
"text_input": "This is a sample QR code text"
}
Binary image data with the "filename" header set to "qrcode_.png"
Endpoint: /stick_image
Method: POST
Description: Sticks one image onto another at a specified position and size, based on percentage values.
{
"image_url_1": "https://example.com/image1.png",
"image_url_2": "https://example.com/image2.png",
"width_percentage": 50,
"left_percentage": 25,
"top_percentage": 10
}
Binary image data with the "filename" header set to "stick_image_.png"
curl -X GET "https://do.schogini.com:8084/api/check" \
-H "Authorization: Bearer 123e4567-e89b-12d3-a456-426614174000"
curl -X POST "https://do.schogini.com:8084/api/random_element_make" \
-H "Authorization: Bearer 123e4567-e89b-12d3-a456-426614174000" \
-H "Content-Type: application/json" \
-d '{
"urls": [
"my_url_1.html",
"my_url_2.html",
"my_url_3.html"
]
}'
curl -X POST "https://do.schogini.com:8084/api/universal-make" \
-H "Authorization: Bearer 123e4567-e89b-12d3-a456-426614174000" \
-H "Content-Type: application/json" \
-d '{
"url": "random_element_make",
"method": "POST",
"headers": {"Content-Type": "application/json"},
"body": {"urls": ["value1", "value2"]}
}'
curl -X POST "https://do.schogini.com:8084/api/image-thumbnail" \
-H "Authorization: Bearer 123e4567-e89b-12d3-a456-426614174123" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://example.com/image.png",
"max_width": 150,
"max_height": 150
}'
curl -X POST "https://do.schogini.com:8084/api/image-blur" \
-H "Authorization: Bearer 123e4567-e89b-12d3-a456-426614174123" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://example.com/image.png",
"blur_radius": 5
}'
curl -X POST "https://do.schogini.com:8084/api/image-grayscale" \
-H "Authorization: Bearer 123e4567-e89b-12d3-a456-426614174123" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://example.com/image.png"
}'
curl -X POST "https://do.schogini.com:8084/api/image-format-convert" \
-H "Authorization: Bearer 123e4567-e89b-12d3-a456-426614174123" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://example.com/image.png",
"target_format": "jpeg"
}'
curl -X POST "https://do.schogini.com:8084/api/image-info-metadata" \
-H "Authorization: Bearer 123e4567-e89b-12d3-a456-426614174123" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://example.com/image.png"
}'
curl -X POST "https://do.schogini.com:8084/api/image-border" \
-H "Authorization: Bearer 123e4567-e89b-12d3-a456-426614174123" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://example.com/image.png",
"border_thickness": 10,
"border_color": "#FF0000"
}'
curl -X POST "https://do.schogini.com:8084/api/svg-reader" \
-H "Authorization: Bearer 123e4567-e89b-12d3-a456-426614174123" \
-H "Content-Type: application/json" \
-d '{
"svg_url": "https://example.com/image.svg"
}'
curl -X POST "https://do.schogini.com:8084/api/qrcode-reader" \
-H "Authorization: Bearer 123e4567-e89b-12d3-a456-426614174000" \
-H "Content-Type: application/json" \
-d '{
"qrcode_url": "https://example.com/qrcode.png"
}'
curl -X POST "https://do.schogini.com:8084/api/qrcode" \
-H "Authorization: Bearer 123e4567-e89b-12d3-a456-426614174000" \
-H "Content-Type: application/json" \
-d '{
"text_input": "This is a sample QR code text"
}'
curl -X POST "https://do.schogini.com:8084/api/stick_image" \
-H "Authorization: Bearer 123e4567-e89b-12d3-a456-426614174000" \
-H "Content-Type: application/json" \
-d '{
"image_url_1": "https://example.com/image1.png",
"image_url_2": "https://example.com/image2.png",
"width_percentage": 50,
"left_percentage": 25,
"top_percentage": 10
}'