This endpoint is currently unavailable for 3rd-party use.
Checks are implemented to ensure that only requests from the CapeMaker frontend are allowed. This might change in the future.
Checks are implemented to ensure that only requests from the CapeMaker frontend are allowed. This might change in the future.
Request
Example valid JSON object:A Base64 encoded Portable Network Graphics (
.png, image/png) image.Developement instance only - URL mode
On dev instances, you can also pass an
On dev instances, you can also pass an
HTTP(S) URL as the image, although this option is only available while using a special mode value in the JSON object.
This way of obtaining an image was deprecated for security and performance reasons, and will fail on production deployments.A hexadecimal, three byte color code including the
# sign. Shorthand format (e.g. #AABBCC becomes #ABC) is also supported.The optional 4th byte of the color code might work, but is not officially supported and no help will be provided.
An option that determines if the
ugc flag should be added to the cape’s database entry.The
ugc flag does not (and should not in 3rd-party implementations) display on the frontend, and is only for internal use. It’s intended purpose is not currently implemented.An string that determines the mode that should be used when interpreting the
image field.To use URL mode, set this to URL_DEPRECATED. Otherwise, base64 will be used.Processing
A sequence describing how the resulting image is constructed.Validation
All fields are validated for type and content using multiple checks.
Obtaining the Image
Depending on the mode selected, the image is retrieved and parsed using the sharp JavaScript library.
Creating a template
A template is created using a pre-determined image resolution and a mask that applies the color in the cape’s texture shape. The CapeMaker logo is also added in this step.
Resizing and pasting the source image
The source image is resized to
320px x 512px and pasted exactly at the 32, 32 position from the top left in the newly generated template.Uploading to the database
The ✨ brand new cape ✨ is uploaded to CapeMaker’s Pocketbase instance with it’s metadata.
Response
Success
Example valid JSON Response:A string that determines if the action has succeeded or errored.
An HTTP(S) URL that points to the cape’s texture.

