๐ API Documentation
Canonical API reference for Grudge Studio ObjectStore โ synced from api/v1/master-*.json on Mon, 22 Jun 2026 14:21:54 GMT.
Overview
The ObjectStore API provides read-only access to all static game data for Grudge Warlords. This includes:
- 868 Weapons across weapon categories with tier expansion (canonical:
master-weapons.json) - 1,344 Equipment items โ armor sets, gems, accessories
- 104 Materials for crafting (ore, wood, cloth, leather, gems, essences)
- 132 Consumables including foods, potions, and engineer items
- 268 Weapon Skills with icons, cooldowns, and prefab wiring
- 143 VFX Effect Sprites with frame data and blend modes
- 209 Battle Abilities with effect chains and follow-ups
- 11 Professions with skill trees and 2,183 recipes
- 19 Faction Units for RTS game mode
- 2,347 Master Items with GRUDGE UUIDs (
master-items.json) - 2,765 Registry Entries in
master-registry.json - 0 Unified Items in items-database.json (browser UI)
- 313 Animated Characters in sprite-characters.json
- 127 API Endpoints โ static JSON under
/api/v1/, no auth required
This API requires no authentication and returns JSON data. Ideal for building game companions, crafting calculators, or AI-powered assistants.
Base URL
https://info.grudge-studio.com/docs
All endpoints are relative to this base URL. For example:
GET https://info.grudge-studio.com/api/v1/weapons.json
Mirror: https://molochdagod.github.io/ObjectStore/api/v1/
Data Architecture โ What Controls What
ObjectStore (this repo) is the single source of truth for all game data schemas.
- ObjectStore JSON (
api/v1/master-*.json) โ canonical item definitions, skills, weapon skills, recipes, materials, tiers. Every entry has a GRUDGE UUID. - R2 CDN (
assets.grudge-studio.com) โ binary files only: GLB/GLTF models, PNG icons, textures, audio. Served by ther2-cdnWorker with CORS*. Never commit large GLBs to git โ upload to R2. - D1
asset_registry(grudge-assets-db) โ searchable index for 3D models: category, R2 key, bone map, animation packs, deterministicgrudgeUuid. API:api.grudge-studio.com/assets. - ObjectStore D1 (
grudge-objectstore) โ icon search index + catalog metadata. API:objectstore.grudge-studio.com/api/v1/icons/*. - info.grudge-studio.com โ public browsable UI for all game data (this site).
- api.grudge-studio.com โ live game API consuming ObjectStore data + player state from PostgreSQL.
GRUDGE UUID links everything: SKIL-...(skill) โ prefab.vfxRef โ R2 path. Game client resolves UUIDs via the ObjectStore API at runtime.
3D GLB binaries are a separate stack from ObjectStore JSON โ see 3D Storage & CDN for R2 URLs, D1 asset_registry, and Forge builtin: keys. Do not use /api/v1/asset-registry.json for live GLB lookup.
Icon & Asset Paths
All icon URLs in JSON data use relative paths (e.g. /icons/weapons/Sword_01.png). Each file also has a stable ICON-* UUID in icon-registry.json. Browse visually at Icon Library or resolve at runtime via grudgeSDK.resolveIconUrl().
Prefab Connection Fields
Every weapon skill has a prefab block for game engine wiring:
"prefab": {
"modelRef": null, // GRUDGE UUID โ GLB model on R2
"vfxRef": null, // GRUDGE UUID โ VFX effect on R2
"impactRef": null, // GRUDGE UUID โ impact particle
"animationClip": "2h_slash", // animation clip name
"soundRef": null, // GRUDGE UUID โ audio on R2
"projectileRef": null, // GRUDGE UUID โ projectile model
"cameraShake": null // camera shake profile
}
Fields are null until assets are created and wired. Game client skips null refs gracefully.
Authentication
No Auth Required
The ObjectStore API is completely public. No API keys, tokens, or authentication headers are needed. Simply make HTTP GET requests to any endpoint.
This API only serves static game definitions. For player-specific data (inventory, characters, progress), you'll need authenticated access to our Supabase database. See Database Schema for details.
Weapons Endpoint
Returns all weapon definitions organized by category. Each weapon includes stats, abilities, lore, and crafting requirements.
Response Structure
{
"version": "1.0.0",
"generated": "2026-02-12T00:00:00Z",
"categories": {
"swords": {
"craftedBy": "Miner",
"category": "1h",
"items": [
{
"id": "sword-bloodfeud",
"name": "Bloodfeud Blade",
"type": "Sword",
"lore": "Forged in endless clan blood feuds",
"stats": {
"damageBase": 50,
"damagePerTier": 12,
"speedBase": 100,
"critBase": 3
},
"basicAbility": "Vengeful Slash",
"abilities": ["Blood Rush", "Iron Grudge", "Clan Charge"],
"signatureAbility": "Crimson Reprisal",
"passives": ["Bloodlust", "Swift Vengeance", "Deep Cuts"]
}
]
},
"axes": { ... },
"daggers": { ... },
"spears": { ... },
"maces": { ... },
"hammers1h": { ... },
"hammers2h": { ... },
"greatswords": { ... },
"greataxes": { ... },
"bows": { ... },
"crossbows": { ... },
"guns": { ... },
"fireStaves": { ... },
"frostStaves": { ... },
"holyStaves": { ... },
"lightningStaves": { ... },
"arcaneStaves": { ... },
"tomes": { ... }
}
}
Weapon Categories
| Category | Type | Crafted By | Count |
|---|---|---|---|
| Swords | 1-Hand | Miner | 6 |
| Axes | 1-Hand | Miner | 6 |
| Daggers | 1-Hand | Miner | 6 |
| Spears | 2-Hand | Miner | 6 |
| Maces | 1-Hand | Miner | 6 |
| Hammers (1H) | 1-Hand | Miner | 6 |
| Hammers (2H) | 2-Hand | Miner | 6 |
| Greatswords | 2-Hand | Miner | 6 |
| Greataxes | 2-Hand | Miner | 6 |
| Bows | Ranged 2H | Forester | 6 |
| Crossbows | Ranged 2H | Engineer | 6 |
| Guns | Ranged 2H | Engineer | 6 |
| Fire Staves | Ranged 2H | Mystic | 6 |
| Frost Staves | Ranged 2H | Mystic | 6 |
| Holy Staves | Ranged 2H | Mystic | 6 |
| Lightning Staves | Ranged 2H | Mystic | 6 |
| Arcane Staves | Ranged 2H | Mystic | 6 |
| Tomes | Off-hand | Mystic | 12 |
Equipment Endpoint
Returns 150 armor items (6 sets ร 8 slots ร 3 material types + gems) with stats, procs, and set bonuses.
Materials Endpoint
Returns all crafting materials including ores, wood, cloth, leather, gems, and magical essences.
Material Categories
| Category | Gathered By | Tiers |
|---|---|---|
| Ore | Miner | T1-T8 |
| Ingots | Refined | T1-T8 |
| Wood | Forester | T1-T8 |
| Planks | Refined | T1-T8 |
| Cloth | Mystic | T1-T8 |
| Leather | Forester | T1-T8 |
| Essence | Mystic | T1-T8 |
| Gems | Miner | T1-T8 |
| Infusions | Various | T1-T5 |
Armor Endpoint
Returns armor sets organized by profession and type.
Armor Sets
| Profession | Type | Sets |
|---|---|---|
| Miner | Metal Plate | Guardian, Berserker |
| Forester | Leather | Stalker, Brawler |
| Mystic | Cloth | Scholar, Archmage |
| Engineer | Mech | Mechanist, Inventor |
Each set contains 6 pieces: Head, Chest, Legs, Hands, Feet, Shoulders.
Consumables Endpoint
Returns all consumable items including foods, potions, and engineer utilities.
Consumable Types
| Type | Profession | Count | Effect |
|---|---|---|---|
| Red Foods | Chef | 30 | Attack/Damage buffs |
| Green Foods | Chef | 30 | Regen/Healing buffs |
| Blue Foods | Chef | 30 | Mana/Magic buffs |
| Potions | Chef/Mystic | 30 | Combat effects |
| Engineer Items | Engineer | 12 | Utility/Explosives |
Skills Endpoint
Returns weapon combat skills with tooltips, cooldowns, and damage formulas.
{
"skills": [
{
"id": "vengeful-slash",
"name": "Vengeful Slash",
"weaponType": "Sword",
"slot": "basic",
"tooltip": "A fierce slash that builds Grudge Mark stacks...",
"cooldown": 0,
"manaCost": 0,
"damage": "100% weapon damage",
"effect": "Applies Grudge Mark (5% damage amp, max 3)"
}
]
}
Weapon Skills Endpoint
Returns 473 weapon skills across 24 weapon types sourced from the Warlord Crafting Suite. Each skill includes an icon path, cooldown, mana cost, effects, and slot assignment.
Response Structure
{
"version": "1.0.0",
"totalSkills": 473,
"weaponTypes": [
{
"weaponType": "Sword",
"skillCount": 18,
"skills": [
{
"id": "sword_vengeful_slash",
"name": "Vengeful Slash",
"slot": "Attack",
"cooldown": 0,
"manaCost": 0,
"description": "A fierce slash dealing 100% weapon damage...",
"effect": "Applies Grudge Mark (5% damage amp, max 3)",
"icon": "/icons/wcs/weapons/Sword_01.png"
}
]
}
]
}
Slot Types
| Slot | Description | Color |
|---|---|---|
| Attack | Primary damage abilities | Green |
| Core | Core rotation skills | Blue |
| Defense | Defensive/utility skills | Yellow |
| Special | Situational abilities | Purple |
| Ultimate | High-impact ultimate abilities | Red |
Weapon Types (24)
Sword, Axe (1H), Greatsword, Greataxe, Bow, Crossbow, Gun, Fire Staff, Frost Staff, Holy Staff, Lightning Staff, Nature Staff, Dagger, Arcane Staff, Spear, Hammer, Scythe, Tool, Fire Tome, Frost Tome, Holy Tome, Shadow Tome, Nature Tome, Arcane Tome
Professions Endpoint
Returns all 5 professions with their skill trees, recipes, and specializations.
Professions
| Profession | Role | Skill Nodes | Crafts |
|---|---|---|---|
| โ๏ธ Miner | Weaponsmith & Armorsmith | 42 | Metal weapons, plate armor |
| ๐ฒ Forester | Bowyer & Leatherworker | 28 | Bows, leather armor |
| ๐ฎ Mystic | Enchanter & Clothier | 37 | Staves, cloth armor, enchants |
| ๐ฒ Chef | Cook & Alchemist | 28 | Foods, potions |
| ๐ง Engineer | Mechanist & Siege Master | 28 | Guns, crossbows, mech armor |
Classes & Races Endpoints
4 classes โ Warrior, Mage Priest, Worge, Ranger โ with starting attributes, abilities, and weapon restrictions.
6 races โ Human, Orc, Elf, Undead, Barbarian, Dwarf โ with attribute bonuses and faction alignment.
8 attributes with stat formulas โ STR, INT, VIT, DEX, END, WIS, AGI, TAC.
Enemies & Bosses
38 enemies across 8 tiers with abilities, drops, and 3D asset paths.
12 bosses with multi-phase mechanics, drops, and Gouldstone chances.
Factions
3 factions โ Crusade, Legion, Fabled โ with lore, race mappings, and faction-specific bonuses.
VFX Effect Sprites
147 VFX sprite sheets sourced from GRUDA-Wars. Includes frame dimensions, frame counts, categories, blend modes, and source image URLs.
Response Structure
{
"version": "1.0.0",
"totalEffects": 147,
"categories": ["fire", "ice", "lightning", "nature", "dark", ...],
"effects": [
{
"key": "fireSpin",
"name": "Fire Spin",
"category": "fire",
"frameWidth": 100,
"frameHeight": 100,
"cols": 8,
"rows": 8,
"totalFrames": 64,
"blendMode": "screen",
"src": "/effects/fire_spin.png"
}
]
}
See all effects animated in real-time at VFX Effects Browser
Battle Ability Effects
209 abilities mapping class skills, weapon abilities, and enemy attacks to their VFX effect chains with follow-up effects.
Ability Sources
| Source | Description |
|---|---|
| Class Abilities | Warrior, Mage, Ranger, Worge class skills |
| Weapon Abilities | Skills tied to specific weapon types |
| Enemy Abilities | Boss and mob attack effects |
Sprite Database
Canonical 9,724 ICON-* image catalog โ skills, weapons, armor, sigils, UI. Each entry: grudgeUuid, iconPath, cdnUrl, category.
Search and copy UUIDs at Icon Library ยท lightweight shards: /api/v1/icon-shards/{category}.json
Category manifest for browsers โ counts, labels, sample thumbnails, shard paths. Pair with icon-search-index.json for client-side search.
Live REST search on ObjectStore worker โ paginated results with CDN URLs. Also: /icons/categories, /icons/by-path?path=, /icons/:grudgeUuid.
Full sprite database โ 500+ icon paths organized by category (weapons, armor, skills, items).
246 sprite path mappings for weapons and armor icons โ maps item IDs to their sprite sheet locations.
5,485 2D sprites organized into 13 categories โ characters, enemies, bosses, monsters, effects, icons, backgrounds, and more. Sources include RPG-MODULAR, betta-warlords, grudge-angeler, and grudawars.
Browse all sprites visually at 2D Models Browser
Faction Units (RTS)
19 RTS faction units across 3 factions with stats, animations, and sprite paths.
Node upgrade system โ unit tiers, costs, spawn rates, vision radius.
3D Storage & CDN Access
Grudge uses three layers for 3D content. Use the right tab/API for each โ do not mix ObjectStore JSON paths with raw R2 GLB URLs.
| Layer | Base URL | What's stored | Browse / access |
|---|---|---|---|
| R2 CDN | https://assets.grudge-studio.com/ |
GLB/GLTF binaries under models/, builtin/, game-assets/icons/ |
3D Models Browser ยท 3DFX Viewer ยท direct HEAD on CDN URL |
| D1 asset registry | https://api.grudge-studio.com/assets |
Category, R2 key, bone map, animation pack names, file size, deterministic UUID | GET /assets?limit=50 ยท /assets/category/character ยท /assets/uuid/:uuid |
| ObjectStore JSON | https://objectstore.grudge-studio.com/api/v1/ |
Game design registries (models3d.json, rtsModels.json, prefab wiring) |
RTS Models ยท Asset Registries ยท this docs sidebar |
| Game Forge builtins | builtin:<key> in scene JSON |
Editor starter maps/characters; large maps on R2 at /builtin/*.glb |
forge.grudge-studio.com ยท resolves to CDN at runtime |
R2 key layout (3D models)
models/characters/<name>.glb โ rigged humanoids (Mixamo / grudge6)
models/environments/<name>.glb โ maps, arenas, terrain GLBs
models/weapons/<name>.glb โ attachable weapon meshes
models/animations/<name>.glb โ standalone animation clips
models/buildings/<name>.glb โ structures
builtin/<name>.glb โ Game Forge editor starters (some CDN-only)
Animation & mesh wiring
Character GLBs in models/characters/ get default animation packs in D1: glocomotion, glocomotion_combat, gestures_basic. Bone map is detected from filename/path (mixamo, bip001 for grudge6, kaykit). Weapons declare attachmentProfile (main_hand, off_hand, ranged_2h) and universal skeleton compatibility.
grudge6 race characters use FBX on CDN (not GLB) for material fidelity โ see RTS-Grudge FactionCharacterRegistry. ObjectStore prefab.modelRef points at registry UUIDs; games resolve UUID โ R2 URL via the asset API or icon resolver.
Upload pipeline (local โ R2 โ D1)
Run from RTS-Grudge after placing files or auditing Documents:
# Audit + upload + purge local copies (โค50 MB default)
npx tsx scripts/audit-documents-assets.ts --from-json scan.ndjson --upload --purge --priority
# Seed Cloudflare D1 asset_registry
npx tsx scripts/seed-d1.ts
# Bulk upload from client/public/models (fleet repo)
npx tsx scripts/upload-to-r2.ts
npx tsx scripts/seed-d1.ts
~2,200 local GLB/GLTF files under Documents are deduped by MD5 hash, uploaded to assets.grudge-studio.com, registered in D1 via RTS-Grudge/scripts/seed-d1.ts, and purged from disk after CDN HEAD verification. Pipeline script: audit-documents-assets.ts. Live examples: builtin/map-underground-wars.glb, models/weapons/bow_23.glb.
Maps & Terrain
2D tile maps and biome presets are JSON here. Full 3D arena/map GLBs (e.g. map-underground-wars) are on R2 under builtin/ and referenced in Game Forge as builtin:<key> โ see 3D Storage & CDN.
2 tile-based RTS maps with nodes, terrain objects, roads, and collision data.
Procedural terrain โ 5 biome presets (plains, mountains, islands, desert, arena).
Materials, 7 skybox presets, 10 particle effects, 5 spell effects.
Animations
animations.json defines clip names, blend rules, and state-machine wiring. Actual Mixamo / combat GLB clips live on R2 at models/animations/*.glb and are indexed in D1 โ see 3D Storage & CDN.
Animation system v2.0 โ 18 common anims, transition rules, blend config. Resolve binary clips via D1 /assets/category/animation.
5 RTS camera presets, 4 chase camera presets, FPS, mouse controller config.
AI Systems
AI behavior trees โ 7 node types, entity states, blackboard, scoring.
ECS components โ 8 component types, 2 systems, spatial hash config.
Tier System
All equipment in Grudge Warlords uses an 8-tier system:
| Tier | Name | Level Req | Material Example |
|---|---|---|---|
| T1 | Common | 1 | Copper, Pine |
| T2 | Uncommon | 10 | Iron, Oak |
| T3 | Rare | 20 | Steel, Maple |
| T4 | Epic | 30 | Mithril, Ash |
| T5 | Legendary | 40 | Adamantine, Ironwood |
| T6 | Mythic | 50 | Orichalcum, Ebony |
| T7 | Ancient | 60 | Starmetal, Wyrmwood |
| T8 | Divine | 70 | Divine Ore, Worldtree |
Stats scale with tier using base + (perTier ร (tier - 1))
Items Database
Unified item database with 3,425 items across 8 categories: weapons, armor, consumables, materials, accessories, relics, capes, and shields. Each item includes an icon URL, stats, tier, tooltip, and category metadata.
Response Structure
{
"version": "1.0.0",
"totalItems": 3425,
"categories": ["weapons", "armor", "consumables", "materials", "accessories", "relics", "capes", "shields"],
"items": [
{
"id": "sword-bloodfeud-t5",
"name": "Bloodfeud Blade",
"category": "weapons",
"type": "Sword",
"tier": 5,
"icon": "/icons/weapons/Sword_01.png",
"tooltip": "Forged in endless clan blood feuds",
"stats": { "damage": 98, "speed": 100 }
}
]
}
Browse all items, foods, potions, recipes, buildings, and mounts at GRUDGE Item Database (canonical; ItemBrowser.html redirects). Validate with npm run validate:catalog.
Sprite Characters
275 animated 2D characters with full animation manifests. Supports grid-based sprite sheets and frame-sequence formats. Sources include RPG-MODULAR, betta-warlords, grudge-angeler, and grudawars.
Response Structure
{
"version": "2.0.0",
"totalCharacters": 275,
"characters": [
{
"id": "warrior_male",
"name": "Warrior Male",
"source": "RPG-MODULAR",
"animations": {
"idle": { "src": "/sprites/Warrior/Idle.png", "cols": 8, "rows": 1 },
"walk": { "src": "/sprites/Warrior/Walk.png", "cols": 8, "rows": 1 },
"attack": { "src": "/sprites/Warrior/Attack.png", "cols": 6, "rows": 1 }
}
}
]
}
Browse all sprites at 2D Models Browser
grudgeDot Assets
grudgeDot game asset manifest โ sprite objects, animations, and resource paths for use in grudgeDot events and scenes.
25 hero class โ sprite mappings for grudgeDot Assistant. Maps class/race combinations to their corresponding sprite character IDs.
{
"version": "1.0.0",
"totalAliases": 25,
"aliases": [
{ "heroClass": "warrior", "race": "human", "spriteId": "warrior_male", "src": "/sprites/Warrior/Idle.png" }
]
}
Voxel Assets
Voxel model asset registry โ .vox and converted GLB/GLTF models for characters, props, and terrain elements.
Asset Registries
JSON catalogs for 2D icons, sprites, VFX, and UI. For live 3D GLB binaries use 3D Storage & CDN (assets.grudge-studio.com + api.grudge-studio.com/assets) โ not this section.
ObjectStore master index (sprites, icons, paths) โ not the Cloudflare D1 asset_registry table. For 3D model UUID โ CDN URL, query GET https://api.grudge-studio.com/assets/uuid/:uuid.
167 battle and scene background image paths organized by zone/theme.
VFX effects registry โ indexed list of all particle and spell effects across the codebase.
3D shader and FX registry โ GLSL shaders (fire, lightning, magic, shockwave) with metadata for the 3DFX viewer.
Spell-type arsenal โ 10 families (projectile, slash, aura, hand, aoe, wall, cloud, summon, portal, impact) with 50+ visual variants. Each variant has skillSlot and skillUses for wiring SKIL-* abilities and status effects.
Sandbox: grudge-vfx.puter.site
26 game-ready spell VFX definitions โ shaders, particles, splines, geometry, and timing. Pairs with spell-arsenal.json variant ids.
UI asset packs โ buttons, frames, icons, and HUD elements for use in game interfaces.
RTS Models
Two registries serve RTS 3D content โ use both, for different purposes:
- ObjectStore
/api/v1/rtsModels.jsonโ design-time paths and prefab wiring for the RTS game mode. - Live D1 + R2
api.grudge-studio.com/assetsโ production GLB binaries on CDN with searchable metadata (category, bone map, animation packs).
RTS-specific 3D model registry โ buildings, units, and terrain objects for the real-time strategy game mode. JSON only; resolve GLB URLs via 3D Storage.
Live D1 index of environment GLBs (maps, arenas). Each row includes r2_key โ https://assets.grudge-studio.com/{r2_key}.
Worlds
World definitions for multi-world game modes โ island maps, spawn configurations, and biome data.
Grudge Studio configuration โ service registry, feature flags, and app metadata used by the grudgeDot assistant and launcher.
AI Sprite Editor
The 2D Models Browser includes a built-in AI sprite editing assistant powered by Puter.js.
Features
- Chat Interface โ Slide-out panel with streaming AI responses. Supports GPT-4o (vision), GPT-5.4 Nano, Gemini 2.5 Flash, Claude Sonnet 4.
- Vision Analysis โ When a sprite is open in the modal, the AI sees the current canvas frame and can describe it, identify issues, and suggest fixes.
- Auto-Apply Commands โ AI returns JSON commands (
{"action":"hue","value":45}) that instantly apply to the editor controls. - Sprite Generation โ Generate new sprites via GPT Image 1.5 directly in the chat.
- Quick Actions โ One-click buttons for Analyze, Find Issues, Color Suggest, Generate Idle.
- Persistent Chat โ History saved to Puter KV storage across sessions.
Available AI Commands
| Command | Parameters | Description |
|---|---|---|
hue | value: -180 to 180 | Shift hue of sprite |
saturation | value: 0 to 200 | Adjust saturation % |
brightness | value: 50 to 200 | Adjust brightness % |
flip | โ | Flip horizontally |
trim | โ | Auto-trim transparency |
export | โ | Export current frame |
exportAll | โ | Export all frames |
generate | prompt: string | Generate new sprite |
Sprite Uploader & Parser
Upload and parse sprite sheets, GIFs, individual PNGs, and Aseprite atlas exports. Available via the ๐ค Upload Sprites button in the 2D Models Browser toolbar.
Supported Formats
| Format | Detection | Notes |
|---|---|---|
| PNG/WEBP Sprite Sheet | Auto-detect frame grid via transparent column/row analysis | Override cols, rows, frameW, frameH manually |
| Animated GIF | WebCodecs ImageDecoder API (with fallback) | Extracts all frames as individual canvases |
| Multiple PNGs | Sorted by filename, treated as frame sequence | Batch drag-and-drop supported |
| Aseprite JSON + PNG | Parses .json atlas for frame rects (array or object format) | Drop both files together |
AI-Assisted Detection
Click ๐ค AI Detect Layout to send a thumbnail to GPT-4o vision. The AI identifies the frame grid, character type, and animation type, then pre-fills all parse settings automatically.
Save Options
- Save to Browser โ Stores in localStorage with sprite-characters.json compatible format. Shows in gallery after refresh.
- Save to Puter Cloud โ Uploads PNG + metadata JSON to Puter cloud storage (
grudge-sprites/{category}/).
Puter.js Integration
The ObjectStore uses Puter.js v2 for free, serverless AI and cloud storage โ no API keys or backend needed.
APIs Used
| API | Purpose |
|---|---|
puter.ai.chat() | Vision analysis, sprite editing chat, streaming responses |
puter.ai.txt2img() | Sprite generation with GPT Image 1.5 |
puter.fs.write() | Save sprites to Puter cloud storage |
puter.kv.set()/get() | Persist chat history and user preferences |
Puter.js uses a user-pays model โ each user's Puter account covers their own AI usage. Developers pay nothing regardless of scale.
JavaScript SDK v5.0
Single import for all backend services + static game data:
// CDN
import { GrudgeSDK } from 'https://objectstore.grudge-studio.com/sdk/grudge-sdk.js';
// or NPM
// npm install @grudgstudio/core
import { GrudgeSDK } from '@grudgstudio/core';
const sdk = new GrudgeSDK({ token: '<JWT>' });
// Static game data
const weapons = await sdk.getWeapons();
const swords = await sdk.getWeaponsByCategory('swords');
const items = await sdk.getItemsDatabase(); // 3,425 items
const chars = await sdk.getSpriteCharacters(); // 275 animated chars
const results = await sdk.search('iron');
// Tier colors
const t5 = GrudgeSDK.getTierColor(5); // { name: 'Red', hex: '#ff4d4d', label: 'Legendary' }
Backend Service Clients (SDK v5.0)
The SDK v5.0 includes authenticated clients for all Grudge Studio VPS services:
| Client | URL | Description |
|---|---|---|
sdk.auth | id.grudge-studio.com | Login, register, guest, wallet, Discord, Puter auth |
sdk.game | api.grudge-studio.com | Characters, crafting, combat, lobbies, islands |
sdk.account | account.grudge-studio.com | Profile, friends, inventory management |
sdk.launcher | launcher.grudge-studio.com | App manifest, patch notes, update checks |
sdk.assets | assets-api.grudge-studio.com | R2 asset listing, upload, CDN URL resolution |
sdk.ws | ws.grudge-studio.com | Real-time WebSocket for islands, PvP, chat |
const sdk = new GrudgeSDK({ token: '<JWT>' });
// Auth
const res = await sdk.auth.login('username', 'password');
const me = await sdk.auth.getMe();
// Game API
const chars = await sdk.game.listCharacters();
const balance = await sdk.game.getBalance(charId);
await sdk.game.startCraft({ char_id: 1, recipe_key: 'iron-sword' });
// Account
const profile = await sdk.account.getProfile(grudgeId);
const friends = await sdk.account.listFriends();
// Asset Service (R2)
const assets = await sdk.assets.listAssets({ prefix: 'models/' });
// WebSocket
const socket = sdk.ws.game();
socket.emit('join-island', { island_key: 'island_1' });
Python Examples
import requests
BASE_URL = "https://objectstore.grudge-studio.com/api/v1"
# Get all weapons
weapons = requests.get(f"{BASE_URL}/weapons.json").json()
# Find all swords
swords = weapons["categories"]["swords"]["items"]
print(f"Found {len(swords)} swords")
# Get materials
materials = requests.get(f"{BASE_URL}/materials.json").json()
# Find T5+ ores
high_tier_ores = [m for m in materials["materials"]
if m["category"] == "ore" and m["tier"] >= 5]
Search API (Serverless)
Serverless search across all ObjectStore data. Searches weapons, armor, materials, consumables, enemies, bosses, skills, and sprites.
Parameters
| Param | Required | Default | Description |
|---|---|---|---|
q | Yes | โ | Search query string |
type | No | all | Filter by type: weapons, armor, materials, consumables, enemies, bosses, skills, sprites |
limit | No | 50 | Max results (1-200) |
Example
GET /api/search?q=iron&type=materials&limit=10
{
"query": "iron",
"type": "materials",
"totalResults": 3,
"results": [
{ "type": "material", "id": "iron-ore", "name": "Iron Ore", "category": "ore", "tier": 2 },
{ "type": "material", "id": "iron-ingot", "name": "Iron Ingot", "category": "ingot", "tier": 2 }
]
}
The /api/search and /api/stats endpoints are serverless functions available only when deployed on Vercel. The static JSON files work on both GitHub Pages and Vercel.
Stats API (Serverless)
Returns aggregate statistics for all ObjectStore data โ total counts by category, available endpoints, and browser pages.
AI Integration
The ObjectStore API is designed for AI agent consumption:
- No Authentication - Direct HTTP access
- JSON Format - Easy to parse
- Stable Schema - Rarely changes
- Complete Data - All game definitions in one place
Game data updates infrequently. Cache API responses for 24 hours to reduce requests and improve performance.
Example: AI Crafting Assistant
// Fetch required data
const [weapons, materials] = await Promise.all([
fetch(BASE_URL + '/weapons.json').then(r => r.json()),
fetch(BASE_URL + '/materials.json').then(r => r.json())
]);
// Helper: Get materials needed for a weapon
function getCraftingRequirements(weaponId, tier) {
const weapon = findWeapon(weapons, weaponId);
const tierMaterials = materials.materials.filter(m => m.tier === tier);
return {
weapon: weapon.name,
tier: tier,
profession: weapon.craftedBy,
primaryMaterial: tierMaterials.find(m =>
m.gatheredBy === weapon.craftedBy
)
};
}