Skip to content

Instantly share code, notes, and snippets.

View Butts's full-sized avatar
🙂

Ryan Butts

🙂
  • United Kingdom
View GitHub Profile
@Butts
Butts / gaiaonline_gsi_ref.mdx
Last active July 31, 2026 18:01
A basic reference for Gaiaonline's Game System Interface API.

API Reference

The Gaia Online Game System Interface (GSI) is an internal, public-facing HTTP API. Its primary use is for the support for games on Gaia Online. It is also a general-use API for other various systems such as market and user data etc. There is no OAuth, or authentication of any kind, apart from some methods that require you to be authenticated on Gaia Online, or to pass a session when prompted.

Base URL

https://www.gaiaonline.com/chat/gsi

Disclaimer

Please use responsibly; do not spam etcetera, follow Gaia Online's ToS, Guidelines and Privacy Policy in accordance with this.

from PIL import Image
import pathlib
# we're using PIL, Python Image Library, pip install -U Pillow
# our characters as a string that'll act as a map
ASCII_CHARS = '.%#*+=-:. '
CARD_IMG_PATH = pathlib.Path('images') # /images directory
@Butts
Butts / gaia_avatar.py
Last active November 24, 2025 22:42
This was ported from some very old code, I was unsure it'd work, but with some tinkering, I managed to get it to work. The substring stuff is not really ideal, but it works. Pretty funky stuff.
import zlib
import enum
# Generate absolute value crc32 -> 64bit.
def abs_crc32_64bit(value: str) -> int:
crc = abs(zlib.crc32(value.encode()))
if crc & 0x80000000:
crc ^= 0xFFFFFFFF
crc += 1