Skip to main content
POST
Generate NPC dialogue

Path Parameters

character_id
string
required

Body

application/json

POST /v1/projects/{project_id}/characters/{character_id}/generate

player_actions
string[]
project_context
string | null
storyline_id
string | null
mode
string
default:standard

Generation mode: 'standard' (full pipeline) or 'fast' (skip evaluate node)

Pattern: ^(standard|fast)$
scene_id
string | null

Optional scene identifier. When provided, SceneContextLoader assembles the full scene context (location, actors, relationships, recent events) from the KG and injects it into pending_observation.

max_context_tokens
integer | null

Optional token budget cap for scene context injection. Defaults to the pack configuration value when not specified.

Required range: x >= 100
context_debug
boolean
default:false

When True, the loaded SceneContext snapshot is included in the generation response for debugging purposes.

voice
boolean
default:false

When true, synthesize an audio version of the generated dialogue via the configured TTS pipeline. Silently degrades to text-only when speech synthesis is unavailable. When successful, the response includes audio_url pointing to an MP3 served from the same project.

voice_hint
string
default:female

TTS voice gender hint when voice=true.

Pattern: ^(female|male)$

Response

Generation accepted - poll session status

The response is of type Response Generate Dialogue V1 Projects Project Id Game Narrative Characters Character Id Generate Post · object.