{ "openapi": "3.1.0", "info": { "title": "AiChatTrpg", "description": "Open-source AI Game Master for tabletop RPGs", "version": "0.1.0-alpha" }, "paths": { "/api/health": { "get": { "tags": [ "health" ], "summary": "Health", "operationId": "health_api_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Health Api Health Get" } } } } } } }, "/api/auth/login": { "post": { "tags": [ "auth" ], "summary": "Login", "operationId": "login_api_auth_login_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/auth/registration-status": { "get": { "tags": [ "auth" ], "summary": "Registration Status", "operationId": "registration_status_api_auth_registration_status_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegistrationStatusResponse" } } } } } } }, "/api/auth/register": { "post": { "tags": [ "auth" ], "summary": "Register", "operationId": "register_api_auth_register_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/auth/me": { "get": { "tags": [ "auth" ], "summary": "Me", "operationId": "me_api_auth_me_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserInfo" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/auth/preferences": { "post": { "tags": [ "auth" ], "summary": "Update Preferences", "description": "Partial-merge update of the caller's preferences blob.\nKeys with value `None` are deleted; other keys overwrite. Use POST\nnot PATCH because some CDNs block PATCH (see CLAUDE.md).", "operationId": "update_preferences_api_auth_preferences_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PreferencesUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserInfo" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/auth/logout": { "post": { "tags": [ "auth" ], "summary": "Logout", "description": "Stateless logout — the client just drops the token. This endpoint\nexists so SPAs can fire-and-forget on sign-out without a 404.", "operationId": "logout_api_auth_logout_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OkResponse" } } } } } } }, "/api/characters": { "get": { "tags": [ "characters" ], "summary": "List Characters", "operationId": "list_characters_api_characters_get", "parameters": [ { "name": "ruleset_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ruleset Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CharacterPoolOut" }, "title": "Response List Characters Api Characters Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "characters" ], "summary": "Create Character", "operationId": "create_character_api_characters_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CharacterPoolCreateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CharacterPoolOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/characters/{character_id}": { "delete": { "tags": [ "characters" ], "summary": "Delete Character", "operationId": "delete_character_api_characters__character_id__delete", "parameters": [ { "name": "character_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Character Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OkResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/admin/providers": { "get": { "tags": [ "admin" ], "summary": "Get Providers", "operationId": "get_providers_api_admin_providers_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/ProviderView" }, "type": "array", "title": "Response Get Providers Api Admin Providers Get" } } } } } } }, "/api/admin/providers/{provider}": { "put": { "tags": [ "admin" ], "summary": "Update Provider", "operationId": "update_provider_api_admin_providers__provider__put", "parameters": [ { "name": "provider", "in": "path", "required": true, "schema": { "type": "string", "title": "Provider" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProviderUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProviderView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/admin/models": { "get": { "tags": [ "admin" ], "summary": "Get Models", "description": "Map provider → admin-added model list. Used by the session creator.", "operationId": "get_models_api_admin_models_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": { "items": { "type": "string" }, "type": "array" }, "type": "object", "title": "Response Get Models Api Admin Models Get" } } } } } } }, "/api/llm/providers": { "get": { "tags": [ "llm" ], "summary": "Get Providers", "description": "Return every supported provider with defaults + saved overrides.", "operationId": "get_providers_api_llm_providers_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/ProviderInfo" }, "type": "array", "title": "Response Get Providers Api Llm Providers Get" } } } } } } }, "/api/llm/test": { "post": { "tags": [ "llm" ], "summary": "Test Chat", "operationId": "test_chat_api_llm_test_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TestRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TestResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/llm/models": { "post": { "tags": [ "llm" ], "summary": "List Provider Models", "operationId": "list_provider_models_api_llm_models_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListModelsRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListModelsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/media/capabilities": { "get": { "tags": [ "media" ], "summary": "Get Media Capabilities", "operationId": "get_media_capabilities_api_media_capabilities_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaCapabilitiesResponse" } } } } } } }, "/api/media/capabilities/{provider}": { "get": { "tags": [ "media" ], "summary": "Get Provider Media Capability", "operationId": "get_provider_media_capability_api_media_capabilities__provider__get", "parameters": [ { "name": "provider", "in": "path", "required": true, "schema": { "type": "string", "title": "Provider" } }, { "name": "model", "in": "query", "required": false, "schema": { "type": "string", "default": "", "title": "Model" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CapabilityView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/media/voices": { "get": { "tags": [ "media" ], "summary": "Get Media Voices", "operationId": "get_media_voices_api_media_voices_get", "parameters": [ { "name": "provider", "in": "query", "required": true, "schema": { "type": "string", "title": "Provider" } }, { "name": "model", "in": "query", "required": false, "schema": { "type": "string", "default": "", "title": "Model" } }, { "name": "live", "in": "query", "required": false, "schema": { "type": "boolean", "default": true, "title": "Live" } }, { "name": "base_url", "in": "query", "required": false, "schema": { "type": "string", "default": "", "title": "Base Url" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "media" ], "summary": "List Media Voices", "operationId": "list_media_voices_api_media_voices_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceListRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/media/settings": { "get": { "tags": [ "media" ], "summary": "Get Media Settings", "operationId": "get_media_settings_api_media_settings_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaSettingsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "media" ], "summary": "Update Media Settings", "operationId": "update_media_settings_api_media_settings_put", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaSettingsResponse" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaSettingsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/media/image": { "post": { "tags": [ "media" ], "summary": "Generate Media Image", "operationId": "generate_media_image_api_media_image_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageGenerateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageGenerateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/media/tts": { "post": { "tags": [ "media" ], "summary": "Generate Media Tts", "operationId": "generate_media_tts_api_media_tts_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeechGenerateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeechGenerateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/media/files/{filename}": { "get": { "tags": [ "media" ], "summary": "Serve Media File", "operationId": "serve_media_file_api_media_files__filename__get", "parameters": [ { "name": "filename", "in": "path", "required": true, "schema": { "type": "string", "title": "Filename" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/llm/pool": { "get": { "tags": [ "llm" ], "summary": "Get Pool", "operationId": "get_pool_api_llm_pool_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PoolView" } } } } } } }, "/api/llm/pool/add": { "post": { "tags": [ "llm" ], "summary": "Add Entry", "operationId": "add_entry_api_llm_pool_add_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PoolView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/llm/pool/remove": { "post": { "tags": [ "llm" ], "summary": "Remove Entry", "operationId": "remove_entry_api_llm_pool_remove_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PoolEntryView" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PoolView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/llm/pool/default": { "post": { "tags": [ "llm" ], "summary": "Set Default", "operationId": "set_default_api_llm_pool_default_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PoolEntryView" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PoolView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/llm/pool/fast": { "post": { "tags": [ "llm" ], "summary": "Set Fast", "operationId": "set_fast_api_llm_pool_fast_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PoolEntryView" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PoolView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/llm/pool/dialogue": { "post": { "tags": [ "llm" ], "summary": "Set Dialogue", "operationId": "set_dialogue_api_llm_pool_dialogue_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PoolEntryView" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PoolView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/llm/pool/avatar": { "post": { "tags": [ "llm" ], "summary": "Set Avatar", "operationId": "set_avatar_api_llm_pool_avatar_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PoolEntryView" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PoolView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/llm/pool/illustration": { "post": { "tags": [ "llm" ], "summary": "Set Illustration", "operationId": "set_illustration_api_llm_pool_illustration_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PoolEntryView" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PoolView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/llm/pool/narration": { "post": { "tags": [ "llm" ], "summary": "Set Narration", "operationId": "set_narration_api_llm_pool_narration_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PoolEntryView" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PoolView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/modules/extract-title": { "post": { "tags": [ "modules" ], "summary": "Extract Title", "description": "Clean module title for the room name `[coc]`.\n\nTwo modes:\n - `module_id` set → look up the row, return cached title if present,\n otherwise call the fast model and cache the result.\n - `filename`+`markdown` only → one-shot extraction, no persistence\n (used by older flows without a saved module).\n\nFalls back to a tidied filename when the model is unavailable.", "operationId": "extract_title_api_modules_extract_title_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModuleTitleRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModuleTitleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/modules/parse": { "post": { "tags": [ "modules" ], "summary": "Parse Uploaded Module", "operationId": "parse_uploaded_module_api_modules_parse_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_parse_uploaded_module_api_modules_parse_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModuleParseResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/modules/accepted-extensions": { "get": { "tags": [ "modules" ], "summary": "Accepted Extensions", "operationId": "accepted_extensions_api_modules_accepted_extensions_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "type": "string" }, "type": "array", "title": "Response Accepted Extensions Api Modules Accepted Extensions Get" } } } } } } }, "/api/modules": { "get": { "tags": [ "modules" ], "summary": "List Modules", "description": "Visible modules = mine ∪ everyone-else's-shared, ordered by recency.", "operationId": "list_modules_api_modules_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ModuleSummary" }, "title": "Response List Modules Api Modules Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/modules/{module_id}": { "get": { "tags": [ "modules" ], "summary": "Get Module", "operationId": "get_module_api_modules__module_id__get", "parameters": [ { "name": "module_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Module Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModuleParseResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "modules" ], "summary": "Delete Module", "operationId": "delete_module_api_modules__module_id__delete", "parameters": [ { "name": "module_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Module Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/modules/{module_id}/semantic/parse": { "post": { "tags": [ "modules" ], "summary": "Parse Module Semantic", "operationId": "parse_module_semantic_api_modules__module_id__semantic_parse_post", "parameters": [ { "name": "module_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Module Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModuleParseResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/modules/{module_id}/share": { "post": { "tags": [ "modules" ], "summary": "Set Module Shared", "description": "Toggle visibility. Only the owner can flip the flag.", "operationId": "set_module_shared_api_modules__module_id__share_post", "parameters": [ { "name": "module_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Module Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModuleShareRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModuleSummary" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/modules/parse-stream": { "post": { "tags": [ "modules" ], "summary": "Parse Uploaded Module Stream", "operationId": "parse_uploaded_module_stream_api_modules_parse_stream_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_parse_uploaded_module_stream_api_modules_parse_stream_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/music": { "get": { "tags": [ "music" ], "summary": "List Tracks", "operationId": "list_tracks_api_music_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MusicTrackOut" }, "title": "Response List Tracks Api Music Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "music" ], "summary": "Create Track", "operationId": "create_track_api_music_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MusicTrackCreateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MusicTrackOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/music/upload": { "post": { "tags": [ "music" ], "summary": "Upload Track", "operationId": "upload_track_api_music_upload_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_upload_track_api_music_upload_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MusicTrackOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/music/{track_id}": { "put": { "tags": [ "music" ], "summary": "Update Track", "operationId": "update_track_api_music__track_id__put", "parameters": [ { "name": "track_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Track Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MusicTrackUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MusicTrackOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "music" ], "summary": "Delete Track", "operationId": "delete_track_api_music__track_id__delete", "parameters": [ { "name": "track_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Track Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OkResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/ocr/providers": { "get": { "tags": [ "ocr" ], "summary": "List Providers", "operationId": "list_providers_api_ocr_providers_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/OCRProviderInfo" }, "type": "array", "title": "Response List Providers Api Ocr Providers Get" } } } } } } }, "/api/ocr/providers/{provider}": { "put": { "tags": [ "ocr" ], "summary": "Update Provider", "operationId": "update_provider_api_ocr_providers__provider__put", "parameters": [ { "name": "provider", "in": "path", "required": true, "schema": { "type": "string", "title": "Provider" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OCRProviderUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OCRProviderInfo" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/ocr/providers/{provider}/health": { "get": { "tags": [ "ocr" ], "summary": "Provider Health", "operationId": "provider_health_api_ocr_providers__provider__health_get", "parameters": [ { "name": "provider", "in": "path", "required": true, "schema": { "type": "string", "title": "Provider" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OCRHealthResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/ocr/available": { "get": { "tags": [ "ocr" ], "summary": "List Available", "description": "Lighter-weight listing for the picker — only what the dropdown needs.", "operationId": "list_available_api_ocr_available_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "type": "object" }, "type": "array", "title": "Response List Available Api Ocr Available Get" } } } } } } }, "/api/ocr/test": { "post": { "tags": [ "ocr" ], "summary": "Test Extract", "operationId": "test_extract_api_ocr_test_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_test_extract_api_ocr_test_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OCRTestResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/rulesets": { "post": { "tags": [ "rulesets" ], "summary": "Upload Ruleset", "description": "Persist a v6 JSON artifact uploaded by the frontend.\n\nIf the artifact carries a `dice_ir` field (top-level chatrpg/new-chatlab\nshape, or legacy chatlab `parse_artifacts.*` shapes), pull it out into\nthe dedicated column. Otherwise schedule a background compile so the\ndice tab populates without the user having to click \"compile\".", "operationId": "upload_ruleset_api_rulesets_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RulesetUploadRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RulesetDetail" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "rulesets" ], "summary": "List Rulesets", "description": "Visible rulesets = mine ∪ everyone-else's-shared, ordered by recency.", "operationId": "list_rulesets_api_rulesets_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RulesetSummary" }, "title": "Response List Rulesets Api Rulesets Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/rulesets/file": { "post": { "tags": [ "rulesets" ], "summary": "Upload Ruleset File", "description": "Upload a PDF/Markdown ruleset and store it as a v6-compatible artifact.", "operationId": "upload_ruleset_file_api_rulesets_file_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_upload_ruleset_file_api_rulesets_file_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RulesetDetail" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/rulesets/{ruleset_id}": { "get": { "tags": [ "rulesets" ], "summary": "Get Ruleset", "operationId": "get_ruleset_api_rulesets__ruleset_id__get", "parameters": [ { "name": "ruleset_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Ruleset Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RulesetDetail" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "rulesets" ], "summary": "Delete Ruleset", "operationId": "delete_ruleset_api_rulesets__ruleset_id__delete", "parameters": [ { "name": "ruleset_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Ruleset Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Delete Ruleset Api Rulesets Ruleset Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/rulesets/{ruleset_id}/short-name": { "get": { "tags": [ "rulesets" ], "summary": "Get Ruleset Short Name", "description": "Return the short tag used in room titles like `[coc]<module>`.\n\nFirst call generates it via the model pool's \"fast\" entry and caches\nthe result on the ruleset row; subsequent calls are pure DB reads.\nThe cache write benefits every viewer, so non-owners on a shared\nruleset can also trigger generation.", "operationId": "get_ruleset_short_name_api_rulesets__ruleset_id__short_name_get", "parameters": [ { "name": "ruleset_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Ruleset Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Get Ruleset Short Name Api Rulesets Ruleset Id Short Name Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/rulesets/{ruleset_id}/share": { "post": { "tags": [ "rulesets" ], "summary": "Set Ruleset Shared", "description": "Toggle visibility. Only the owner can flip the flag.", "operationId": "set_ruleset_shared_api_rulesets__ruleset_id__share_post", "parameters": [ { "name": "ruleset_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Ruleset Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RulesetShareRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RulesetSummary" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/rulesets/{ruleset_id}/dice-ir/compile": { "post": { "tags": [ "rulesets" ], "summary": "Compile Dice Ir", "description": "Run the dice-IR compiler on a ruleset's content.\n\nBy default targets codex-relay's gpt-5.5. Caller can override model,\nbase_url, and api_key. The resulting artifact is saved into the ruleset's\n`dice_ir` column unless `save=false` is requested (useful for previews).", "operationId": "compile_dice_ir_api_rulesets__ruleset_id__dice_ir_compile_post", "parameters": [ { "name": "ruleset_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Ruleset Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompileDiceIRRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompileDiceIRResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/rulesets/{ruleset_id}/character-ui/compile": { "post": { "tags": [ "rulesets" ], "summary": "Compile Character Ui Endpoint", "description": "Run the character-UI compiler on a ruleset.\n\nUsed both for first-time compilation on rulesets uploaded before this\nfeature shipped, and for re-running after the user changes the default\nmodel. Defaults to the model_pool's default entry; caller may override.", "operationId": "compile_character_ui_endpoint_api_rulesets__ruleset_id__character_ui_compile_post", "parameters": [ { "name": "ruleset_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Ruleset Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompileCharacterUIRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompileCharacterUIResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/rulesets/{ruleset_id}/dice-ir/apply": { "post": { "tags": [ "rulesets" ], "summary": "Apply Check Spec", "description": "Promote one of the compiled check_specs to runtime use.\n\nCaller may pass a check_spec dict directly, or a procedure_id to pick\nout from the compiled list.", "operationId": "apply_check_spec_api_rulesets__ruleset_id__dice_ir_apply_post", "parameters": [ { "name": "ruleset_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Ruleset Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApplyCheckSpecRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RulesetDetail" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/ruleset-drafts": { "post": { "tags": [ "ruleset-drafts" ], "summary": "Create Draft", "operationId": "create_draft_api_ruleset_drafts_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateDraftRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DraftDetail" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "ruleset-drafts" ], "summary": "List Drafts", "operationId": "list_drafts_api_ruleset_drafts_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DraftSummary" }, "title": "Response List Drafts Api Ruleset Drafts Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/ruleset-drafts/{draft_id}": { "get": { "tags": [ "ruleset-drafts" ], "summary": "Get Draft", "operationId": "get_draft_api_ruleset_drafts__draft_id__get", "parameters": [ { "name": "draft_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Draft Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DraftDetail" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "ruleset-drafts" ], "summary": "Delete Draft", "operationId": "delete_draft_api_ruleset_drafts__draft_id__delete", "parameters": [ { "name": "draft_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Draft Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "boolean" }, "title": "Response Delete Draft Api Ruleset Drafts Draft Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/ruleset-drafts/{draft_id}/messages": { "get": { "tags": [ "ruleset-drafts" ], "summary": "List Messages", "description": "List one agent's transcript. `kind` is \"main\" (rule editor)\nor \"dice\" (dice procedure designer); each pane reads its own.", "operationId": "list_messages_api_ruleset_drafts__draft_id__messages_get", "parameters": [ { "name": "draft_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Draft Id" } }, { "name": "after_seq", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "After Seq" } }, { "name": "kind", "in": "query", "required": false, "schema": { "type": "string", "default": "main", "title": "Kind" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DraftMessage" }, "title": "Response List Messages Api Ruleset Drafts Draft Id Messages Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "ruleset-drafts" ], "summary": "Post Message", "description": "Append a user message + run the rule editor agent for one turn.\n\nStreams SSE events: `user_message_saved`, `message_started`,\n`text_delta`, `tool_call_started`, `tool_call_delta`, `tool_result`,\n`edit_applied`, `message_completed`, `turn_done`.", "operationId": "post_message_api_ruleset_drafts__draft_id__messages_post", "parameters": [ { "name": "draft_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Draft Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Body" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/ruleset-drafts/{draft_id}/apply": { "post": { "tags": [ "ruleset-drafts" ], "summary": "Apply Patch", "description": "Direct apply path. The agent uses POST /messages (P3); this endpoint\nis for manual / programmatic edits and for testing.", "operationId": "apply_patch_api_ruleset_drafts__draft_id__apply_post", "parameters": [ { "name": "draft_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Draft Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApplyPatchRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApplyPatchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/ruleset-drafts/{draft_id}/edits/{edit_id}/undo": { "post": { "tags": [ "ruleset-drafts" ], "summary": "Undo Edit", "operationId": "undo_edit_api_ruleset_drafts__draft_id__edits__edit_id__undo_post", "parameters": [ { "name": "draft_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Draft Id" } }, { "name": "edit_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Edit Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UndoEditResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/ruleset-drafts/{draft_id}/dice-agent/messages": { "post": { "tags": [ "ruleset-drafts" ], "summary": "Post Dice Message", "description": "Run one turn of the dice rule design agent.\n\nBody: `{ text: str }`. The dice agent now persists its transcript\njust like the main rule editor — every user/assistant/tool row\nlands in `ruleset_draft_messages` with `kind='dice'`. Reload\nrebuilds the chat from DB (caller-supplied `history` is ignored).\nSame SSE wire format as `POST /messages`, plus `dice_state_changed`\nwhen a procedure compiles successfully.", "operationId": "post_dice_message_api_ruleset_drafts__draft_id__dice_agent_messages_post", "parameters": [ { "name": "draft_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Draft Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Body" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/ruleset-drafts/{draft_id}/compile-design": { "post": { "tags": [ "ruleset-drafts" ], "summary": "Compile Design", "description": "Compile design_state -> parsed_v6 for the given draft.\n\nPOST (not PATCH) because some CDNs / proxies block PATCH (see\nCLAUDE.md). The endpoint is idempotent within a given design_state\nsnapshot.", "operationId": "compile_design_api_ruleset_drafts__draft_id__compile_design_post", "parameters": [ { "name": "draft_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Draft Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompileDesignResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/ruleset-drafts/{draft_id}/promote": { "post": { "tags": [ "ruleset-drafts" ], "summary": "Promote", "operationId": "promote_api_ruleset_drafts__draft_id__promote_post", "parameters": [ { "name": "draft_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Draft Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PromoteRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PromoteResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/ruleset-drafts/{draft_id}/recompile/dice": { "post": { "tags": [ "ruleset-drafts" ], "summary": "Recompile Dice", "operationId": "recompile_dice_api_ruleset_drafts__draft_id__recompile_dice_post", "parameters": [ { "name": "draft_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Draft Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RecompileResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/ruleset-drafts/{draft_id}/recompile/character-ui": { "post": { "tags": [ "ruleset-drafts" ], "summary": "Recompile Character Ui", "operationId": "recompile_character_ui_api_ruleset_drafts__draft_id__recompile_character_ui_post", "parameters": [ { "name": "draft_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Draft Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RecompileResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions": { "get": { "tags": [ "sessions" ], "summary": "List Sessions", "operationId": "list_sessions_api_sessions_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SessionSummary" }, "title": "Response List Sessions Api Sessions Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "sessions" ], "summary": "Create Session", "operationId": "create_session_api_sessions_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionCreateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionDetail" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}": { "get": { "tags": [ "sessions" ], "summary": "Get Session", "operationId": "get_session_api_sessions__session_id__get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionDetail" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "sessions" ], "summary": "Update Session", "operationId": "update_session_api_sessions__session_id__put", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionDetail" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "sessions" ], "summary": "Delete Session", "operationId": "delete_session_api_sessions__session_id__delete", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OkResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/character/translate": { "post": { "tags": [ "sessions" ], "summary": "Post Character Translate", "description": "Translate the session's character JSON values (skill / weapon /\nequipment names, descriptions, etc.) to the requested language.\nNumeric values, IDs, and universal attribute codes (STR/CON/...) are\npreserved verbatim.\n\nThe translated JSON overwrites ``session.character`` — there's no\nhistory layer yet; users can re-translate by calling this endpoint\nwith a different ``language`` value.", "operationId": "post_character_translate_api_sessions__session_id__character_translate_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/_TranslateCharacterBody" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionDetail" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/npcs/translate": { "post": { "tags": [ "sessions" ], "summary": "Post Npcs Translate", "description": "Translate every NPC's narrative fields in ``memory_state.npcs[]``\ninto the requested language. Numeric stats / params / portrait URLs\n/ voice IDs / visibility flags are preserved.\n\nOne LLM call covers the whole roster. The translated values overwrite\nthe existing fields — there is no history layer; users can re-call\nwith another language to switch back.", "operationId": "post_npcs_translate_api_sessions__session_id__npcs_translate_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/_TranslateCharacterBody" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionDetail" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/character/voice": { "post": { "tags": [ "sessions" ], "summary": "Post Character Voice", "description": "Set the player character's TTS voice. Writes both ``tts_voice``\n(primary) and ``active_tts_voice`` (resolved) so the chat TTS picks\nit up immediately. Pass an empty ``voice`` to clear the override.", "operationId": "post_character_voice_api_sessions__session_id__character_voice_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/_VoiceAssignBody" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionDetail" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/npcs/{npc_key}/voice": { "post": { "tags": [ "sessions" ], "summary": "Post Npc Voice", "description": "Set a single NPC's TTS voice in ``memory_state.npcs[]``.", "operationId": "post_npc_voice_api_sessions__session_id__npcs__npc_key__voice_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "npc_key", "in": "path", "required": true, "schema": { "type": "string", "title": "Npc Key" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/_VoiceAssignBody" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionDetail" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/character-draft": { "get": { "tags": [ "sessions" ], "summary": "Get Character Draft", "operationId": "get_character_draft_api_sessions__session_id__character_draft_get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CharacterDraftResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "sessions" ], "summary": "Delete Character Draft", "operationId": "delete_character_draft_api_sessions__session_id__character_draft_delete", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CharacterDraftResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/character-start": { "post": { "tags": [ "sessions" ], "summary": "Post Character Start", "operationId": "post_character_start_api_sessions__session_id__character_start_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/CharacterStartRequest" }, { "type": "null" } ], "title": "Body" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CharacterDraftResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/character-start-stream": { "post": { "tags": [ "sessions" ], "summary": "Post Character Start Stream", "operationId": "post_character_start_stream_api_sessions__session_id__character_start_stream_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/CharacterStartRequest" }, { "type": "null" } ], "title": "Body" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/character-chat": { "post": { "tags": [ "sessions" ], "summary": "Post Character Chat", "operationId": "post_character_chat_api_sessions__session_id__character_chat_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CharacterChatRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CharacterDraftResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/character-chat-stream": { "post": { "tags": [ "sessions" ], "summary": "Post Character Chat Stream", "operationId": "post_character_chat_stream_api_sessions__session_id__character_chat_stream_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CharacterChatRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/chat-stream": { "post": { "tags": [ "sessions" ], "summary": "Post Chat Stream", "operationId": "post_chat_stream_api_sessions__session_id__chat_stream_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CharacterChatRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/in-game-time": { "post": { "tags": [ "sessions" ], "summary": "Post In Game Time", "operationId": "post_in_game_time_api_sessions__session_id__in_game_time_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForceInGameTimeRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForceInGameTimeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/adventure-start-options": { "get": { "tags": [ "sessions" ], "summary": "Get Adventure Start Options", "operationId": "get_adventure_start_options_api_sessions__session_id__adventure_start_options_get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdventureStartOptions" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/adventure-start": { "post": { "tags": [ "sessions" ], "summary": "Post Adventure Start", "operationId": "post_adventure_start_api_sessions__session_id__adventure_start_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdventureStartRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionDetail" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/character-import": { "post": { "tags": [ "sessions" ], "summary": "Post Character Import", "operationId": "post_character_import_api_sessions__session_id__character_import_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CharacterImportRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CharacterDraftResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/character-generate": { "post": { "tags": [ "sessions" ], "summary": "Post Character Generate", "operationId": "post_character_generate_api_sessions__session_id__character_generate_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CharacterGenerateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CharacterDraftResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/character-generate-stream": { "post": { "tags": [ "sessions" ], "summary": "Post Character Generate Stream", "operationId": "post_character_generate_stream_api_sessions__session_id__character_generate_stream_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CharacterGenerateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/character-confirm": { "post": { "tags": [ "sessions" ], "summary": "Post Character Confirm", "operationId": "post_character_confirm_api_sessions__session_id__character_confirm_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CharacterDraftResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/character/enrich-equipment": { "post": { "tags": [ "sessions" ], "summary": "Post Enrich Equipment", "operationId": "post_enrich_equipment_api_sessions__session_id__character_enrich_equipment_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Post Enrich Equipment Api Sessions Session Id Character Enrich Equipment Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/context-snapshot": { "get": { "tags": [ "sessions" ], "summary": "Get Context Snapshot", "description": "Mirror exactly what the character-creation pipeline injects into the\nLLM prompt. Used by the debug panel's Context tab.", "operationId": "get_context_snapshot_api_sessions__session_id__context_snapshot_get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContextSnapshot" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/check-logs": { "get": { "tags": [ "sessions" ], "summary": "List Check Logs", "description": "Return recent replayable CHECK logs for the debug panel.", "operationId": "list_check_logs_api_sessions__session_id__check_logs_get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "before_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Before Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CheckLogListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/turn-traces": { "get": { "tags": [ "sessions" ], "summary": "List Runtime Turn Traces", "description": "Return recent Runtime v2 turn traces for replay/debug panels.", "operationId": "list_runtime_turn_traces_api_sessions__session_id__turn_traces_get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "before_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Before Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TurnTraceListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/memory-public-view": { "get": { "tags": [ "sessions" ], "summary": "Get Memory Public View", "description": "Return the player-safe projection of committed runtime memories.", "operationId": "get_memory_public_view_api_sessions__session_id__memory_public_view_get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicMemoryViewOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/memory-items-debug": { "get": { "tags": [ "sessions" ], "summary": "List Memory Items Debug", "description": "Return raw runtime memory rows for automated tests/debug panels.", "operationId": "list_memory_items_debug_api_sessions__session_id__memory_items_debug_get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "visibility", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Visibility" } }, { "name": "kind", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Kind" } }, { "name": "include_inactive", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Include Inactive" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 200, "title": "Limit" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response List Memory Items Debug Api Sessions Session Id Memory Items Debug Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/state-changes-debug": { "get": { "tags": [ "sessions" ], "summary": "List State Changes Debug", "description": "Return canonical state changes for automated runtime assertions.", "operationId": "list_state_changes_debug_api_sessions__session_id__state_changes_debug_get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "turn_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Turn Id" } }, { "name": "visibility", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Visibility" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 200, "title": "Limit" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response List State Changes Debug Api Sessions Session Id State Changes Debug Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/world-state-debug": { "get": { "tags": [ "sessions" ], "summary": "Get World State Debug", "description": "Return the latest authoritative world-state snapshot for debugging.", "operationId": "get_world_state_debug_api_sessions__session_id__world_state_debug_get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Get World State Debug Api Sessions Session Id World State Debug Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/npc-runtime-debug": { "get": { "tags": [ "sessions" ], "summary": "Get Npc Runtime Debug", "description": "Return NPC Runtime V2 table-backed diagnostics for the debug panel.", "operationId": "get_npc_runtime_debug_api_sessions__session_id__npc_runtime_debug_get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 500, "minimum": 1, "default": 200, "title": "Limit" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NpcRuntimeDebugOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/messages": { "get": { "tags": [ "sessions" ], "summary": "List Messages", "description": "Return up to `limit` of the most recent messages, in ASC order.\n\nPagination is cursor-based: pass `before_id` to fetch messages strictly\nolder than that message. Compare on `(created_at, id)` so identical\ntimestamps still sort deterministically.", "operationId": "list_messages_api_sessions__session_id__messages_get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "before_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Before Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "sessions" ], "summary": "Create Message", "operationId": "create_message_api_sessions__session_id__messages_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageCreateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/messages/{message_id}/postprocess-steps": { "get": { "tags": [ "sessions" ], "summary": "Get Message Postprocess Steps", "description": "Poll the post-visible step timeline for an assistant message.\n\nReturns ``{steps, done}`` where ``done`` flips to True once the\nfinaliser has written ``phase3_complete``. Frontend polls\naggressively until ``done`` then stops.", "operationId": "get_message_postprocess_steps_api_sessions__session_id__messages__message_id__postprocess_steps_get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Message Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PostprocessStepsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/messages/{message_id}/tts/stream": { "post": { "tags": [ "sessions" ], "summary": "Stream Message Tts", "description": "Stream per-segment TTS for a persisted GM message.", "operationId": "stream_message_tts_api_sessions__session_id__messages__message_id__tts_stream_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Message Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageTtsStreamRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/bgm": { "get": { "tags": [ "sessions" ], "summary": "Get Session Bgm", "operationId": "get_session_bgm_api_sessions__session_id__bgm_get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionBgmListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/bgm/selection": { "post": { "tags": [ "sessions" ], "summary": "Post Session Bgm Selection", "operationId": "post_session_bgm_selection_api_sessions__session_id__bgm_selection_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionBgmSelectionRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionBgmListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/npcs/rematch-voices": { "post": { "tags": [ "sessions" ], "summary": "Post Npcs Rematch Voices", "operationId": "post_npcs_rematch_voices_api_sessions__session_id__npcs_rematch_voices_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NpcRematchVoicesRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NpcRematchVoicesResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/character/voice-intro": { "post": { "tags": [ "sessions" ], "summary": "Post Character Voice Intro", "operationId": "post_character_voice_intro_api_sessions__session_id__character_voice_intro_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceIntroRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceIntroResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/npcs/{npc_key}/voice-intro": { "post": { "tags": [ "sessions" ], "summary": "Post Npc Voice Intro", "operationId": "post_npc_voice_intro_api_sessions__session_id__npcs__npc_key__voice_intro_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "npc_key", "in": "path", "required": true, "schema": { "type": "string", "title": "Npc Key" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceIntroRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceIntroResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/bond-npcs/enrich": { "post": { "tags": [ "sessions" ], "summary": "Post Bond Npcs Enrich", "operationId": "post_bond_npcs_enrich_api_sessions__session_id__bond_npcs_enrich_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BondNpcEnrichRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BondNpcEnrichResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/notes": { "get": { "tags": [ "sessions" ], "summary": "List Notes", "operationId": "list_notes_api_sessions__session_id__notes_get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlayerNotesListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "sessions" ], "summary": "Create Note", "operationId": "create_note_api_sessions__session_id__notes_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlayerNoteCreateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlayerNoteWriteResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/notes/{note_id}": { "post": { "tags": [ "sessions" ], "summary": "Update Note Route", "operationId": "update_note_route_api_sessions__session_id__notes__note_id__post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "note_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Note Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlayerNoteUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlayerNoteWriteResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "sessions" ], "summary": "Delete Note Route", "operationId": "delete_note_route_api_sessions__session_id__notes__note_id__delete", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "note_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Note Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlayerNoteDeleteResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/advance-time": { "post": { "tags": [ "sessions" ], "summary": "Post Advance Time", "operationId": "post_advance_time_api_sessions__session_id__advance_time_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdvanceInGameTimeRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForceInGameTimeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/users": { "get": { "tags": [ "users" ], "summary": "List Users", "operationId": "list_users_api_users_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UserOut" }, "title": "Response List Users Api Users Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "users" ], "summary": "Create User", "operationId": "create_user_api_users_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserCreateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/users/{user_id}": { "put": { "tags": [ "users" ], "summary": "Update User", "operationId": "update_user_api_users__user_id__put", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "users" ], "summary": "Delete User", "operationId": "delete_user_api_users__user_id__delete", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OkResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/users/invites": { "get": { "tags": [ "users" ], "summary": "List Invites", "operationId": "list_invites_api_users_invites_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/InviteCodeOut" }, "title": "Response List Invites Api Users Invites Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "users" ], "summary": "Create Invite", "operationId": "create_invite_api_users_invites_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InviteCodeCreateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InviteCodeOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/users/invites/{invite_id}/disable": { "post": { "tags": [ "users" ], "summary": "Disable Invite", "operationId": "disable_invite_api_users_invites__invite_id__disable_post", "parameters": [ { "name": "invite_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Invite Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InviteCodeOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } } }, "components": { "schemas": { "AddRequest": { "properties": { "provider": { "type": "string", "title": "Provider" }, "model": { "type": "string", "title": "Model" }, "api_key": { "type": "string", "title": "Api Key", "default": "" }, "base_url": { "type": "string", "title": "Base Url", "default": "" } }, "type": "object", "required": [ "provider", "model" ], "title": "AddRequest" }, "AdvanceInGameTimeRequest": { "properties": { "minutes": { "type": "integer", "title": "Minutes" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason" } }, "type": "object", "required": [ "minutes" ], "title": "AdvanceInGameTimeRequest", "description": "Player-triggered relative in-game time advance. Frontend uses this for\nquick deltas next to the scene clock; the absolute setter remains the\ndrift-correction modal." }, "AdventureStartOptions": { "properties": { "has_module": { "type": "boolean", "title": "Has Module", "default": false }, "module_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Module Id" }, "module_title": { "type": "string", "title": "Module Title", "default": "" }, "semantic_status": { "type": "string", "title": "Semantic Status", "default": "" }, "semantic_error": { "type": "string", "title": "Semantic Error", "default": "" }, "anchor_type": { "type": "string", "title": "Anchor Type", "default": "freeform" }, "progression": { "type": "string", "title": "Progression", "default": "freeform" }, "selection_rule": { "type": "string", "title": "Selection Rule", "default": "" }, "needs_selection": { "type": "boolean", "title": "Needs Selection", "default": false }, "units": { "items": { "$ref": "#/components/schemas/AdventureStartUnit" }, "type": "array", "title": "Units" } }, "type": "object", "title": "AdventureStartOptions" }, "AdventureStartRequest": { "properties": { "module_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Module Id" }, "unit_index": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Unit Index" }, "unit_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Unit Id" } }, "type": "object", "title": "AdventureStartRequest" }, "AdventureStartUnit": { "properties": { "index": { "type": "integer", "title": "Index", "default": 0 }, "unit_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Unit Id" }, "title": { "type": "string", "title": "Title" }, "kind": { "type": "string", "title": "Kind", "default": "chapter" }, "summary": { "type": "string", "title": "Summary", "default": "" }, "line_start": { "type": "integer", "title": "Line Start", "default": 0 }, "line_end": { "type": "integer", "title": "Line End", "default": 0 }, "section_indexes": { "items": { "type": "integer" }, "type": "array", "title": "Section Indexes" } }, "type": "object", "required": [ "title" ], "title": "AdventureStartUnit" }, "ApplyCheckSpecRequest": { "properties": { "procedure_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Procedure Id" }, "check_spec": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Check Spec" } }, "type": "object", "title": "ApplyCheckSpecRequest" }, "ApplyPatchRequest": { "properties": { "ops": { "items": { "type": "object" }, "type": "array", "title": "Ops" } }, "type": "object", "required": [ "ops" ], "title": "ApplyPatchRequest", "description": "Direct API for applying patch ops without going through the agent.\n\nThe frontend may call this for manual undo/redo or for internal tools.\nThe agent itself goes through `POST /{id}/messages` (P3)." }, "ApplyPatchResponse": { "properties": { "edit_id": { "type": "string", "title": "Edit Id" }, "diff": { "items": { "type": "object" }, "type": "array", "title": "Diff" }, "needs_dice_compile": { "type": "boolean", "title": "Needs Dice Compile" }, "needs_character_ui_compile": { "type": "boolean", "title": "Needs Character Ui Compile" }, "parsed_v6_after": { "type": "object", "title": "Parsed V6 After" } }, "type": "object", "required": [ "edit_id", "diff", "needs_dice_compile", "needs_character_ui_compile", "parsed_v6_after" ], "title": "ApplyPatchResponse" }, "Body_parse_uploaded_module_api_modules_parse_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" } }, "type": "object", "required": [ "file" ], "title": "Body_parse_uploaded_module_api_modules_parse_post" }, "Body_parse_uploaded_module_stream_api_modules_parse_stream_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" } }, "type": "object", "required": [ "file" ], "title": "Body_parse_uploaded_module_stream_api_modules_parse_stream_post" }, "Body_test_extract_api_ocr_test_post": { "properties": { "provider": { "type": "string", "title": "Provider" }, "file": { "type": "string", "format": "binary", "title": "File" }, "preview_chars": { "type": "integer", "title": "Preview Chars", "default": 2000 } }, "type": "object", "required": [ "provider", "file" ], "title": "Body_test_extract_api_ocr_test_post" }, "Body_upload_ruleset_file_api_rulesets_file_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" }, "output_language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Output Language" } }, "type": "object", "required": [ "file" ], "title": "Body_upload_ruleset_file_api_rulesets_file_post" }, "Body_upload_track_api_music_upload_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" }, "title": { "type": "string", "title": "Title", "default": "" }, "is_public": { "type": "boolean", "title": "Is Public", "default": true } }, "type": "object", "required": [ "file" ], "title": "Body_upload_track_api_music_upload_post" }, "BondNpcEnrichRequest": { "properties": { "force": { "type": "boolean", "title": "Force", "default": false }, "limit": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Limit" } }, "type": "object", "title": "BondNpcEnrichRequest", "description": "Request payload for the session-wide bond NPC enrichment trigger.\n\n- ``force=False`` (default): only NPCs that look unfinished are touched\n and existing non-empty fields are preserved.\n- ``force=True``: every ``from_bond`` NPC is re-enriched and existing\n profile fields can be overwritten by fresh LLM output.\n- ``limit`` caps how many eligible NPCs are processed in one call;\n ``None`` means no cap." }, "BondNpcEnrichResponse": { "properties": { "session": { "$ref": "#/components/schemas/SessionDetail" }, "eligible": { "type": "integer", "title": "Eligible", "default": 0 }, "enriched": { "type": "integer", "title": "Enriched", "default": 0 }, "skipped": { "type": "integer", "title": "Skipped", "default": 0 }, "enriched_npc_keys": { "items": { "type": "string" }, "type": "array", "title": "Enriched Npc Keys" }, "skipped_npc_keys": { "items": { "type": "string" }, "type": "array", "title": "Skipped Npc Keys" }, "errors": { "items": { "type": "string" }, "type": "array", "title": "Errors" } }, "type": "object", "required": [ "session" ], "title": "BondNpcEnrichResponse", "description": "Result of a bond NPC enrichment call.\n\n``session`` carries the post-update detail so the frontend can refresh\nits NPC panel without a follow-up GET. The counts and key lists let\nthe UI render a precise toast (n enriched, m skipped, errors)." }, "CapabilityView": { "properties": { "provider": { "type": "string", "title": "Provider" }, "image": { "type": "boolean", "title": "Image", "default": false }, "tts": { "type": "boolean", "title": "Tts", "default": false }, "image_endpoint": { "type": "string", "title": "Image Endpoint", "default": "" }, "tts_endpoint": { "type": "string", "title": "Tts Endpoint", "default": "" }, "image_models_hint": { "items": { "type": "string" }, "type": "array", "title": "Image Models Hint" }, "tts_models_hint": { "items": { "type": "string" }, "type": "array", "title": "Tts Models Hint" }, "voices": { "items": { "type": "string" }, "type": "array", "title": "Voices" }, "docs": { "items": { "type": "string" }, "type": "array", "title": "Docs" }, "notes": { "type": "string", "title": "Notes", "default": "" } }, "type": "object", "required": [ "provider" ], "title": "CapabilityView" }, "CharacterChatRequest": { "properties": { "message": { "type": "string", "title": "Message" }, "language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Language" }, "intent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Intent" }, "pending_check_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Pending Check Id" }, "roll_result": { "anyOf": [ {}, { "type": "null" } ], "title": "Roll Result" } }, "type": "object", "required": [ "message" ], "title": "CharacterChatRequest" }, "CharacterDraftResponse": { "properties": { "messages": { "items": { "type": "object" }, "type": "array", "title": "Messages" }, "character": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Character" }, "ready": { "type": "boolean", "title": "Ready", "default": false }, "assistant": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Assistant" }, "pool_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Pool Id" } }, "type": "object", "title": "CharacterDraftResponse" }, "CharacterGenerateRequest": { "properties": { "mode": { "type": "string", "title": "Mode", "default": "from_chat" }, "seed": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Seed" }, "language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Language" } }, "type": "object", "title": "CharacterGenerateRequest" }, "CharacterImportRequest": { "properties": { "character": { "type": "object", "title": "Character" }, "source": { "type": "string", "title": "Source", "default": "uploaded" }, "pool_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Pool Id" } }, "type": "object", "required": [ "character" ], "title": "CharacterImportRequest" }, "CharacterPoolCreateRequest": { "properties": { "ruleset_id": { "type": "string", "title": "Ruleset Id" }, "character": { "type": "object", "title": "Character" }, "source": { "type": "string", "title": "Source", "default": "uploaded" }, "source_session_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Session Id" } }, "type": "object", "required": [ "ruleset_id", "character" ], "title": "CharacterPoolCreateRequest" }, "CharacterPoolOut": { "properties": { "id": { "type": "string", "title": "Id" }, "ruleset_id": { "type": "string", "title": "Ruleset Id" }, "ruleset_title": { "type": "string", "title": "Ruleset Title" }, "ruleset_short_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ruleset Short Name" }, "name": { "type": "string", "title": "Name" }, "source": { "type": "string", "title": "Source" }, "source_session_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Session Id" }, "character": { "type": "object", "title": "Character" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "ruleset_id", "ruleset_title", "name", "source", "created_at", "updated_at" ], "title": "CharacterPoolOut" }, "CharacterStartRequest": { "properties": { "language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Language" } }, "type": "object", "title": "CharacterStartRequest" }, "CheckLogListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/CheckLogOut" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "has_more": { "type": "boolean", "title": "Has More", "default": false } }, "type": "object", "required": [ "items", "total" ], "title": "CheckLogListResponse" }, "CheckLogOut": { "properties": { "id": { "type": "string", "title": "Id" }, "session_id": { "type": "string", "title": "Session Id" }, "message_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message Id" }, "actor_id": { "type": "string", "title": "Actor Id", "default": "" }, "procedure_id": { "type": "string", "title": "Procedure Id", "default": "" }, "engine": { "type": "string", "title": "Engine", "default": "" }, "skill": { "type": "string", "title": "Skill", "default": "" }, "seed": { "type": "string", "title": "Seed", "default": "" }, "source": { "type": "string", "title": "Source", "default": "" }, "request": { "type": "object", "title": "Request" }, "result": { "type": "object", "title": "Result" }, "roll_trace": { "type": "object", "title": "Roll Trace" }, "trace": { "type": "object", "title": "Trace" }, "warnings": { "items": { "type": "string" }, "type": "array", "title": "Warnings" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "session_id", "created_at" ], "title": "CheckLogOut" }, "CompileCharacterUIRequest": { "properties": { "model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model" }, "base_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Base Url" }, "api_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key" }, "output_language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Output Language" }, "save": { "type": "boolean", "title": "Save", "default": true } }, "type": "object", "title": "CompileCharacterUIRequest" }, "CompileCharacterUIResponse": { "properties": { "ok": { "type": "boolean", "title": "Ok" }, "ruleset_id": { "type": "string", "title": "Ruleset Id" }, "artifact_saved": { "type": "boolean", "title": "Artifact Saved" }, "package": { "type": "object", "title": "Package" }, "output_language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Output Language" } }, "type": "object", "required": [ "ok", "ruleset_id", "artifact_saved", "package" ], "title": "CompileCharacterUIResponse" }, "CompileDesignResponse": { "properties": { "status": { "type": "string", "enum": [ "success", "blocked" ], "title": "Status" }, "edit_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Edit Id" }, "parsed_v6_after": { "type": "object", "title": "Parsed V6 After" }, "validation_report": { "type": "object", "title": "Validation Report" }, "sections_emitted": { "items": { "type": "string" }, "type": "array", "title": "Sections Emitted" }, "ready_blockers": { "items": { "type": "string" }, "type": "array", "title": "Ready Blockers" }, "needs_dice_compile": { "type": "boolean", "title": "Needs Dice Compile", "default": false }, "needs_character_ui_compile": { "type": "boolean", "title": "Needs Character Ui Compile", "default": false }, "design_phase": { "type": "string", "title": "Design Phase", "default": "intake" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" } }, "type": "object", "required": [ "status" ], "title": "CompileDesignResponse", "description": "Result of POST /api/ruleset-drafts/{id}/compile-design.\n\n`status='success'` means parsed_v6 was updated and an edit row was\nwritten. `status='blocked'` means the validator surfaced blocking\nissues; parsed_v6 is unchanged. `validation_report` always carries\nthe report from the validator pass that produced this response." }, "CompileDiceIRRequest": { "properties": { "model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model" }, "base_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Base Url" }, "api_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key" }, "output_language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Output Language" }, "save": { "type": "boolean", "title": "Save", "default": true } }, "type": "object", "title": "CompileDiceIRRequest" }, "CompileDiceIRResponse": { "properties": { "ok": { "type": "boolean", "title": "Ok" }, "ruleset_id": { "type": "string", "title": "Ruleset Id" }, "artifact_saved": { "type": "boolean", "title": "Artifact Saved" }, "package": { "type": "object", "title": "Package" }, "output_language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Output Language" } }, "type": "object", "required": [ "ok", "ruleset_id", "artifact_saved", "package" ], "title": "CompileDiceIRResponse" }, "ContextSnapshot": { "properties": { "bp1": { "$ref": "#/components/schemas/ContextSnapshotBP1" }, "bp2": { "$ref": "#/components/schemas/ContextSnapshotBP2" }, "bp3": { "$ref": "#/components/schemas/ContextSnapshotBP3" } }, "type": "object", "required": [ "bp1", "bp2", "bp3" ], "title": "ContextSnapshot" }, "ContextSnapshotBP1": { "properties": { "ruleset_title": { "type": "string", "title": "Ruleset Title" }, "ruleset_world_mode": { "type": "string", "title": "Ruleset World Mode" }, "core_rules": { "type": "string", "title": "Core Rules" }, "sheet_template": { "type": "string", "title": "Sheet Template" }, "sheet_guide": { "type": "string", "title": "Sheet Guide" }, "scene_guide": { "type": "string", "title": "Scene Guide", "default": "" }, "module_title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Module Title" }, "module_text": { "type": "string", "title": "Module Text", "default": "" } }, "type": "object", "required": [ "ruleset_title", "ruleset_world_mode", "core_rules", "sheet_template", "sheet_guide" ], "title": "ContextSnapshotBP1", "description": "Stable context: ruleset + module text injected into the LLM prompt." }, "ContextSnapshotBP2": { "properties": { "module_state": { "type": "object", "title": "Module State" }, "scenes": { "items": {}, "type": "array", "title": "Scenes" }, "npcs": { "items": {}, "type": "array", "title": "Npcs" }, "plot_threads": { "items": {}, "type": "array", "title": "Plot Threads" }, "world_facts": { "items": {}, "type": "array", "title": "World Facts" }, "narrative_summary": { "type": "string", "title": "Narrative Summary", "default": "" } }, "type": "object", "title": "ContextSnapshotBP2", "description": "Semi-stable snapshot derived from module_state, memory_state, and\nnarrative_summary.\n\nThe element shape inside the *_facts / threads / scenes / npcs lists is\nintentionally permissive: the GM auto-memory pass can write either\nstructured dicts (e.g. an NPC record) or free-form strings (e.g. a\none-sentence world fact). Locking these to `list[dict]` would 500 on\nany session whose memory contains a plain string." }, "ContextSnapshotBP3": { "properties": { "chat": { "items": { "type": "object" }, "type": "array", "title": "Chat" }, "pc": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Pc" }, "draft_card": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Draft Card" }, "ready": { "type": "boolean", "title": "Ready", "default": false }, "dice_history": { "items": { "type": "object" }, "type": "array", "title": "Dice History" } }, "type": "object", "title": "ContextSnapshotBP3", "description": "Per-turn live state: setup chat + character draft + dice." }, "CreateDraftRequest": { "properties": { "base_ruleset_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Base Ruleset Id", "description": "If set, copy parsed_v6 from this ruleset (fork)." }, "target_ruleset_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Target Ruleset Id", "description": "If set, draft is bound to this ruleset; apply_patch cascades to it. Caller must own the target." }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title", "description": "Optional display title; defaults to source title or '未命名草稿'." } }, "type": "object", "title": "CreateDraftRequest" }, "DraftDetail": { "properties": { "id": { "type": "string", "title": "Id" }, "owner_id": { "type": "string", "title": "Owner Id" }, "title": { "type": "string", "title": "Title" }, "base_ruleset_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Base Ruleset Id" }, "target_ruleset_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Target Ruleset Id" }, "needs_dice_compile": { "type": "boolean", "title": "Needs Dice Compile" }, "needs_character_ui_compile": { "type": "boolean", "title": "Needs Character Ui Compile" }, "design_phase": { "type": "string", "title": "Design Phase", "default": "intake" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "parsed_v6": { "type": "object", "title": "Parsed V6" }, "design_state": { "type": "object", "title": "Design State" }, "validation_report": { "type": "object", "title": "Validation Report" }, "messages": { "items": { "$ref": "#/components/schemas/DraftMessage" }, "type": "array", "title": "Messages" }, "edits": { "items": { "$ref": "#/components/schemas/DraftEdit" }, "type": "array", "title": "Edits" } }, "type": "object", "required": [ "id", "owner_id", "title", "needs_dice_compile", "needs_character_ui_compile", "created_at", "updated_at", "parsed_v6" ], "title": "DraftDetail" }, "DraftEdit": { "properties": { "id": { "type": "string", "title": "Id" }, "message_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message Id" }, "ops": { "items": { "type": "object" }, "type": "array", "title": "Ops" }, "diff": { "items": { "type": "object" }, "type": "array", "title": "Diff" }, "undone": { "type": "boolean", "title": "Undone" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "ops", "diff", "undone", "created_at" ], "title": "DraftEdit" }, "DraftMessage": { "properties": { "id": { "type": "string", "title": "Id" }, "seq": { "type": "integer", "title": "Seq" }, "role": { "type": "string", "enum": [ "user", "assistant", "tool" ], "title": "Role" }, "content": { "type": "object", "title": "Content" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "seq", "role", "content", "created_at" ], "title": "DraftMessage" }, "DraftSummary": { "properties": { "id": { "type": "string", "title": "Id" }, "owner_id": { "type": "string", "title": "Owner Id" }, "title": { "type": "string", "title": "Title" }, "base_ruleset_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Base Ruleset Id" }, "target_ruleset_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Target Ruleset Id" }, "needs_dice_compile": { "type": "boolean", "title": "Needs Dice Compile" }, "needs_character_ui_compile": { "type": "boolean", "title": "Needs Character Ui Compile" }, "design_phase": { "type": "string", "title": "Design Phase", "default": "intake" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "owner_id", "title", "needs_dice_compile", "needs_character_ui_compile", "created_at", "updated_at" ], "title": "DraftSummary" }, "ForceInGameTimeRequest": { "properties": { "day": { "type": "integer", "title": "Day" }, "clock": { "type": "string", "title": "Clock" }, "date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Date" } }, "type": "object", "required": [ "day", "clock" ], "title": "ForceInGameTimeRequest", "description": "Operator-controlled override of the in-game clock. The GM normally\nadvances time via `[TAKE_TIME]` markers; this endpoint exists so a player\nor admin can correct drift, jump to a story-relevant moment, or undo a\nbad time-leap. Frontend confirms intent via a checkbox before sending." }, "ForceInGameTimeResponse": { "properties": { "day": { "type": "integer", "title": "Day" }, "clock": { "type": "string", "title": "Clock" }, "period": { "type": "string", "title": "Period" }, "date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Date" }, "elapsed_minutes": { "type": "integer", "title": "Elapsed Minutes", "default": 0 } }, "type": "object", "required": [ "day", "clock", "period" ], "title": "ForceInGameTimeResponse" }, "GeneratedImageView": { "properties": { "data_uri": { "type": "string", "title": "Data Uri", "default": "" }, "url": { "type": "string", "title": "Url", "default": "" }, "mime_type": { "type": "string", "title": "Mime Type", "default": "image/png" } }, "type": "object", "title": "GeneratedImageView" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "ImageGenerateRequest": { "properties": { "provider": { "type": "string", "title": "Provider" }, "model": { "type": "string", "title": "Model" }, "api_key": { "type": "string", "title": "Api Key", "default": "" }, "base_url": { "type": "string", "title": "Base Url", "default": "" }, "prompt": { "type": "string", "title": "Prompt" }, "size": { "type": "string", "title": "Size", "default": "1024x1024" }, "n": { "type": "integer", "maximum": 9.0, "minimum": 1.0, "title": "N", "default": 1 } }, "type": "object", "required": [ "provider", "model", "prompt" ], "title": "ImageGenerateRequest" }, "ImageGenerateResponse": { "properties": { "provider": { "type": "string", "title": "Provider" }, "model": { "type": "string", "title": "Model" }, "images": { "items": { "$ref": "#/components/schemas/GeneratedImageView" }, "type": "array", "title": "Images" } }, "type": "object", "required": [ "provider", "model" ], "title": "ImageGenerateResponse" }, "InviteCodeCreateRequest": { "properties": { "code": { "type": "string", "maxLength": 128, "minLength": 1, "title": "Code" }, "label": { "anyOf": [ { "type": "string", "maxLength": 128 }, { "type": "null" } ], "title": "Label" }, "max_uses": { "type": "integer", "maximum": 1000.0, "minimum": 1.0, "title": "Max Uses", "default": 1 }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" } }, "type": "object", "required": [ "code" ], "title": "InviteCodeCreateRequest" }, "InviteCodeOut": { "properties": { "id": { "type": "string", "title": "Id" }, "label": { "type": "string", "title": "Label" }, "max_uses": { "type": "integer", "title": "Max Uses" }, "use_count": { "type": "integer", "title": "Use Count" }, "remaining_uses": { "type": "integer", "title": "Remaining Uses" }, "disabled": { "type": "boolean", "title": "Disabled" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "label", "max_uses", "use_count", "remaining_uses", "disabled", "created_at", "updated_at" ], "title": "InviteCodeOut" }, "ListModelsRequest": { "properties": { "provider": { "type": "string", "title": "Provider" }, "api_key": { "type": "string", "title": "Api Key", "default": "" }, "base_url": { "type": "string", "title": "Base Url", "default": "" } }, "type": "object", "required": [ "provider" ], "title": "ListModelsRequest" }, "ListModelsResponse": { "properties": { "provider": { "type": "string", "title": "Provider" }, "models": { "items": { "type": "string" }, "type": "array", "title": "Models", "default": [] }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" } }, "type": "object", "required": [ "provider" ], "title": "ListModelsResponse" }, "LoginRequest": { "properties": { "username": { "type": "string", "title": "Username" }, "password": { "type": "string", "title": "Password" } }, "type": "object", "required": [ "username", "password" ], "title": "LoginRequest" }, "LoginResponse": { "properties": { "token": { "type": "string", "title": "Token" }, "user": { "$ref": "#/components/schemas/UserInfo" } }, "type": "object", "required": [ "token", "user" ], "title": "LoginResponse" }, "MediaCapabilitiesResponse": { "properties": { "providers": { "items": { "$ref": "#/components/schemas/CapabilityView" }, "type": "array", "title": "Providers" }, "pool": { "items": { "$ref": "#/components/schemas/PoolMediaEntry" }, "type": "array", "title": "Pool" } }, "type": "object", "title": "MediaCapabilitiesResponse" }, "MediaSettingsResponse": { "properties": { "narration_voice": { "anyOf": [ { "$ref": "#/components/schemas/NarrationVoiceSetting" }, { "type": "null" } ] } }, "type": "object", "title": "MediaSettingsResponse" }, "MessageCreateRequest": { "properties": { "role": { "type": "string", "title": "Role" }, "content": { "type": "string", "title": "Content" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Metadata" } }, "type": "object", "required": [ "role", "content" ], "title": "MessageCreateRequest" }, "MessageListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/MessageOut" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "has_more": { "type": "boolean", "title": "Has More", "default": false } }, "type": "object", "required": [ "items", "total" ], "title": "MessageListResponse" }, "MessageOut": { "properties": { "id": { "type": "string", "title": "Id" }, "session_id": { "type": "string", "title": "Session Id" }, "role": { "type": "string", "title": "Role" }, "content": { "type": "string", "title": "Content" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "session_id", "role", "content", "created_at" ], "title": "MessageOut" }, "MessageTtsStreamRequest": { "properties": { "text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Text" } }, "type": "object", "title": "MessageTtsStreamRequest" }, "ModuleParseResponse": { "properties": { "id": { "type": "string", "title": "Id", "default": "" }, "owner_id": { "type": "string", "title": "Owner Id", "default": "" }, "is_shared": { "type": "boolean", "title": "Is Shared", "default": true }, "filename": { "type": "string", "title": "Filename" }, "source_format": { "type": "string", "enum": [ "pdf", "docx", "pptx", "xlsx", "image", "markdown", "text" ], "title": "Source Format" }, "backend": { "type": "string", "title": "Backend" }, "markdown": { "type": "string", "title": "Markdown" }, "page_count": { "type": "integer", "title": "Page Count", "default": 0 }, "images_dropped": { "type": "integer", "title": "Images Dropped", "default": 0 }, "duration_seconds": { "type": "number", "title": "Duration Seconds", "default": 0.0 }, "toc": { "items": { "$ref": "#/components/schemas/TOCEntryView" }, "type": "array", "title": "Toc" }, "toc_source": { "type": "string", "enum": [ "llm", "heuristic" ], "title": "Toc Source", "default": "heuristic" }, "semantic_status": { "type": "string", "enum": [ "pending", "running", "done", "error" ], "title": "Semantic Status", "default": "pending" }, "semantic_error": { "type": "string", "title": "Semantic Error", "default": "" }, "semantic_structure": { "type": "object", "title": "Semantic Structure" }, "semantic_steps": { "items": { "type": "object" }, "type": "array", "title": "Semantic Steps" }, "briefing_md": { "type": "string", "title": "Briefing Md", "default": "" }, "appendix_index": { "type": "object", "title": "Appendix Index" }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created At" } }, "type": "object", "required": [ "filename", "source_format", "backend", "markdown" ], "title": "ModuleParseResponse", "description": "Returned from /parse and /parse-stream — the full parse plus the\npersisted row's id and owner so the UI can immediately reflect it\nin the saved-modules list without a follow-up GET." }, "ModuleShareRequest": { "properties": { "is_shared": { "type": "boolean", "title": "Is Shared" } }, "type": "object", "required": [ "is_shared" ], "title": "ModuleShareRequest" }, "ModuleSummary": { "properties": { "id": { "type": "string", "title": "Id" }, "owner_id": { "type": "string", "title": "Owner Id" }, "is_shared": { "type": "boolean", "title": "Is Shared" }, "filename": { "type": "string", "title": "Filename" }, "source_format": { "type": "string", "title": "Source Format" }, "backend": { "type": "string", "title": "Backend" }, "page_count": { "type": "integer", "title": "Page Count" }, "chars": { "type": "integer", "title": "Chars" }, "toc_entries": { "type": "integer", "title": "Toc Entries" }, "toc_source": { "type": "string", "title": "Toc Source" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "owner_id", "is_shared", "filename", "source_format", "backend", "page_count", "chars", "toc_entries", "toc_source", "created_at", "updated_at" ], "title": "ModuleSummary", "description": "Lightweight list view — strips the full markdown and TOC." }, "ModuleTitleRequest": { "properties": { "module_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Module Id" }, "filename": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Filename" }, "markdown": { "type": "string", "title": "Markdown", "default": "" } }, "type": "object", "title": "ModuleTitleRequest", "description": "Either pass `module_id` (preferred — title gets cached on the row)\nor `filename` + `markdown` for one-shot extraction without persistence." }, "ModuleTitleResponse": { "properties": { "title": { "type": "string", "title": "Title" }, "cached": { "type": "boolean", "title": "Cached", "default": false } }, "type": "object", "required": [ "title" ], "title": "ModuleTitleResponse" }, "MusicTrackCreateRequest": { "properties": { "url": { "type": "string", "maxLength": 2048, "minLength": 1, "title": "Url" }, "title": { "type": "string", "maxLength": 255, "title": "Title", "default": "" }, "is_public": { "type": "boolean", "title": "Is Public", "default": true } }, "type": "object", "required": [ "url" ], "title": "MusicTrackCreateRequest" }, "MusicTrackOut": { "properties": { "id": { "type": "string", "title": "Id" }, "title": { "type": "string", "title": "Title" }, "source_type": { "type": "string", "title": "Source Type" }, "url": { "type": "string", "title": "Url" }, "is_public": { "type": "boolean", "title": "Is Public" }, "owner_id": { "type": "string", "title": "Owner Id" }, "owner_username": { "type": "string", "title": "Owner Username" }, "is_mine": { "type": "boolean", "title": "Is Mine" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "title", "source_type", "url", "is_public", "owner_id", "owner_username", "is_mine", "created_at", "updated_at" ], "title": "MusicTrackOut" }, "MusicTrackUpdateRequest": { "properties": { "title": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Title" }, "is_public": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Public" } }, "type": "object", "title": "MusicTrackUpdateRequest" }, "NarrationVoiceSetting": { "properties": { "provider": { "type": "string", "title": "Provider", "default": "" }, "model": { "type": "string", "title": "Model", "default": "" }, "voice": { "type": "string", "title": "Voice", "default": "" } }, "type": "object", "title": "NarrationVoiceSetting" }, "NpcRematchVoicesRequest": { "properties": { "skip_locked": { "type": "boolean", "title": "Skip Locked", "default": true }, "force": { "type": "boolean", "title": "Force", "default": false } }, "type": "object", "title": "NpcRematchVoicesRequest" }, "NpcRematchVoicesResponse": { "properties": { "session": { "$ref": "#/components/schemas/SessionDetail" }, "rematched": { "type": "integer", "title": "Rematched", "default": 0 }, "skipped_locked": { "type": "integer", "title": "Skipped Locked", "default": 0 }, "voice_model": { "type": "string", "title": "Voice Model", "default": "" } }, "type": "object", "required": [ "session" ], "title": "NpcRematchVoicesResponse" }, "NpcRuntimeDebugOut": { "properties": { "counts": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "Counts" }, "planner_latest": { "type": "object", "title": "Planner Latest" }, "planner_runs": { "items": { "type": "object" }, "type": "array", "title": "Planner Runs" }, "action_board": { "type": "object", "title": "Action Board" }, "action_cards": { "items": { "type": "object" }, "type": "array", "title": "Action Cards" }, "events": { "items": { "type": "object" }, "type": "array", "title": "Events" }, "sample_memories": { "items": { "type": "object" }, "type": "array", "title": "Sample Memories" } }, "type": "object", "title": "NpcRuntimeDebugOut" }, "OCRHealthResponse": { "properties": { "provider": { "type": "string", "title": "Provider" }, "ok": { "type": "boolean", "title": "Ok" }, "detail": { "type": "object", "title": "Detail" } }, "type": "object", "required": [ "provider", "ok" ], "title": "OCRHealthResponse" }, "OCRProviderInfo": { "properties": { "provider": { "type": "string", "title": "Provider" }, "label": { "type": "string", "title": "Label" }, "api_key_set": { "type": "boolean", "title": "Api Key Set", "default": false }, "env_has_key": { "type": "boolean", "title": "Env Has Key", "default": false }, "active": { "type": "boolean", "title": "Active", "default": false }, "config": { "type": "object", "title": "Config" } }, "type": "object", "required": [ "provider", "label" ], "title": "OCRProviderInfo" }, "OCRProviderUpdate": { "properties": { "api_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key" }, "base_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Base Url" }, "cli": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cli" }, "backend": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Backend" }, "lang": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Lang" }, "model_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model Version" }, "no_formula": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "No Formula" }, "no_table": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "No Table" }, "enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Enabled" } }, "type": "object", "title": "OCRProviderUpdate", "description": "Partial update. Empty strings are ignored (preserve existing).\nThe literal string `__clear__` resets the field to its env default." }, "OCRTestResponse": { "properties": { "provider": { "type": "string", "title": "Provider" }, "ok": { "type": "boolean", "title": "Ok" }, "duration_seconds": { "type": "number", "title": "Duration Seconds", "default": 0.0 }, "page_count": { "type": "integer", "title": "Page Count", "default": 0 }, "markdown_preview": { "type": "string", "title": "Markdown Preview", "default": "" }, "markdown_length": { "type": "integer", "title": "Markdown Length", "default": 0 }, "image_count": { "type": "integer", "title": "Image Count", "default": 0 }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" } }, "type": "object", "required": [ "provider", "ok" ], "title": "OCRTestResponse" }, "OkResponse": { "properties": { "ok": { "type": "boolean", "title": "Ok", "default": true } }, "type": "object", "title": "OkResponse" }, "PlayerNoteCreateRequest": { "properties": { "content": { "type": "string", "title": "Content" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "type": "object", "required": [ "content" ], "title": "PlayerNoteCreateRequest" }, "PlayerNoteDeleteResponse": { "properties": { "status": { "type": "string", "title": "Status", "default": "ok" } }, "type": "object", "title": "PlayerNoteDeleteResponse" }, "PlayerNoteOut": { "properties": { "id": { "type": "string", "title": "Id" }, "content": { "type": "string", "title": "Content" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags" }, "source": { "type": "string", "title": "Source", "default": "player" }, "created_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created At" }, "updated_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Updated At" } }, "type": "object", "required": [ "id", "content" ], "title": "PlayerNoteOut", "description": "One row in ``memory_state.player_notes[]`` as surfaced to clients.\n\nLegacy `[ADD_NOTE]` rows persisted via ``trpg_ic_markers.apply_chatrpg_markers``\ncarry ``id``, ``content``, ``tags``, ``created_at`` but no ``source``;\nthose are lazily normalized to ``source=\"gm\"`` on read." }, "PlayerNoteUpdateRequest": { "properties": { "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Content" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "type": "object", "title": "PlayerNoteUpdateRequest" }, "PlayerNoteWriteResponse": { "properties": { "status": { "type": "string", "title": "Status", "default": "ok" }, "note": { "$ref": "#/components/schemas/PlayerNoteOut" } }, "type": "object", "required": [ "note" ], "title": "PlayerNoteWriteResponse" }, "PlayerNotesListResponse": { "properties": { "notes": { "items": { "$ref": "#/components/schemas/PlayerNoteOut" }, "type": "array", "title": "Notes" } }, "type": "object", "title": "PlayerNotesListResponse" }, "PoolEntryView": { "properties": { "provider": { "type": "string", "title": "Provider" }, "model": { "type": "string", "title": "Model" } }, "type": "object", "required": [ "provider", "model" ], "title": "PoolEntryView" }, "PoolMediaEntry": { "properties": { "provider": { "type": "string", "title": "Provider" }, "model": { "type": "string", "title": "Model" }, "image": { "type": "boolean", "title": "Image", "default": false }, "tts": { "type": "boolean", "title": "Tts", "default": false }, "default_voice": { "type": "string", "title": "Default Voice", "default": "" }, "roles": { "items": { "type": "string" }, "type": "array", "title": "Roles" } }, "type": "object", "required": [ "provider", "model" ], "title": "PoolMediaEntry" }, "PoolView": { "properties": { "entries": { "items": { "$ref": "#/components/schemas/PoolEntryView" }, "type": "array", "title": "Entries" }, "default_index": { "type": "integer", "title": "Default Index", "default": -1 }, "default": { "anyOf": [ { "$ref": "#/components/schemas/PoolEntryView" }, { "type": "null" } ] }, "fast_index": { "type": "integer", "title": "Fast Index", "default": -1 }, "fast": { "anyOf": [ { "$ref": "#/components/schemas/PoolEntryView" }, { "type": "null" } ] }, "dialogue_index": { "type": "integer", "title": "Dialogue Index", "default": -1 }, "dialogue": { "anyOf": [ { "$ref": "#/components/schemas/PoolEntryView" }, { "type": "null" } ] }, "avatar_index": { "type": "integer", "title": "Avatar Index", "default": -1 }, "avatar": { "anyOf": [ { "$ref": "#/components/schemas/PoolEntryView" }, { "type": "null" } ] }, "illustration_index": { "type": "integer", "title": "Illustration Index", "default": -1 }, "illustration": { "anyOf": [ { "$ref": "#/components/schemas/PoolEntryView" }, { "type": "null" } ] }, "narration_index": { "type": "integer", "title": "Narration Index", "default": -1 }, "narration": { "anyOf": [ { "$ref": "#/components/schemas/PoolEntryView" }, { "type": "null" } ] } }, "type": "object", "title": "PoolView" }, "PostprocessStep": { "properties": { "name": { "type": "string", "title": "Name" }, "status": { "type": "string", "title": "Status" }, "duration_ms": { "type": "integer", "title": "Duration Ms", "default": 0 }, "detail": { "type": "string", "title": "Detail", "default": "" }, "ts": { "type": "string", "title": "Ts", "default": "" } }, "type": "object", "required": [ "name", "status" ], "title": "PostprocessStep", "description": "One event in a message's post-processing timeline (running → done\npair, or one-shot ``done``). Mirrors the dict shape persisted under\n``messages.metadata_json[\"postprocess_steps\"]``." }, "PostprocessStepsResponse": { "properties": { "steps": { "items": { "$ref": "#/components/schemas/PostprocessStep" }, "type": "array", "title": "Steps" }, "done": { "type": "boolean", "title": "Done", "default": false } }, "type": "object", "title": "PostprocessStepsResponse" }, "PreferencesUpdateRequest": { "properties": { "patch": { "type": "object", "title": "Patch" } }, "type": "object", "required": [ "patch" ], "title": "PreferencesUpdateRequest", "description": "Partial-merge update. Keys present here overwrite existing keys;\nother keys are preserved. To delete a key, send it with value null." }, "PromoteRequest": { "properties": { "mode": { "type": "string", "enum": [ "new", "target" ], "title": "Mode", "description": "`new` = create a new ruleset; `target` = overwrite the bound target." }, "new_title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "New Title", "description": "Required when mode='new'; ignored otherwise." } }, "type": "object", "required": [ "mode" ], "title": "PromoteRequest" }, "PromoteResponse": { "properties": { "ruleset_id": { "type": "string", "title": "Ruleset Id" }, "mode": { "type": "string", "enum": [ "new", "target" ], "title": "Mode" } }, "type": "object", "required": [ "ruleset_id", "mode" ], "title": "PromoteResponse" }, "ProviderInfo": { "properties": { "provider": { "type": "string", "title": "Provider" }, "label": { "type": "string", "title": "Label" }, "kind": { "type": "string", "title": "Kind" }, "default_base_url": { "type": "string", "title": "Default Base Url", "default": "" }, "default_model": { "type": "string", "title": "Default Model", "default": "" }, "saved_api_key": { "type": "boolean", "title": "Saved Api Key", "default": false }, "saved_base_url": { "type": "string", "title": "Saved Base Url", "default": "" }, "saved_model": { "type": "string", "title": "Saved Model", "default": "" } }, "type": "object", "required": [ "provider", "label", "kind" ], "title": "ProviderInfo" }, "ProviderUpdate": { "properties": { "api_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key" }, "base_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Base Url" }, "models": { "items": { "type": "string" }, "type": "array", "title": "Models" } }, "type": "object", "title": "ProviderUpdate" }, "ProviderView": { "properties": { "provider": { "type": "string", "title": "Provider" }, "api_key": { "type": "string", "title": "Api Key", "default": "" }, "api_key_set": { "type": "boolean", "title": "Api Key Set", "default": false }, "base_url": { "type": "string", "title": "Base Url", "default": "" }, "models": { "items": { "type": "string" }, "type": "array", "title": "Models" }, "default_model": { "type": "string", "title": "Default Model", "default": "" }, "env_has_key": { "type": "boolean", "title": "Env Has Key", "default": false } }, "type": "object", "required": [ "provider" ], "title": "ProviderView" }, "PublicClueOut": { "properties": { "clue_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Clue Id" }, "title": { "type": "string", "title": "Title" }, "status": { "type": "string", "title": "Status" }, "points_to": { "items": { "type": "string" }, "type": "array", "title": "Points To" }, "summary": { "type": "string", "title": "Summary", "default": "" } }, "type": "object", "required": [ "title", "status" ], "title": "PublicClueOut" }, "PublicMemoryViewOut": { "properties": { "relationships": { "items": { "$ref": "#/components/schemas/PublicRelationshipOut" }, "type": "array", "title": "Relationships" }, "clues": { "items": { "$ref": "#/components/schemas/PublicClueOut" }, "type": "array", "title": "Clues" }, "open_threads": { "items": { "type": "string" }, "type": "array", "title": "Open Threads" }, "remembered_facts": { "items": { "type": "string" }, "type": "array", "title": "Remembered Facts" } }, "type": "object", "title": "PublicMemoryViewOut" }, "PublicRelationshipOut": { "properties": { "npc_id": { "type": "string", "title": "Npc Id" }, "summary": { "type": "string", "title": "Summary" }, "confidence": { "type": "number", "title": "Confidence", "default": 0.0 }, "known_reasons": { "items": { "type": "string" }, "type": "array", "title": "Known Reasons" } }, "type": "object", "required": [ "npc_id", "summary" ], "title": "PublicRelationshipOut" }, "RecompileResponse": { "properties": { "ok": { "type": "boolean", "title": "Ok" }, "parsed_v6_after": { "type": "object", "title": "Parsed V6 After" } }, "type": "object", "required": [ "ok", "parsed_v6_after" ], "title": "RecompileResponse" }, "RegisterRequest": { "properties": { "username": { "type": "string", "maxLength": 64, "minLength": 3, "title": "Username" }, "password": { "type": "string", "maxLength": 255, "minLength": 8, "title": "Password" }, "name": { "anyOf": [ { "type": "string", "maxLength": 128 }, { "type": "null" } ], "title": "Name" }, "invite_code": { "anyOf": [ { "type": "string", "maxLength": 128 }, { "type": "null" } ], "title": "Invite Code" } }, "type": "object", "required": [ "username", "password" ], "title": "RegisterRequest" }, "RegistrationStatusResponse": { "properties": { "enabled": { "type": "boolean", "title": "Enabled" }, "invite_required": { "type": "boolean", "title": "Invite Required" } }, "type": "object", "required": [ "enabled", "invite_required" ], "title": "RegistrationStatusResponse" }, "RulesetDetail": { "properties": { "id": { "type": "string", "title": "Id" }, "owner_id": { "type": "string", "title": "Owner Id" }, "is_shared": { "type": "boolean", "title": "Is Shared" }, "book_id": { "type": "string", "title": "Book Id" }, "book_title": { "type": "string", "title": "Book Title" }, "world_mode": { "type": "string", "title": "World Mode" }, "has_dice_ir": { "type": "boolean", "title": "Has Dice Ir" }, "has_check_spec": { "type": "boolean", "title": "Has Check Spec" }, "has_character_ui": { "type": "boolean", "title": "Has Character Ui", "default": false }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "parsed_v6": { "type": "object", "title": "Parsed V6" }, "dice_ir": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Dice Ir" }, "check_spec": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Check Spec" }, "character_ui": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Character Ui" } }, "type": "object", "required": [ "id", "owner_id", "is_shared", "book_id", "book_title", "world_mode", "has_dice_ir", "has_check_spec", "created_at", "updated_at", "parsed_v6" ], "title": "RulesetDetail" }, "RulesetShareRequest": { "properties": { "is_shared": { "type": "boolean", "title": "Is Shared" } }, "type": "object", "required": [ "is_shared" ], "title": "RulesetShareRequest" }, "RulesetSummary": { "properties": { "id": { "type": "string", "title": "Id" }, "owner_id": { "type": "string", "title": "Owner Id" }, "is_shared": { "type": "boolean", "title": "Is Shared" }, "book_id": { "type": "string", "title": "Book Id" }, "book_title": { "type": "string", "title": "Book Title" }, "world_mode": { "type": "string", "title": "World Mode" }, "has_dice_ir": { "type": "boolean", "title": "Has Dice Ir" }, "has_check_spec": { "type": "boolean", "title": "Has Check Spec" }, "has_character_ui": { "type": "boolean", "title": "Has Character Ui", "default": false }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "owner_id", "is_shared", "book_id", "book_title", "world_mode", "has_dice_ir", "has_check_spec", "created_at", "updated_at" ], "title": "RulesetSummary" }, "RulesetUploadRequest": { "properties": { "artifact": { "type": "object", "title": "Artifact", "description": "raw v6 JSON" } }, "type": "object", "required": [ "artifact" ], "title": "RulesetUploadRequest", "description": "Caller posts the raw v6 JSON artifact verbatim." }, "SessionBgmListResponse": { "properties": { "track_ids": { "items": { "type": "string" }, "type": "array", "title": "Track Ids" }, "tracks": { "items": { "$ref": "#/components/schemas/MusicTrackOut" }, "type": "array", "title": "Tracks" } }, "type": "object", "title": "SessionBgmListResponse", "description": "Current BGM selection plus the visible tracks that back it.\n\n`tracks` is filtered to the caller's visible library (own + public) so the\nfrontend can render a picker without a second round-trip. `track_ids`\npreserves the user's chosen order and may include ids that are no longer\nvisible (e.g. a public track that went private); those are surfaced so the\nUI can warn rather than silently dropping them." }, "SessionBgmSelectionRequest": { "properties": { "track_ids": { "items": { "type": "string" }, "type": "array", "title": "Track Ids" } }, "type": "object", "title": "SessionBgmSelectionRequest" }, "SessionCreateRequest": { "properties": { "ruleset_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ruleset Id" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "character": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Character" } }, "type": "object", "title": "SessionCreateRequest", "description": "Body for `POST /api/sessions`. All fields optional — an empty\nbody creates a blank draft that the setup wizard will fill in." }, "SessionDetail": { "properties": { "id": { "type": "string", "title": "Id" }, "title": { "type": "string", "title": "Title" }, "ruleset_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ruleset Id" }, "ruleset_title": { "type": "string", "title": "Ruleset Title", "default": "" }, "ruleset_short_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ruleset Short Name" }, "archived": { "type": "boolean", "title": "Archived" }, "title_auto": { "type": "boolean", "title": "Title Auto", "default": true }, "setup_state": { "$ref": "#/components/schemas/SetupState" }, "last_active_at": { "type": "string", "format": "date-time", "title": "Last Active At" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "character": { "type": "object", "title": "Character" }, "module_state": { "type": "object", "title": "Module State" }, "memory_state": { "type": "object", "title": "Memory State" }, "narrative_summary": { "type": "string", "title": "Narrative Summary" }, "last_summarized_msg_count": { "type": "integer", "title": "Last Summarized Msg Count" }, "dice_history": { "items": { "type": "object" }, "type": "array", "title": "Dice History" }, "narrative_style": { "type": "string", "title": "Narrative Style" }, "difficulty_style": { "type": "string", "title": "Difficulty Style" } }, "type": "object", "required": [ "id", "title", "archived", "last_active_at", "created_at", "updated_at", "character", "module_state", "memory_state", "narrative_summary", "last_summarized_msg_count", "dice_history", "narrative_style", "difficulty_style" ], "title": "SessionDetail" }, "SessionSummary": { "properties": { "id": { "type": "string", "title": "Id" }, "title": { "type": "string", "title": "Title" }, "ruleset_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ruleset Id" }, "ruleset_title": { "type": "string", "title": "Ruleset Title", "default": "" }, "ruleset_short_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ruleset Short Name" }, "archived": { "type": "boolean", "title": "Archived" }, "title_auto": { "type": "boolean", "title": "Title Auto", "default": true }, "setup_state": { "$ref": "#/components/schemas/SetupState" }, "last_active_at": { "type": "string", "format": "date-time", "title": "Last Active At" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "title", "archived", "last_active_at", "created_at", "updated_at" ], "title": "SessionSummary", "description": "Lean shape used by the rooms panel listing." }, "SessionUpdateRequest": { "properties": { "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "title_auto": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Title Auto" }, "ruleset_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ruleset Id" }, "setup_state": { "anyOf": [ { "$ref": "#/components/schemas/SetupState" }, { "type": "null" } ] }, "archived": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Archived" }, "character": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Character" }, "module_state": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Module State" }, "memory_state": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Memory State" }, "narrative_summary": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Narrative Summary" }, "last_summarized_msg_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Last Summarized Msg Count" }, "dice_history": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Dice History" }, "narrative_style": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Narrative Style" }, "difficulty_style": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Difficulty Style" } }, "type": "object", "title": "SessionUpdateRequest", "description": "All fields optional — only provided fields are touched." }, "SetupState": { "properties": { "step": { "type": "integer", "title": "Step", "default": 0 }, "ruleset_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ruleset Id" }, "module_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Module Id" }, "module_title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Module Title" }, "start_unit_index": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Start Unit Index" }, "start_unit_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Start Unit Id" }, "start_unit_title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Start Unit Title" }, "completed": { "type": "boolean", "title": "Completed", "default": false } }, "type": "object", "title": "SetupState", "description": "Resumable setup-wizard progress carried by every session row." }, "SpeechGenerateRequest": { "properties": { "provider": { "type": "string", "title": "Provider" }, "model": { "type": "string", "title": "Model" }, "api_key": { "type": "string", "title": "Api Key", "default": "" }, "base_url": { "type": "string", "title": "Base Url", "default": "" }, "text": { "type": "string", "title": "Text" }, "voice": { "type": "string", "title": "Voice", "default": "" }, "audio_format": { "type": "string", "title": "Audio Format", "default": "mp3" }, "instructions": { "type": "string", "title": "Instructions", "default": "" }, "language": { "type": "string", "title": "Language", "default": "auto" } }, "type": "object", "required": [ "provider", "model", "text" ], "title": "SpeechGenerateRequest" }, "SpeechGenerateResponse": { "properties": { "provider": { "type": "string", "title": "Provider" }, "model": { "type": "string", "title": "Model" }, "audio_data_uri": { "type": "string", "title": "Audio Data Uri", "default": "" }, "audio_url": { "type": "string", "title": "Audio Url", "default": "" }, "mime_type": { "type": "string", "title": "Mime Type", "default": "audio/mpeg" }, "format": { "type": "string", "title": "Format", "default": "mp3" }, "usage": { "type": "object", "title": "Usage" } }, "type": "object", "required": [ "provider", "model" ], "title": "SpeechGenerateResponse" }, "TOCEntryView": { "properties": { "title": { "type": "string", "title": "Title" }, "level": { "type": "integer", "title": "Level" }, "anchor": { "type": "string", "title": "Anchor", "default": "" }, "line_start": { "type": "integer", "title": "Line Start", "default": 0 }, "line_end": { "type": "integer", "title": "Line End", "default": 0 } }, "type": "object", "required": [ "title", "level" ], "title": "TOCEntryView" }, "TestRequest": { "properties": { "provider": { "type": "string", "title": "Provider" }, "model": { "type": "string", "title": "Model" }, "api_key": { "type": "string", "title": "Api Key", "default": "" }, "base_url": { "type": "string", "title": "Base Url", "default": "" }, "prompt": { "type": "string", "title": "Prompt" }, "temperature": { "anyOf": [ { "type": "number", "maximum": 2.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Temperature" } }, "type": "object", "required": [ "provider", "model", "prompt" ], "title": "TestRequest" }, "TestResponse": { "properties": { "text": { "type": "string", "title": "Text" }, "provider": { "type": "string", "title": "Provider" }, "model": { "type": "string", "title": "Model" }, "total_ms": { "type": "integer", "title": "Total Ms" }, "first_token_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "First Token Ms" }, "chars": { "type": "integer", "title": "Chars", "default": 0 }, "chars_per_second": { "type": "number", "title": "Chars Per Second", "default": 0.0 }, "finish_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Finish Reason" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" } }, "type": "object", "required": [ "text", "provider", "model", "total_ms" ], "title": "TestResponse" }, "TurnTraceListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/TurnTraceOut" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "has_more": { "type": "boolean", "title": "Has More", "default": false } }, "type": "object", "required": [ "items", "total" ], "title": "TurnTraceListResponse" }, "TurnTraceOut": { "properties": { "id": { "type": "string", "title": "Id" }, "turn_id": { "type": "string", "title": "Turn Id" }, "session_id": { "type": "string", "title": "Session Id" }, "campaign_id": { "type": "string", "title": "Campaign Id" }, "player_input": { "type": "string", "title": "Player Input", "default": "" }, "context_cache_key": { "type": "string", "title": "Context Cache Key", "default": "" }, "context_prefix_hash": { "type": "string", "title": "Context Prefix Hash", "default": "" }, "retrieved_context_block_ids": { "items": { "type": "string" }, "type": "array", "title": "Retrieved Context Block Ids" }, "visibility_signature": { "type": "string", "title": "Visibility Signature", "default": "" }, "model_raw_output": { "type": "object", "title": "Model Raw Output" }, "parsed_contract_summary": { "type": "object", "title": "Parsed Contract Summary" }, "state_change_ids": { "items": { "type": "string" }, "type": "array", "title": "State Change Ids" }, "memory_proposal_count": { "type": "integer", "title": "Memory Proposal Count", "default": 0 }, "committed_memory_ids": { "items": { "type": "string" }, "type": "array", "title": "Committed Memory Ids" }, "rejected_memory_count": { "type": "integer", "title": "Rejected Memory Count", "default": 0 }, "audit_warnings": { "items": { "type": "object" }, "type": "array", "title": "Audit Warnings" }, "cache_metrics": { "type": "object", "title": "Cache Metrics" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "turn_id", "session_id", "campaign_id", "created_at" ], "title": "TurnTraceOut" }, "UndoEditResponse": { "properties": { "new_edit_id": { "type": "string", "title": "New Edit Id" }, "parsed_v6_after": { "type": "object", "title": "Parsed V6 After" } }, "type": "object", "required": [ "new_edit_id", "parsed_v6_after" ], "title": "UndoEditResponse" }, "UserCreateRequest": { "properties": { "username": { "type": "string", "maxLength": 64, "minLength": 1, "title": "Username" }, "password": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Password" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "role": { "type": "string", "title": "Role", "default": "player" } }, "type": "object", "required": [ "username", "password" ], "title": "UserCreateRequest" }, "UserInfo": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "username": { "type": "string", "title": "Username" }, "role": { "type": "string", "title": "Role" }, "preferences": { "type": "object", "title": "Preferences" } }, "type": "object", "required": [ "id", "name", "username", "role" ], "title": "UserInfo" }, "UserOut": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "username": { "type": "string", "title": "Username" }, "role": { "type": "string", "title": "Role" }, "preferences": { "type": "object", "title": "Preferences" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "name", "username", "role", "created_at", "updated_at" ], "title": "UserOut" }, "UserUpdateRequest": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "password": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Password" }, "role": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Role" } }, "type": "object", "title": "UserUpdateRequest", "description": "Admin can change name/password/role on a user. All optional." }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "VoiceIntroRequest": { "properties": { "force": { "type": "boolean", "title": "Force", "default": false } }, "type": "object", "title": "VoiceIntroRequest" }, "VoiceIntroResponse": { "properties": { "text": { "type": "string", "title": "Text" }, "audio_url": { "type": "string", "title": "Audio Url", "default": "" }, "provider": { "type": "string", "title": "Provider", "default": "" }, "model": { "type": "string", "title": "Model", "default": "" }, "voice": { "type": "string", "title": "Voice", "default": "" }, "cached": { "type": "boolean", "title": "Cached", "default": false } }, "type": "object", "required": [ "text" ], "title": "VoiceIntroResponse" }, "VoiceListRequest": { "properties": { "provider": { "type": "string", "title": "Provider" }, "model": { "type": "string", "title": "Model" }, "api_key": { "type": "string", "title": "Api Key", "default": "" }, "base_url": { "type": "string", "title": "Base Url", "default": "" }, "live": { "type": "boolean", "title": "Live", "default": true } }, "type": "object", "required": [ "provider", "model" ], "title": "VoiceListRequest" }, "VoiceListResponse": { "properties": { "provider": { "type": "string", "title": "Provider" }, "model": { "type": "string", "title": "Model" }, "voices": { "items": { "$ref": "#/components/schemas/VoiceView" }, "type": "array", "title": "Voices" }, "source": { "type": "string", "title": "Source", "default": "catalog" }, "live": { "type": "boolean", "title": "Live", "default": false }, "error": { "type": "string", "title": "Error", "default": "" } }, "type": "object", "required": [ "provider", "model" ], "title": "VoiceListResponse" }, "VoiceView": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name", "default": "" }, "gender": { "type": "string", "title": "Gender", "default": "" }, "description": { "type": "string", "title": "Description", "default": "" }, "languages": { "items": { "type": "string" }, "type": "array", "title": "Languages" }, "source": { "type": "string", "title": "Source", "default": "catalog" }, "raw": { "type": "object", "title": "Raw" } }, "type": "object", "required": [ "id" ], "title": "VoiceView" }, "_TranslateCharacterBody": { "properties": { "language": { "type": "string", "title": "Language", "default": "zh" } }, "type": "object", "title": "_TranslateCharacterBody" }, "_VoiceAssignBody": { "properties": { "voice": { "type": "string", "title": "Voice" }, "provider": { "type": "string", "title": "Provider", "default": "" }, "model": { "type": "string", "title": "Model", "default": "" } }, "type": "object", "required": [ "voice" ], "title": "_VoiceAssignBody", "description": "Body for the manual voice-assignment endpoints. The provider/model\npair tells us which TTS model the chosen voice belongs to so the\nruntime stamps the same metadata as the auto-assigner." } } } }