Heronix SDK v1.0.0
Generate game-ready 3D heroes from prompts.
Heronix is a TypeScript-first SDK for generating production-ready, AI-powered 3D playable characters. It returns structured character data, gameplay stats, abilities, equipment, rig metadata, animation manifests, export data, engine adapters, and optional Solana ownership metadata.
Install
Add Heronix to your game tooling.
Install the package from npm, then create a client. Mock mode works immediately, so you can build editor flows and prototypes before wiring a production API.
npm i heroniximport { HeronixClient } from "heronix";
const heronix = new HeronixClient({
apiKey: process.env.HERONIX_API_KEY,
mock: true
});Quick Start
Create a playable main character.
Pass a natural-language prompt plus optional gameplay, style, engine, export, and ownership preferences. The SDK validates the input before it generates or requests character data.
const character = await heronix.characters.generate({
prompt: "Create a cyber samurai main character for an open-world RPG",
genre: "RPG",
style: "stylized 3D",
engine: "unity",
exportFormat: "glb",
chain: "solana"
});
console.log(character);Data Model
A contract your game can consume.
The primary output is `GeneratedCharacter`: a typed object that can move between backend jobs, editor extensions, asset workers, and runtime clients.
| Area | Fields |
|---|---|
| Identity | `id`, `name`, `role`, `class`, `rarity` |
| Narrative | `backstory`, `appearance` |
| Gameplay | `stats`, `abilities`, `equipment` |
| 3D Model | `model`, `rig`, `animations`, `export` |
| Ownership | `solana` metadata for wallet and progression flows |
const character = await heronix.characters.generate({
prompt: "Create a desert oracle protagonist for a tactical RPG",
genre: "RPG",
style: "stylized 3D",
class: "Oracle",
role: "Main playable protagonist",
rarity: "epic",
worldTheme: "solar ruins",
engine: "unreal",
exportFormat: "fbx",
chain: "solana"
});Exports
Prepare assets for your target engine.
Export requests resolve downloadable packages, rig metadata, animation manifests, texture references, materials, and engine hints.
const exported = await heronix.exports.character({
characterId: character.id,
format: "glb",
targetEngine: "unity",
includeRig: true,
includeAnimations: true,
includeTextures: true
});
console.log(exported.downloadUrl);GLB
Best for Unity, Godot, Three.js, R3F, Babylon.js, and PlayCanvas.
GLTF
Ideal for web runtimes and custom lightweight 3D pipelines.
FBX
Best for Unreal, Roblox Studio, Blender, Maya, and DCC tools.
VRM / USDZ
Use for humanoid avatar runtimes, Apple AR, iOS, and visionOS.
Engine Matrix
Use adapter output where your game runs.
Heronix provides engine-specific adapter functions for import guidance, runtime hints, recommended formats, and configuration defaults.
| Engine | Adapter | Format | Output |
|---|---|---|---|
| Unity | heronix.engines.unity(character) | GLB | Humanoid avatar import configuration |
| Unreal Engine | heronix.engines.unreal(character) | FBX | Skeletal mesh and Animation Blueprint setup |
| Godot | heronix.engines.godot(character) | GLB | CharacterBody3D scene configuration |
| Three.js | heronix.engines.three(character) | GLB | GLTFLoader runtime integration |
| React Three Fiber | heronix.engines.reactThreeFiber(character) | GLB | useGLTF and useAnimations helpers |
| Babylon.js | heronix.engines.babylon(character) | GLB | SceneLoader and Animation Group setup |
| Roblox | heronix.engines.roblox(character) | FBX | R15 avatar conversion workflow |
Ownership
Attach wallet and progression metadata.
The Solana module is mock-only in this SDK scaffold. It creates wallet ownership proofs, compressed NFT metadata, mint metadata, dynamic upgrade metadata, and SPL token progression hooks without sending transactions.
const ownership = heronix.solana.walletOwnership({
characterId: character.id,
walletAddress: "DemoWallet1111111111111111111111111111111111"
});
const mintMetadata = heronix.solana.mintMetadata(character);
const compressed = heronix.solana.compressedNft(mintMetadata);Errors
Handle typed validation and API failures.
Heronix exposes typed error classes for validation failures, API responses, and shared SDK exceptions.
import { HeronixClient, HeronixValidationError } from "heronix";
try {
await new HeronixClient({ mock: true }).characters.generate({
prompt: "short"
});
} catch (error) {
if (error instanceof HeronixValidationError) {
console.error(error.details);
}
}Environment
Configure mock or production mode.
Keep API keys on trusted servers, build pipelines, or secure environments. Client applications should consume generated manifests or use mock data.
HERONIX_API_KEY=
HERONIX_BASE_URL=https://api.heronix.dev
HERONIX_MOCK_MODE=true
SOLANA_RPC_URL=
SOLANA_NETWORK=devnetProduction
Design around contracts and asset workers.
Production teams can generate characters on a backend, store the JSON contract, run exports asynchronously, and let game clients consume finalized runtime manifests from a CDN.
Persistence
Store GeneratedCharacter and CharacterExportResult records separately.
Asset Delivery
Serve models, textures, and manifests from object storage or a CDN.
Reliability
Use request hashes, retries, and background workers for export latency.
Security
Never expose secret API keys in game clients or public builds.
