{ "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]