You can use Contaminative Moons to build your own funny stuff! Here's the document that will help you to use the API.
I'm not entirely sure if this can be called an API or not, but anyway, let's get started.
For this instance of Contaminative Moons, the endpoint is
https://util.fiveyellowmice.com/contaminative-moons/gen-image.php. The only available methods are GET and HEAD. Any parameters described below should be present in
application/x-www-form-urlencoded form as URI query.
All parameters are required.
The width of the generated image.
The height of the generated image.
Total number of moons.
Background color. Transparent is not available if format is JPEG.
The format of the generated image.
This parameter describes how moons will be selected and shown. Because of its complexity, the format will be described later.
moons parameter is an array delimited by semicoloms (
;). Each item is constructed in this format:
moon_name specifies which moon to use. It's a enum which can be one of these values:
max_scale define the minimum and maximum scale a moon can have. They're both floats with a minimum value of 0 and maximum value of 128.
For example, the default settings in the web page (apple_new_moon_with_face, min scale is 0.15, max scale is 1), will be represented as
apple_new_moon_with_face,0.15,1. If we want to add an apple_full_moon_with_face with the default settings, it will be
In case there's an error, whether it's because of your parameters or the server's fault, a non-2xx status will be returned. And if the server managed to give you an error message, it will be returned in the response body in plain text.
Well, just go back to main page, open developer tools in your browser and switch to network tab. Look for requests to
gen-image.php then see what URL that request have.
I'm being very kind to think that you are probably to lazy to do so, so I'll throw you the URL of the default setting:
The API may change with or without prior notice. But no need to worry, the old API will continue to work for some time period because when incompatible APIs are introduced, the endpoint will change.