Skip to content

Generate Profile

POST
/api/writing/worldspell/generate-profile

Induce a deterministic voice profile draft from prose samples.

Phase A6 of the M15 DE migration replaced the LLM analysis path with :func:voice_profile_inducer.induce_voice_profile. The response shape stays identical so the frontend dialog renders the output unchanged.

VoiceProfileGenerateRequest

Request to auto-generate a voice profile from existing text.

object
loreEntryId
required
Loreentryid

Legendry entry to generate profile for

string
>= 1 characters
projectId
required
Projectid

Project ID

string
>= 1 characters
sampleText
Any of:
string

Successful Response

VoiceProfileGenerateResponse

Deterministic draft voice profile for author review.

object
draftProfile
required
VoiceProfile

Voice profile for a character, faction, species, or document.

Defines intentional language deviations so WorldSpell can suppress grammar/spelling violations that are stylistic choices, not errors.

object
allowedWords
Allowedwords

Words that are intentional (lil, ya, ain’t, finna)

Array<string>
allowedPhrases
Allowedphrases

Multi-word phrases that are intentional

Array<string>
grammarExceptions
Grammarexceptions

LanguageTool rule IDs to suppress (e.g. DOUBLE_NEGATIVES)

Array<string>
voiceRegister
VoiceRegister

Language register

string
default: informal
Allowed values: formal informal aave dialectal archaic colloquial custom
customRegisterLabel
Any of:
string
examplePassages
Examplepassages

Reference text showing how this voice sounds

Array<string>
notes
Notes

Author notes about this voice

string
""
analysisSummary
required
Analysissummary

Summary of what the inducer found in the text

string
samplePassagesUsed
required
Samplepassagesused

Number of passages analyzed

integer
grammarStatus
Grammarstatus

‘ok’ when LanguageTool ran and contributed grammar_exceptions; ‘unavailable’ when LanguageTool could not initialize (bundled runtime missing, JVM crash, etc.) and the profile was induced without grammar-rule coverage. UI should warn the author that the draft has reduced fidelity in the latter case.

string
default: ok
Allowed values: ok unavailable
grammarStatusDetail
Any of:
string

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object