CIRCLES API

Base URL: https://circles.minx28.repl.co/

Endpoints

/0/circle.png

Get a 100px image. You can pass seed as a URL parameter.

/<id>/circle.png

You must set the Authorization header as your token. An ID and token can be obtained by DMing minx28#1242 on discord.
Get an image. You can pass any of seed, size, premodifiers and postmodifiers as URL parameters.
Seed is randomised by default but can be any string that is hashable.
Size defaults to 100px and is capped at 1000px.
Premodifiers and postmodifiers should both be 3 floats separated by commas, eg. 0.5,0.5,1.4. Both default to 1,1,1. Premodifiers multiply the RGB values of each random point, before the image is generated. Postmodifiers multiply the RGB of each pixel in the final image.
This endpoint is ratelimited. After each request, you will not be able to make another for size*size/10 milliseconds. If you attempt to make another request before then, you will receive 429 Too Many Requests.

Here is an example image request in python:


import requests
from PIL import Image
from io import BytesIO

response=requests.get(
  "https://circles.minx28.repl.co/YOUR_ID/circle.png",
  params={
    "size":200,
    "seed":"thisIsASeed",
    "premodifiers":"0.5,0.3,1.4",
    "postmodifiers":"1,1,1"
    # You can remove any or all of these
  },
  headers={
    "Authorization":"YOUR_TOKEN"
  }
)

img=Image.open(BytesIO(response.content))
img.save("output.png")