Admin: Settings
Administrative settings for controlling analytics rules, per-project AI image generation prompts, and global prompt preprocessing behavior.
Endpoints overview​
| Method | Endpoint | Permission | Description |
|---|---|---|---|
GET | /api/analytics-settings/age-rules | authenticated | Get age rating rules |
PUT | /api/analytics-settings/age-rules | admin:analytics:edit | Update age rating rules |
GET | /api/prompt-settings/projects/:projectId/image-generation | authenticated | Get image generation settings |
PUT | /api/prompt-settings/projects/:projectId/image-generation | admin:prompt_settings:edit | Update image generation settings |
GET | /api/preprocess-prompt-settings | admin:preprocess_prompt_settings:edit | Get preprocessing settings |
PUT | /api/preprocess-prompt-settings | admin:preprocess_prompt_settings:edit | Update preprocessing settings |
Analytics Settings​
Age-rating rules used during the LLM safety check when evaluating episode content against the project's target audience.
Get age rating rules​
GET /api/analytics-settings/age-rules — Auth required
Response — 200
{
"settings": {
"4-6": {
"forbiddenThemes": ["violence", "death", "sexual content"],
"allowedEmotions": ["joy", "surprise", "sadness", "fear"],
"maxIntensity": 3
},
"7-9": {
"forbiddenThemes": ["sexual content", "graphic violence"],
"allowedEmotions": ["joy", "surprise", "sadness", "fear", "anger"],
"maxIntensity": 5
}
}
}
Update age rating rules​
PUT /api/analytics-settings/age-rules — Auth required, Permission: admin:analytics:edit
Request body
{
"settings": {
"4-6": {
"forbiddenThemes": ["violence", "death", "sexual content"],
"allowedEmotions": ["joy", "surprise", "sadness", "fear"],
"maxIntensity": 3
}
}
}
The body may also be sent without the outer settings wrapper — the controller accepts both forms.
Response — 200
{
"settings": { /* updated rules object */ }
}
Image Generation Prompt Settings​
Per-project settings that customize the system prompt prepended to all AI image generation requests for that project.
Get image generation settings​
GET /api/prompt-settings/projects/:projectId/image-generation — Auth required
Response — 200
{
"settings": {
"systemPrompt": "Always render characters in a painterly watercolor style. Avoid photorealism.",
"negativePrompt": "photograph, 3d render, hyperrealistic"
}
}
Update image generation settings​
PUT /api/prompt-settings/projects/:projectId/image-generation — Auth required, Permission: admin:prompt_settings:edit
Request body
{
"settings": {
"systemPrompt": "Always render in a flat vector illustration style with bold outlines.",
"negativePrompt": "photograph, realistic, blurry"
}
}
The body may also be sent without the outer settings wrapper.
Response — 200
{
"settings": { /* updated settings object */ }
}
Preprocessing Prompt Settings​
Global (or per-project) settings controlling how user-authored text is preprocessed before being sent to the LLM.
Get preprocessing settings​
GET /api/preprocess-prompt-settings — Auth required, Permission: admin:preprocess_prompt_settings:edit
Query params (optional)
| Param | Type | Description |
|---|---|---|
scope | string | global (default) | project |
projectId | string | Required when scope=project |
Response — 200
{
"scope": "global",
"projectId": null,
"settings": {
"enabled": true,
"instructions": "Expand abbreviations, correct grammar, and ensure text is in the target language before LLM submission."
}
}
Update preprocessing settings​
PUT /api/preprocess-prompt-settings — Auth required, Permission: admin:preprocess_prompt_settings:edit
Request body
{
"scope": "global",
"projectId": null,
"settings": {
"enabled": true,
"instructions": "Always translate to Ukrainian before processing."
}
}
scope and projectId may also be passed as query params. The settings payload may be sent at the top level without wrapping.
Response — 200
{
"scope": "global",
"projectId": null,
"settings": { /* updated settings object */ }
}