GameForge Content
AI-generated NPC dialogue, item flavour text, quests, and lore — built by game devs, for game devs.
GameForge Content is a generation API for game writing. Send a structured description of a character, item, quest, or world subject, and get back ready-to-use, in-character text shaped to your genre, tone, and length constraints. Every endpoint is backed by a DeepSeek LLM and returns clean, parseable JSON — no prompt engineering required on your side.
Endpoints
All endpoints are POST, accept a JSON body, and return JSON.
| Endpoint | What it returns |
|---|---|
POST /npc/dialogue |
An array of generated dialogue lines for a character. Body takes character (name, role, personality, optional faction), optional context (genre, player_relationship, conversation_trigger, tone), and optional options (count 1–10, max_words 5–100, include_emotion_tags). Returns lines[] where each line has text and an emotion (one of: neutral, happy, angry, fearful, sad, curious, impatient), plus cached. |
POST /item/description |
Flavour text for an item. Body takes item (name, type, rarity, optional stats, optional lore_hook) and optional context (genre, tone, max_characters 50–500, style). Returns description, character_count, and cached. |
POST /quest/generate |
A complete quest. Body takes quest (type, optional difficulty, setting) and optional context (genre, player_level 1–100, faction, tone). Returns name, description, objectives[], rewards_text, and cached. |
POST /lore/worldbuild |
A lore/worldbuilding entry. Body takes subject (type, name, optional traits[]) and optional context (genre, word_count 50–500, style, narrator). Returns lore, word_count, and cached. |
GET /health |
Liveness check. Returns {"status": "ok"}. |
Shared enums: genre accepts high_fantasy, dark_fantasy, sci_fi, western, horror, cozy, cyberpunk. Item type accepts weapon, armor, consumable, quest_item, tool, accessory; item rarity accepts common, uncommon, rare, epic, legendary. Quest type accepts fetch, escort, kill, explore, deliver, investigate, defend. Lore subject type accepts faction, location, historical_event, character_backstory, religion, artifact.
Why this API
- Structured in, structured out. You send typed JSON fields, not raw prompts, and always get back the same predictable response shape — ready to drop straight into a dialogue system, tooltip, or quest log.
- Built for game context. Genre, tone, faction, player relationship, difficulty, narrator voice and more are first-class inputs, so output stays consistent with your world instead of generic AI prose.
- Real generation constraints. Honor hard limits like
max_wordsper dialogue line,max_charactersper item description, and targetword_countfor lore — and the item and lore responses report the actualcharacter_count/word_countback to you. - Emotion-tagged dialogue. NPC lines can carry an
emotiontag (neutral, happy, angry, fearful, sad, curious, impatient) so you can drive portraits, voice direction, or animation cues. - Response caching built in. Identical requests are served from a Redis cache, so repeated calls are fast and free of duplicate generation; the
cachedflag in every response tells you whether the text was freshly generated.
Typical use cases
- Populate background NPCs with distinct, in-character barks and conversation lines instead of hand-writing every villager.
- Auto-generate item tooltips and inventory flavour text from the stats and rarity your loot system already produces.
- Spin up side quests on demand — name, description, objectives, and reward text — keyed to player level, faction, and setting.
- Build out worldbuilding: faction histories, location entries, religions, and artifact lore written in a chosen in-world narrator voice.
- Prototype a game's writing tone quickly by sweeping the same subject across genres and styles.
Good to know
- Generation is LLM-backed, so responses take real time (typically a few seconds) and are non-deterministic — the same input can produce different text on a cache miss. Use the
cachedflag to tell fresh generations from cache hits. - Required fields matter.
/npc/dialogueneedscharacter.name,role, andpersonality;/item/descriptionneedsitem.name,type, andrarity;/quest/generateneedsquest.typeandsetting;/lore/worldbuildneedssubject.typeandname. Everything incontext/optionsis optional and defaults to a high-fantasy preset. - Length limits are targets, not hard guarantees.
max_words,max_characters, andword_countare passed to the model as instructions; the returnedcharacter_count/word_countlet you verify and re-roll if a result overshoots. typeandraritystyle fields are enums — values outside the lists above are rejected with a validation error.- Output is always a JSON object parsed from the model, so you can consume it directly without scraping free-form text.