Skip to main content

Introduction

You can use Gigax to quickly create dynamic content for your game. There are two ways to access our models:

  • Our API;
  • Our open-weight models (coming soon).

Features

Quickly create quest systems

Let's say you're creating quests for your new game. You could develop custom code to check for milestones like:

{
"title": "Grand Master of the Mystic Arts",
"description": "Successfully cast all known mystic spells in a single encounter.",
"reward": 200
}

But that would require ad-hoc code for each quest - tedious, no?

Instead, you can check for quest completion with a single API call:

curl --location "https://api.gig.ax/quest" \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header "Authorization: Bearer $GIGAX_API_KEY" \
--data '{
"latestEvents": [
"Hero is attacked by Goblin",
"Hero casts Fireball",
"Hero casts Heal",
"Hero casts Invisibility"
],
"quests": [
{
"title": "Grand Master of the Mystic Arts",
"description": "...",
"reward": 200
},
{
"title": "Pet a cat",
"description": "...",
"reward": 10
}
]
}'

This will return the index of the completed quests:

{
"completedQuests": [0]
}

That's it!

Procedural achievements

To increase replayability, you don't have to pre-generate a static list of quests. Instead, you can pass in the latest game events and let Gigax generate unlocked quests (achievements) on the fly.

curl --location "https://api.gig.ax/achievement" \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header "Authorization: Bearer $GIGAX_API_KEY" \
--data '{
"latestEvents": [
"Hero is attacked by Goblin",
"Hero casts Fireball",
"Hero casts Heal",
"Hero casts Invisibility"
]',
"alreadyUnlockedAchievements": [
{
"title": "Grand Master of the Mystic Arts",
"description": "...",
"reward": 200
}
]

This will generate a new achievement:

{
"title": "Goblin meat, medium rare",
"description": "Defeat a Goblin with a Fireball",
"reward": 20
}

Clever NPCs

Quests and achievements are cool, but they really shine when they're tied to NPCs. You can use Gigax to make your NPCs:

  • react to the player's actions and autonomously decide what to do next;
  • distribute quests and rewards.

Here's a sample call to our API:

curl --location "https://api.gamemaster.ai/v1/character/action" \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header "Authorization: Bearer $YOUR_API_KEY" \
--data '{
"setting": "Ancient Ruins",
"locations": ["Hidden Chamber", "Forsaken Hallway"],
"currentLocation": "Hidden Chamber",
"surroundingObjects": ["Chest", "Sarcophagus"],
"characters": ["DemonSl4y3r", "Goblin"],
"personality": "Brave and cunning",
"availableActions": ["Attack", "Cast Spell", "Hide", "Loot"],
"generateQuests": true,
}'

Which will return a response like this:

{
"action": {
"name": "Attack",
"params": {
"characterTarget": "Dark Wizard"
}
}
}

or, if generateQuests is set to true:

{
"quest": {
"title": "Grand Master of the Mystic Arts",
"description": "Successfully cast all known mystic spells in a single encounter.",
"reward": 200
}
}