From 93ecda8346da7b1ed46f160279657c302302f8ea Mon Sep 17 00:00:00 2001 From: Alexander Eichhorn Date: Fri, 31 Jul 2026 09:16:39 +0200 Subject: [PATCH 1/7] feat(fp8): enable FP8 storage for Z-Image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Z-Image was excluded from FP8 storage in #8945 because diffusers' enable_layerwise_casting() was called with the global torch dtype (fp16) while Z-Image loads in bf16: skipped modules stayed bf16, hooked ones produced fp16, and attention crashed. That root cause was fixed later in the same PR — the compute dtype now comes from the model's own parameters — so the exclusion is obsolete. Removing it alone is not enough. Our hook-based cast (#9231) dropped one thing diffusers' enable_layerwise_casting() did: honoring the model's declared _skip_layerwise_casting_patterns. Z-Image needs it, and not for quality — TimestepEmbedder.forward reads self.mlp[0].weight.dtype and casts its *input* to it. With an fp8 weight the input becomes float8 before our pre-hook restores the weight, and F.linear dies with: RuntimeError: "addmm_cuda" not implemented for 'Float8_e4m3fn' which is why ZImageTransformer2DModel declares ['t_embedder', 'cap_embedder']. _apply_fp8_to_nn_module now takes extra_skip_patterns and the caller passes the model's list. For other models this is a strict superset of our defaults (FLUX/SD3 pos_embed+norm, UNet norm, CogView4 also proj_out), so it only ever skips more. Also wire the cast into ZImageCheckpointModel: only the diffusers loader called it, so the toggle was a silent no-op for single-file Z-Image models even though both paths build the same ZImageTransformer2DModel. Tested end to end on CUDA: transformer resident VRAM drops from ~11.5GB to 5880MB for both Z-Image-Turbo (diffusers) and Z-Image-Turbo (checkpoint, 14.37GB file), with clean output images in both cases. --- .../model_manager/load/load_default.py | 35 +- .../load/model_loaders/z_image.py | 5 + invokeai/frontend/web/openapi.json | 90605 ---------------- .../MainModelDefaultSettings.tsx | 6 +- .../load/test_load_default_fp8.py | 66 + 5 files changed, 98 insertions(+), 90619 deletions(-) diff --git a/invokeai/backend/model_manager/load/load_default.py b/invokeai/backend/model_manager/load/load_default.py index ba617b2b55a..cff2f9db543 100644 --- a/invokeai/backend/model_manager/load/load_default.py +++ b/invokeai/backend/model_manager/load/load_default.py @@ -234,12 +234,7 @@ def _should_use_fp8(self, config: AnyModelConfig, submodel_type: Optional[SubMod if self._torch_device.type != "cuda": return False - # Z-Image has dtype mismatch issues with diffusers' layerwise casting - # (skipped modules produce bf16, hooked modules expect fp16). - from invokeai.backend.model_manager.taxonomy import BaseModelType, ModelType - - if hasattr(config, "base") and config.base == BaseModelType.ZImage: - return False + from invokeai.backend.model_manager.taxonomy import ModelType # VAEs are excluded — fp8 storage causes noticeable quality degradation in decode. if hasattr(config, "type") and config.type == ModelType.VAE: @@ -310,7 +305,19 @@ def _apply_fp8_layerwise_casting( # `register_forward_hook` path fires around `nn.Module._call_impl` without replacing # `forward`, so `CustomLinear.forward` is still reached. if isinstance(model, torch.nn.Module): - self._apply_fp8_to_nn_module(model, storage_dtype=storage_dtype, compute_dtype=compute_dtype) + # Diffusers models declare their own precision-sensitive modules in + # `_skip_layerwise_casting_patterns`, and `enable_layerwise_casting()` honors them. Since + # we no longer call it, we have to apply that list ourselves — it is not cosmetic. Z-Image's + # `TimestepEmbedder.forward` reads `self.mlp[0].weight.dtype` and casts its *input* to it; + # with an fp8 weight the input becomes float8 before our pre-hook can restore the weight, + # and `F.linear` dies with `"addmm_cuda" not implemented for 'Float8_e4m3fn'`. Hence + # `['t_embedder', 'cap_embedder']` for that model. + self._apply_fp8_to_nn_module( + model, + storage_dtype=storage_dtype, + compute_dtype=compute_dtype, + extra_skip_patterns=tuple(getattr(model, "_skip_layerwise_casting_patterns", None) or ()), + ) else: return model @@ -323,7 +330,12 @@ def _apply_fp8_layerwise_casting( return model @staticmethod - def _apply_fp8_to_nn_module(model: torch.nn.Module, storage_dtype: torch.dtype, compute_dtype: torch.dtype) -> None: + def _apply_fp8_to_nn_module( + model: torch.nn.Module, + storage_dtype: torch.dtype, + compute_dtype: torch.dtype, + extra_skip_patterns: tuple[str, ...] = (), + ) -> None: """Apply FP8 layerwise casting to a plain nn.Module. Mirrors diffusers' `apply_layerwise_casting` semantics: only the layer classes in @@ -331,11 +343,16 @@ def _apply_fp8_to_nn_module(model: torch.nn.Module, storage_dtype: torch.dtype, `_FP8_DEFAULT_SKIP_PATTERNS` (norm, pos_embed, patch_embed, proj_in/out) are skipped. Without the skip list, precision-sensitive tiny learned scalars (e.g. FLUX RMSNorm.scale) get crushed to FP8 and quality degrades noticeably. + + `extra_skip_patterns` carries the model's own declared exclusions (diffusers' + `_skip_layerwise_casting_patterns`), which are model-specific and cannot be inferred from + layer types or generic name patterns. """ + skip_patterns = _FP8_DEFAULT_SKIP_PATTERNS + tuple(extra_skip_patterns) for module_name, module in model.named_modules(): if not isinstance(module, _FP8_SUPPORTED_PYTORCH_LAYERS): continue - if any(re.search(pattern, module_name) for pattern in _FP8_DEFAULT_SKIP_PATTERNS): + if any(re.search(pattern, module_name) for pattern in skip_patterns): continue params = list(module.parameters(recurse=False)) if not params: diff --git a/invokeai/backend/model_manager/load/model_loaders/z_image.py b/invokeai/backend/model_manager/load/model_loaders/z_image.py index 406d243c371..3703efb9eee 100644 --- a/invokeai/backend/model_manager/load/model_loaders/z_image.py +++ b/invokeai/backend/model_manager/load/model_loaders/z_image.py @@ -289,6 +289,11 @@ def _load_from_singlefile( sd[k] = sd[k].to(model_dtype) model.load_state_dict(sd, assign=True) + + # Every param is uniform `model_dtype` at this point (the loop above casts the whole state + # dict, including ComfyUI fp8 checkpoints, whose scale metadata was filtered out above), so + # the layerwise cast has a single unambiguous compute dtype to restore to. + model = self._apply_fp8_layerwise_casting(model, config, SubModelType.Transformer) return model diff --git a/invokeai/frontend/web/openapi.json b/invokeai/frontend/web/openapi.json index 9a65b613704..e69de29bb2d 100644 --- a/invokeai/frontend/web/openapi.json +++ b/invokeai/frontend/web/openapi.json @@ -1,90605 +0,0 @@ -{ - "openapi": "3.1.0", - "info": { - "title": "Invoke - Community Edition", - "description": "An API for invoking AI image operations", - "version": "1.0.0" - }, - "paths": { - "/api/v1/auth/status": { - "get": { - "tags": ["authentication"], - "summary": "Get Setup Status", - "description": "Check if initial administrator setup is required.\n\nReturns:\n SetupStatusResponse indicating whether setup is needed and multiuser mode status", - "operationId": "get_setup_status_api_v1_auth_status_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetupStatusResponse" - } - } - } - } - } - } - }, - "/api/v1/auth/login": { - "post": { - "tags": ["authentication"], - "summary": "Login", - "description": "Authenticate user and return access token.\n\nArgs:\n request: Login credentials (email and password)\n\nReturns:\n LoginResponse containing JWT token and user information\n\nRaises:\n HTTPException: 401 if credentials are invalid or user is inactive\n HTTPException: 403 if multiuser mode is disabled", - "operationId": "login_api_v1_auth_login_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoginRequest", - "description": "Login credentials" - } - } - }, - "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/v1/auth/logout": { - "post": { - "tags": ["authentication"], - "summary": "Logout", - "description": "Logout current user.\n\nCurrently a no-op since we use stateless JWT tokens. For token invalidation in\nfuture implementations, consider:\n- Token blacklist: Store invalidated tokens in Redis/database with expiration\n- Token versioning: Add version field to user record, increment on logout\n- Short-lived tokens: Use refresh token pattern with token rotation\n- Session storage: Track active sessions server-side for revocation\n\nArgs:\n current_user: The authenticated user (validates token)\n\nReturns:\n LogoutResponse indicating success", - "operationId": "logout_api_v1_auth_logout_post", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LogoutResponse" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/auth/media-cookie": { - "post": { - "tags": ["authentication"], - "summary": "Refresh Media Cookie", - "description": "Re-issue the media cookie from a valid Bearer token.\n\nThe media cookie is normally set at login, but a session can hold a valid JWT\nwithout it \u2014 the session may predate the cookie's introduction, or the cookie\nmay have been cleared while the JWT (in client storage) survived. Media\nelements can't send Authorization headers, so such sessions silently fail to\nload videos (black player) while every other API call works. The frontend\ncalls this on app load so an existing session self-heals without re-login.\n\nThe cookie's lifetime is clamped to the presented token's remaining validity \u2014\nit is the same JWT, so a longer-lived cookie would just yield 401s after\nexpiry anyway.\n\nReturns:\n MediaCookieResponse indicating the cookie was set. In single-user mode the\n media routes don't require authentication, so this is a successful no-op.\n\nRaises:\n HTTPException: 401 if the Bearer token is missing, invalid, or expired, or\n the user no longer exists or is inactive (raised by the auth dependency).", - "operationId": "refresh_media_cookie_api_v1_auth_media_cookie_post", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MediaCookieResponse" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/auth/me": { - "get": { - "tags": ["authentication"], - "summary": "Get Current User Info", - "description": "Get current authenticated user's information.\n\nArgs:\n current_user: The authenticated user's token data\n\nReturns:\n UserDTO containing user information\n\nRaises:\n HTTPException: 404 if user is not found (should not happen normally)", - "operationId": "get_current_user_info_api_v1_auth_me_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserDTO" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - }, - "patch": { - "tags": ["authentication"], - "summary": "Update Current User", - "description": "Update the current user's own profile.\n\nTo change the password, both ``current_password`` and ``new_password`` must\nbe provided. The current password is verified before the change is applied.\n\nArgs:\n request: Profile fields to update\n current_user: The authenticated user\n\nReturns:\n The updated user\n\nRaises:\n HTTPException: 400 if current password is incorrect or new password is weak\n HTTPException: 404 if user not found", - "operationId": "update_current_user_api_v1_auth_me_patch", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserProfileUpdateRequest", - "description": "Profile fields to update" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserDTO" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/auth/setup": { - "post": { - "tags": ["authentication"], - "summary": "Setup Admin", - "description": "Set up initial administrator account.\n\nThis endpoint can only be called once, when no admin user exists. It creates\nthe first admin user for the system.\n\nArgs:\n request: Admin account details (email, display_name, password)\n\nReturns:\n SetupResponse containing the created admin user\n\nRaises:\n HTTPException: 400 if admin already exists or password is weak\n HTTPException: 403 if multiuser mode is disabled", - "operationId": "setup_admin_api_v1_auth_setup_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetupRequest", - "description": "Admin account details" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetupResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/auth/generate-password": { - "get": { - "tags": ["authentication"], - "summary": "Generate Password", - "description": "Generate a strong random password.\n\nReturns a cryptographically secure random password of 16 characters\ncontaining uppercase, lowercase, digits, and punctuation.", - "operationId": "generate_password_api_v1_auth_generate_password_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GeneratePasswordResponse" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/auth/users": { - "get": { - "tags": ["authentication"], - "summary": "List Users", - "description": "List all users. Requires admin privileges.\n\nThe internal 'system' user (created for backward compatibility) is excluded\nfrom the results since it cannot be managed through this interface.\n\nReturns:\n List of all real users (system user excluded)", - "operationId": "list_users_api_v1_auth_users_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/UserDTO" - }, - "type": "array", - "title": "Response List Users Api V1 Auth Users Get" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - }, - "post": { - "tags": ["authentication"], - "summary": "Create User", - "description": "Create a new user. Requires admin privileges.\n\nArgs:\n request: New user details\n\nReturns:\n The created user\n\nRaises:\n HTTPException: 400 if email already exists or password is weak", - "operationId": "create_user_api_v1_auth_users_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminUserCreateRequest", - "description": "New user details" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserDTO" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/auth/users/{user_id}": { - "get": { - "tags": ["authentication"], - "summary": "Get User", - "description": "Get a user by ID. Requires admin privileges.\n\nArgs:\n user_id: The user ID\n\nReturns:\n The user\n\nRaises:\n HTTPException: 404 if user not found", - "operationId": "get_user_api_v1_auth_users__user_id__get", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "User ID", - "title": "User Id" - }, - "description": "User ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserDTO" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "patch": { - "tags": ["authentication"], - "summary": "Update User", - "description": "Update a user. Requires admin privileges.\n\nArgs:\n user_id: The user ID\n request: Fields to update\n\nReturns:\n The updated user\n\nRaises:\n HTTPException: 400 if password is weak\n HTTPException: 404 if user not found", - "operationId": "update_user_api_v1_auth_users__user_id__patch", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "User ID", - "title": "User Id" - }, - "description": "User ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminUserUpdateRequest", - "description": "User fields to update" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserDTO" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": ["authentication"], - "summary": "Delete User", - "description": "Delete a user. Requires admin privileges.\n\nAdmins can delete any user including other admins, but cannot delete the last\nremaining admin.\n\nArgs:\n user_id: The user ID\n\nRaises:\n HTTPException: 400 if attempting to delete the last admin\n HTTPException: 404 if user not found", - "operationId": "delete_user_api_v1_auth_users__user_id__delete", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "User ID", - "title": "User Id" - }, - "description": "User ID" - } - ], - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/utilities/dynamicprompts": { - "post": { - "tags": ["utilities"], - "summary": "Parse Dynamicprompts", - "description": "Creates a batch process", - "operationId": "parse_dynamicprompts", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Body_parse_dynamicprompts" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DynamicPromptsResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/utilities/expand-prompt": { - "post": { - "tags": ["utilities"], - "summary": "Expand Prompt", - "description": "Expand a brief prompt into a detailed image generation prompt using a text LLM.", - "operationId": "expand_prompt", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExpandPromptRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExpandPromptResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/utilities/image-to-prompt": { - "post": { - "tags": ["utilities"], - "summary": "Image To Prompt", - "description": "Generate a descriptive prompt from an image using a vision-language model.", - "operationId": "image_to_prompt", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ImageToPromptRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ImageToPromptResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v2/models/": { - "get": { - "tags": ["model_manager"], - "summary": "List Model Records", - "description": "Get a list of models.", - "operationId": "list_model_records", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "base_models", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseModelType" - } - }, - { - "type": "null" - } - ], - "description": "Base models to include", - "title": "Base Models" - }, - "description": "Base models to include" - }, - { - "name": "model_type", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ModelType" - }, - { - "type": "null" - } - ], - "description": "The type of model to get", - "title": "Model Type" - }, - "description": "The type of model to get" - }, - { - "name": "model_name", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Exact match on the name of the model", - "title": "Model Name" - }, - "description": "Exact match on the name of the model" - }, - { - "name": "model_format", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ModelFormat" - }, - { - "type": "null" - } - ], - "description": "Exact match on the format of the model (e.g. 'diffusers')", - "title": "Model Format" - }, - "description": "Exact match on the format of the model (e.g. 'diffusers')" - }, - { - "name": "order_by", - "in": "query", - "required": false, - "schema": { - "$ref": "#/components/schemas/ModelRecordOrderBy", - "description": "The field to order by", - "default": "name" - }, - "description": "The field to order by" - }, - { - "name": "direction", - "in": "query", - "required": false, - "schema": { - "$ref": "#/components/schemas/SQLiteDirection", - "description": "The direction to order by", - "default": "ASC" - }, - "description": "The direction to order by" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelsList" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v2/models/missing": { - "get": { - "tags": ["model_manager"], - "summary": "List Missing Models", - "description": "Get models whose files are missing from disk.\n\nThese are models that have database entries but their corresponding\nweight files have been deleted externally (not via Model Manager).\n\nAvailable to any authenticated user, not just admins: the frontend's model hooks subtract this\nset from the model list so unusable models are kept out of the generation dropdowns.", - "operationId": "list_missing_models", - "responses": { - "200": { - "description": "List of models with missing files", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelsList" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v2/models/get_by_attrs": { - "get": { - "tags": ["model_manager"], - "summary": "Get Model Records By Attrs", - "description": "Gets a model by its attributes. The main use of this route is to provide backwards compatibility with the old\nmodel manager, which identified models by a combination of name, base and type.", - "operationId": "get_model_records_by_attrs", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "name", - "in": "query", - "required": true, - "schema": { - "type": "string", - "description": "The name of the model", - "title": "Name" - }, - "description": "The name of the model" - }, - { - "name": "type", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/ModelType", - "description": "The type of the model" - }, - "description": "The type of the model" - }, - { - "name": "base", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/BaseModelType", - "description": "The base model of the model" - }, - "description": "The base model of the model" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/Main_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SD2_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SDXLRefiner_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SD3_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_CogView4_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Wan_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_ZImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_ErnieImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Ideogram4_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Krea2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SDXLRefiner_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_ZImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_Krea2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_Anima_Config" - }, - { - "$ref": "#/components/schemas/Main_BnBNF4_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_Wan_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_ZImage_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_Krea2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_Flux2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_Wan_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_Anima_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_Wan_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_Flux2_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_SD3_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_ZImage_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_Anima_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SD2_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SD1_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SD2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Flux2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_ZImage_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Krea2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Wan_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Anima_Config" - }, - { - "$ref": "#/components/schemas/LoRA_OMI_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_OMI_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SD2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_ZImage_Config" - }, - { - "$ref": "#/components/schemas/ControlLoRA_LyCORIS_FLUX_Config" - }, - { - "$ref": "#/components/schemas/T5Encoder_T5Encoder_Config" - }, - { - "$ref": "#/components/schemas/T5Encoder_BnBLLMint8_Config" - }, - { - "$ref": "#/components/schemas/T5Encoder_GGUF_Config" - }, - { - "$ref": "#/components/schemas/Qwen3VLEncoder_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/Qwen3VLEncoder_Qwen3VLEncoder_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_Qwen3Encoder_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_GGUF_Config" - }, - { - "$ref": "#/components/schemas/Gemma2Encoder_Gemma2Encoder_Config" - }, - { - "$ref": "#/components/schemas/Gemma2Encoder_GGUF_Config" - }, - { - "$ref": "#/components/schemas/QwenVLEncoder_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/QwenVLEncoder_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/WanT5Encoder_WanT5Encoder_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SD1_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SD2_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SDXL_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SD1_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SD2_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SD1_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SD2_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/T2IAdapter_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/T2IAdapter_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/Spandrel_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/CLIPEmbed_Diffusers_G_Config" - }, - { - "$ref": "#/components/schemas/CLIPEmbed_Diffusers_L_Config" - }, - { - "$ref": "#/components/schemas/CLIPVision_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/SigLIP_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/FLUXRedux_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/LlavaOnevision_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/TextLLM_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/ExternalApiModelConfig" - }, - { - "$ref": "#/components/schemas/Unknown_Config" - } - ], - "title": "Response Get Model Records By Attrs" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v2/models/get_by_hash": { - "get": { - "tags": ["model_manager"], - "summary": "Get Model Records By Hash", - "description": "Gets a model by its hash. This is useful for recalling models that were deleted and reinstalled,\nas the hash remains stable across reinstallations while the key (UUID) changes.", - "operationId": "get_model_records_by_hash", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "hash", - "in": "query", - "required": true, - "schema": { - "type": "string", - "description": "The hash of the model", - "title": "Hash" - }, - "description": "The hash of the model" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/Main_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SD2_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SDXLRefiner_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SD3_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_CogView4_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Wan_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_ZImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_ErnieImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Ideogram4_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Krea2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SDXLRefiner_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_ZImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_Krea2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_Anima_Config" - }, - { - "$ref": "#/components/schemas/Main_BnBNF4_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_Wan_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_ZImage_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_Krea2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_Flux2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_Wan_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_Anima_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_Wan_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_Flux2_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_SD3_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_ZImage_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_Anima_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SD2_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SD1_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SD2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Flux2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_ZImage_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Krea2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Wan_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Anima_Config" - }, - { - "$ref": "#/components/schemas/LoRA_OMI_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_OMI_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SD2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_ZImage_Config" - }, - { - "$ref": "#/components/schemas/ControlLoRA_LyCORIS_FLUX_Config" - }, - { - "$ref": "#/components/schemas/T5Encoder_T5Encoder_Config" - }, - { - "$ref": "#/components/schemas/T5Encoder_BnBLLMint8_Config" - }, - { - "$ref": "#/components/schemas/T5Encoder_GGUF_Config" - }, - { - "$ref": "#/components/schemas/Qwen3VLEncoder_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/Qwen3VLEncoder_Qwen3VLEncoder_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_Qwen3Encoder_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_GGUF_Config" - }, - { - "$ref": "#/components/schemas/Gemma2Encoder_Gemma2Encoder_Config" - }, - { - "$ref": "#/components/schemas/Gemma2Encoder_GGUF_Config" - }, - { - "$ref": "#/components/schemas/QwenVLEncoder_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/QwenVLEncoder_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/WanT5Encoder_WanT5Encoder_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SD1_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SD2_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SDXL_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SD1_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SD2_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SD1_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SD2_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/T2IAdapter_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/T2IAdapter_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/Spandrel_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/CLIPEmbed_Diffusers_G_Config" - }, - { - "$ref": "#/components/schemas/CLIPEmbed_Diffusers_L_Config" - }, - { - "$ref": "#/components/schemas/CLIPVision_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/SigLIP_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/FLUXRedux_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/LlavaOnevision_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/TextLLM_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/ExternalApiModelConfig" - }, - { - "$ref": "#/components/schemas/Unknown_Config" - } - ], - "title": "Response Get Model Records By Hash" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v2/models/i/{key}": { - "get": { - "tags": ["model_manager"], - "summary": "Get Model Record", - "description": "Get a model record", - "operationId": "get_model_record", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "key", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "Key of the model record to fetch.", - "title": "Key" - }, - "description": "Key of the model record to fetch." - } - ], - "responses": { - "200": { - "description": "The model configuration was retrieved successfully", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/Main_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SD2_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SDXLRefiner_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SD3_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_CogView4_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Wan_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_ZImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_ErnieImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Ideogram4_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Krea2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SDXLRefiner_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_ZImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_Krea2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_Anima_Config" - }, - { - "$ref": "#/components/schemas/Main_BnBNF4_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_Wan_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_ZImage_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_Krea2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_Flux2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_Wan_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_Anima_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_Wan_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_Flux2_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_SD3_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_ZImage_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_Anima_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SD2_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SD1_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SD2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Flux2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_ZImage_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Krea2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Wan_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Anima_Config" - }, - { - "$ref": "#/components/schemas/LoRA_OMI_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_OMI_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SD2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_ZImage_Config" - }, - { - "$ref": "#/components/schemas/ControlLoRA_LyCORIS_FLUX_Config" - }, - { - "$ref": "#/components/schemas/T5Encoder_T5Encoder_Config" - }, - { - "$ref": "#/components/schemas/T5Encoder_BnBLLMint8_Config" - }, - { - "$ref": "#/components/schemas/T5Encoder_GGUF_Config" - }, - { - "$ref": "#/components/schemas/Qwen3VLEncoder_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/Qwen3VLEncoder_Qwen3VLEncoder_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_Qwen3Encoder_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_GGUF_Config" - }, - { - "$ref": "#/components/schemas/Gemma2Encoder_Gemma2Encoder_Config" - }, - { - "$ref": "#/components/schemas/Gemma2Encoder_GGUF_Config" - }, - { - "$ref": "#/components/schemas/QwenVLEncoder_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/QwenVLEncoder_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/WanT5Encoder_WanT5Encoder_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SD1_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SD2_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SDXL_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SD1_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SD2_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SD1_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SD2_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/T2IAdapter_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/T2IAdapter_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/Spandrel_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/CLIPEmbed_Diffusers_G_Config" - }, - { - "$ref": "#/components/schemas/CLIPEmbed_Diffusers_L_Config" - }, - { - "$ref": "#/components/schemas/CLIPVision_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/SigLIP_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/FLUXRedux_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/LlavaOnevision_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/TextLLM_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/ExternalApiModelConfig" - }, - { - "$ref": "#/components/schemas/Unknown_Config" - } - ], - "title": "Response Get Model Record" - }, - "example": { - "path": "string", - "name": "string", - "base": "sd-1", - "type": "main", - "format": "checkpoint", - "config_path": "string", - "key": "string", - "hash": "string", - "file_size": 1, - "description": "string", - "source": "string", - "converted_at": 0, - "variant": "normal", - "prediction_type": "epsilon", - "repo_variant": "fp16", - "upcast_attention": false - } - } - } - }, - "400": { - "description": "Bad request" - }, - "404": { - "description": "The model could not be found" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "patch": { - "tags": ["model_manager"], - "summary": "Update Model Record", - "description": "Update a model's config.", - "operationId": "update_model_record", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "key", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "Unique key of model", - "title": "Key" - }, - "description": "Unique key of model" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelRecordChanges", - "description": "Model config", - "examples": [ - { - "path": "/path/to/model", - "name": "model_name", - "base": "sd-1", - "type": "main", - "format": "checkpoint", - "config_path": "configs/stable-diffusion/v1-inference.yaml", - "description": "Model description", - "variant": "normal" - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "The model was updated successfully", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/Main_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SD2_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SDXLRefiner_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SD3_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_CogView4_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Wan_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_ZImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_ErnieImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Ideogram4_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Krea2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SDXLRefiner_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_ZImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_Krea2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_Anima_Config" - }, - { - "$ref": "#/components/schemas/Main_BnBNF4_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_Wan_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_ZImage_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_Krea2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_Flux2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_Wan_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_Anima_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_Wan_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_Flux2_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_SD3_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_ZImage_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_Anima_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SD2_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SD1_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SD2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Flux2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_ZImage_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Krea2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Wan_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Anima_Config" - }, - { - "$ref": "#/components/schemas/LoRA_OMI_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_OMI_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SD2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_ZImage_Config" - }, - { - "$ref": "#/components/schemas/ControlLoRA_LyCORIS_FLUX_Config" - }, - { - "$ref": "#/components/schemas/T5Encoder_T5Encoder_Config" - }, - { - "$ref": "#/components/schemas/T5Encoder_BnBLLMint8_Config" - }, - { - "$ref": "#/components/schemas/T5Encoder_GGUF_Config" - }, - { - "$ref": "#/components/schemas/Qwen3VLEncoder_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/Qwen3VLEncoder_Qwen3VLEncoder_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_Qwen3Encoder_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_GGUF_Config" - }, - { - "$ref": "#/components/schemas/Gemma2Encoder_Gemma2Encoder_Config" - }, - { - "$ref": "#/components/schemas/Gemma2Encoder_GGUF_Config" - }, - { - "$ref": "#/components/schemas/QwenVLEncoder_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/QwenVLEncoder_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/WanT5Encoder_WanT5Encoder_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SD1_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SD2_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SDXL_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SD1_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SD2_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SD1_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SD2_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/T2IAdapter_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/T2IAdapter_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/Spandrel_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/CLIPEmbed_Diffusers_G_Config" - }, - { - "$ref": "#/components/schemas/CLIPEmbed_Diffusers_L_Config" - }, - { - "$ref": "#/components/schemas/CLIPVision_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/SigLIP_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/FLUXRedux_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/LlavaOnevision_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/TextLLM_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/ExternalApiModelConfig" - }, - { - "$ref": "#/components/schemas/Unknown_Config" - } - ], - "title": "Response Update Model Record" - }, - "example": { - "path": "string", - "name": "string", - "base": "sd-1", - "type": "main", - "format": "checkpoint", - "config_path": "string", - "key": "string", - "hash": "string", - "file_size": 1, - "description": "string", - "source": "string", - "converted_at": 0, - "variant": "normal", - "prediction_type": "epsilon", - "repo_variant": "fp16", - "upcast_attention": false - } - } - } - }, - "400": { - "description": "Bad request" - }, - "404": { - "description": "The model could not be found" - }, - "409": { - "description": "There is already a model corresponding to the new name" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": ["model_manager"], - "summary": "Delete Model", - "description": "Delete model record from database.\n\nThe configuration record will be removed. The corresponding weights files will be\ndeleted as well if they reside within the InvokeAI \"models\" directory.", - "operationId": "delete_model", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "key", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "Unique key of model to remove from model registry.", - "title": "Key" - }, - "description": "Unique key of model to remove from model registry." - } - ], - "responses": { - "204": { - "description": "Model deleted successfully" - }, - "404": { - "description": "Model not found" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v2/models/i/{key}/reidentify": { - "post": { - "tags": ["model_manager"], - "summary": "Reidentify Model", - "description": "Attempt to reidentify a model by re-probing its weights file.", - "operationId": "reidentify_model", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "key", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "Key of the model to reidentify.", - "title": "Key" - }, - "description": "Key of the model to reidentify." - } - ], - "responses": { - "200": { - "description": "The model configuration was retrieved successfully", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/Main_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SD2_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SDXLRefiner_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SD3_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_CogView4_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Wan_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_ZImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_ErnieImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Ideogram4_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Krea2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SDXLRefiner_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_ZImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_Krea2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_Anima_Config" - }, - { - "$ref": "#/components/schemas/Main_BnBNF4_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_Wan_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_ZImage_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_Krea2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_Flux2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_Wan_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_Anima_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_Wan_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_Flux2_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_SD3_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_ZImage_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_Anima_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SD2_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SD1_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SD2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Flux2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_ZImage_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Krea2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Wan_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Anima_Config" - }, - { - "$ref": "#/components/schemas/LoRA_OMI_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_OMI_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SD2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_ZImage_Config" - }, - { - "$ref": "#/components/schemas/ControlLoRA_LyCORIS_FLUX_Config" - }, - { - "$ref": "#/components/schemas/T5Encoder_T5Encoder_Config" - }, - { - "$ref": "#/components/schemas/T5Encoder_BnBLLMint8_Config" - }, - { - "$ref": "#/components/schemas/T5Encoder_GGUF_Config" - }, - { - "$ref": "#/components/schemas/Qwen3VLEncoder_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/Qwen3VLEncoder_Qwen3VLEncoder_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_Qwen3Encoder_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_GGUF_Config" - }, - { - "$ref": "#/components/schemas/Gemma2Encoder_Gemma2Encoder_Config" - }, - { - "$ref": "#/components/schemas/Gemma2Encoder_GGUF_Config" - }, - { - "$ref": "#/components/schemas/QwenVLEncoder_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/QwenVLEncoder_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/WanT5Encoder_WanT5Encoder_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SD1_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SD2_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SDXL_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SD1_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SD2_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SD1_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SD2_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/T2IAdapter_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/T2IAdapter_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/Spandrel_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/CLIPEmbed_Diffusers_G_Config" - }, - { - "$ref": "#/components/schemas/CLIPEmbed_Diffusers_L_Config" - }, - { - "$ref": "#/components/schemas/CLIPVision_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/SigLIP_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/FLUXRedux_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/LlavaOnevision_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/TextLLM_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/ExternalApiModelConfig" - }, - { - "$ref": "#/components/schemas/Unknown_Config" - } - ], - "title": "Response Reidentify Model" - }, - "example": { - "path": "string", - "name": "string", - "base": "sd-1", - "type": "main", - "format": "checkpoint", - "config_path": "string", - "key": "string", - "hash": "string", - "file_size": 1, - "description": "string", - "source": "string", - "converted_at": 0, - "variant": "normal", - "prediction_type": "epsilon", - "repo_variant": "fp16", - "upcast_attention": false - } - } - } - }, - "400": { - "description": "Bad request" - }, - "404": { - "description": "The model could not be found" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v2/models/scan_folder": { - "get": { - "tags": ["model_manager"], - "summary": "Scan For Models", - "operationId": "scan_for_models", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "scan_path", - "in": "query", - "required": false, - "schema": { - "type": "string", - "description": "Directory path to search for models", - "title": "Scan Path" - }, - "description": "Directory path to search for models" - } - ], - "responses": { - "200": { - "description": "Directory scanned successfully", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FoundModel" - }, - "title": "Response Scan For Models" - } - } - } - }, - "400": { - "description": "Invalid directory path" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v2/models/hugging_face": { - "get": { - "tags": ["model_manager"], - "summary": "Get Hugging Face Models", - "operationId": "get_hugging_face_models", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "hugging_face_repo", - "in": "query", - "required": false, - "schema": { - "type": "string", - "description": "Hugging face repo to search for models", - "title": "Hugging Face Repo" - }, - "description": "Hugging face repo to search for models" - } - ], - "responses": { - "200": { - "description": "Hugging Face repo scanned successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HuggingFaceModels" - } - } - } - }, - "400": { - "description": "Invalid hugging face repo" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v2/models/i/{key}/image": { - "get": { - "tags": ["model_manager"], - "summary": "Get Model Image", - "description": "Gets an image file that previews the model", - "operationId": "get_model_image", - "parameters": [ - { - "name": "key", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The name of model image file to get", - "title": "Key" - }, - "description": "The name of model image file to get" - } - ], - "responses": { - "200": { - "description": "The model image was fetched successfully", - "content": { - "application/json": { - "schema": {} - } - } - }, - "400": { - "description": "Bad request" - }, - "404": { - "description": "The model image could not be found" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "patch": { - "tags": ["model_manager"], - "summary": "Update Model Image", - "operationId": "update_model_image", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "key", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "Unique key of model", - "title": "Key" - }, - "description": "Unique key of model" - } - ], - "requestBody": { - "required": true, - "content": { - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/Body_update_model_image" - } - } - } - }, - "responses": { - "200": { - "description": "The model image was updated successfully", - "content": { - "application/json": { - "schema": {} - } - } - }, - "400": { - "description": "Bad request" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": ["model_manager"], - "summary": "Delete Model Image", - "operationId": "delete_model_image", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "key", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "Unique key of model image to remove from model_images directory.", - "title": "Key" - }, - "description": "Unique key of model image to remove from model_images directory." - } - ], - "responses": { - "204": { - "description": "Model image deleted successfully" - }, - "404": { - "description": "Model image not found" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v2/models/i/bulk_delete": { - "post": { - "tags": ["model_manager"], - "summary": "Bulk Delete Models", - "description": "Delete multiple model records from database.\n\nThe configuration records will be removed. The corresponding weights files will be\ndeleted as well if they reside within the InvokeAI \"models\" directory.\nReturns a list of successfully deleted keys and failed deletions with error messages.", - "operationId": "bulk_delete_models", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkDeleteModelsRequest", - "description": "List of model keys to delete" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Models deleted (possibly with some failures)", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkDeleteModelsResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v2/models/i/bulk_reidentify": { - "post": { - "tags": ["model_manager"], - "summary": "Bulk Reidentify Models", - "description": "Reidentify multiple models by re-probing their weights files.\n\nReturns a list of successfully reidentified keys and failed reidentifications with error messages.", - "operationId": "bulk_reidentify_models", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkReidentifyModelsRequest", - "description": "List of model keys to reidentify" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Models reidentified (possibly with some failures)", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkReidentifyModelsResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v2/models/install": { - "post": { - "tags": ["model_manager"], - "summary": "Install Model", - "description": "Install a model using a string identifier.\n\n`source` can be any of the following.\n\n1. A path on the local filesystem ('C:\\users\\fred\\model.safetensors')\n2. A Url pointing to a single downloadable model file\n3. A HuggingFace repo_id with any of the following formats:\n - model/name\n - model/name:fp16:vae\n - model/name::vae -- use default precision\n - model/name:fp16:path/to/model.safetensors\n - model/name::path/to/model.safetensors\n\n`config` is a ModelRecordChanges object. Fields in this object will override\nthe ones that are probed automatically. Pass an empty object to accept\nall the defaults.\n\n`access_token` is an optional access token for use with Urls that require\nauthentication.\n\nModels will be downloaded, probed, configured and installed in a\nseries of background threads. The return object has `status` attribute\nthat can be used to monitor progress.\n\nSee the documentation for `import_model_record` for more information on\ninterpreting the job information returned by this route.", - "operationId": "install_model", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "source", - "in": "query", - "required": true, - "schema": { - "type": "string", - "description": "Model source to install, can be a local path, repo_id, or remote URL", - "title": "Source" - }, - "description": "Model source to install, can be a local path, repo_id, or remote URL" - }, - { - "name": "inplace", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "description": "Whether or not to install a local model in place", - "default": false, - "title": "Inplace" - }, - "description": "Whether or not to install a local model in place" - }, - { - "name": "access_token", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "access token for the remote resource", - "title": "Access Token" - }, - "description": "access token for the remote resource" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelRecordChanges", - "description": "Object containing fields that override auto-probed values in the model config record, such as name, description and prediction_type ", - "examples": [ - { - "name": "string", - "description": "string" - } - ] - } - } - } - }, - "responses": { - "201": { - "description": "The model imported successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelInstallJob" - } - } - } - }, - "415": { - "description": "Unrecognized file/folder format" - }, - "424": { - "description": "The model appeared to import successfully, but could not be found in the model manager" - }, - "409": { - "description": "There is already a model corresponding to this path or repo_id" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "get": { - "tags": ["model_manager"], - "summary": "List Model Installs", - "description": "Return the list of model install jobs.\n\nInstall jobs have a numeric `id`, a `status`, and other fields that provide information on\nthe nature of the job and its progress. The `status` is one of:\n\n* \"waiting\" -- Job is waiting in the queue to run\n* \"downloading\" -- Model file(s) are downloading\n* \"running\" -- Model has downloaded and the model probing and registration process is running\n* \"paused\" -- Job is paused and can be resumed\n* \"completed\" -- Installation completed successfully\n* \"error\" -- An error occurred. Details will be in the \"error_type\" and \"error\" fields.\n* \"cancelled\" -- Job was cancelled before completion.\n\nOnce completed, information about the model such as its size, base\nmodel and type can be retrieved from the `config_out` field. For multi-file models such as diffusers,\ninformation on individual files can be retrieved from `download_parts`.\n\nSee the example and schema below for more information.", - "operationId": "list_model_installs", - "security": [ - { - "HTTPBearer": [] - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ModelInstallJob" - }, - "title": "Response List Model Installs" - } - } - } - } - } - }, - "delete": { - "tags": ["model_manager"], - "summary": "Prune Model Install Jobs", - "description": "Prune all completed and errored jobs from the install job list.", - "operationId": "prune_model_install_jobs", - "security": [ - { - "HTTPBearer": [] - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "204": { - "description": "All completed and errored jobs have been pruned" - }, - "400": { - "description": "Bad request" - } - } - } - }, - "/api/v2/models/install/huggingface": { - "get": { - "tags": ["model_manager"], - "summary": "Install Hugging Face Model", - "description": "Install a Hugging Face model using a string identifier.", - "operationId": "install_hugging_face_model", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "source", - "in": "query", - "required": true, - "schema": { - "type": "string", - "description": "HuggingFace repo_id to install", - "title": "Source" - }, - "description": "HuggingFace repo_id to install" - } - ], - "responses": { - "201": { - "description": "The model is being installed", - "content": { - "text/html": { - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "Bad request" - }, - "409": { - "description": "There is already a model corresponding to this path or repo_id" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v2/models/install/{id}": { - "get": { - "tags": ["model_manager"], - "summary": "Get Model Install Job", - "description": "Return model install job corresponding to the given source. See the documentation for 'List Model Install Jobs'\nfor information on the format of the return value.", - "operationId": "get_model_install_job", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "description": "Model install id", - "title": "Id" - }, - "description": "Model install id" - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelInstallJob" - } - } - } - }, - "404": { - "description": "No such job" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": ["model_manager"], - "summary": "Cancel Model Install Job", - "description": "Cancel the model install job(s) corresponding to the given job ID.", - "operationId": "cancel_model_install_job", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "description": "Model install job ID", - "title": "Id" - }, - "description": "Model install job ID" - } - ], - "responses": { - "201": { - "description": "The job was cancelled successfully", - "content": { - "application/json": { - "schema": {} - } - } - }, - "415": { - "description": "No such job" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v2/models/install/{id}/pause": { - "post": { - "tags": ["model_manager"], - "summary": "Pause Model Install Job", - "description": "Pause the model install job corresponding to the given job ID.", - "operationId": "pause_model_install_job", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "description": "Model install job ID", - "title": "Id" - }, - "description": "Model install job ID" - } - ], - "responses": { - "201": { - "description": "The job was paused successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelInstallJob" - } - } - } - }, - "415": { - "description": "No such job" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v2/models/install/{id}/resume": { - "post": { - "tags": ["model_manager"], - "summary": "Resume Model Install Job", - "description": "Resume a paused model install job corresponding to the given job ID.", - "operationId": "resume_model_install_job", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "description": "Model install job ID", - "title": "Id" - }, - "description": "Model install job ID" - } - ], - "responses": { - "201": { - "description": "The job was resumed successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelInstallJob" - } - } - } - }, - "415": { - "description": "No such job" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v2/models/install/{id}/restart_failed": { - "post": { - "tags": ["model_manager"], - "summary": "Restart Failed Model Install Job", - "description": "Restart failed or non-resumable file downloads for the given job.", - "operationId": "restart_failed_model_install_job", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "description": "Model install job ID", - "title": "Id" - }, - "description": "Model install job ID" - } - ], - "responses": { - "201": { - "description": "Failed files restarted successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelInstallJob" - } - } - } - }, - "415": { - "description": "No such job" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v2/models/install/{id}/restart_file": { - "post": { - "tags": ["model_manager"], - "summary": "Restart Model Install File", - "description": "Restart a specific file download for the given job.", - "operationId": "restart_model_install_file", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "description": "Model install job ID", - "title": "Id" - }, - "description": "Model install job ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "string", - "format": "uri", - "minLength": 1, - "description": "File download URL to restart", - "title": "File Source" - } - } - } - }, - "responses": { - "201": { - "description": "File restarted successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelInstallJob" - } - } - } - }, - "415": { - "description": "No such job" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v2/models/convert/{key}": { - "put": { - "tags": ["model_manager"], - "summary": "Convert Model", - "description": "Permanently convert a model into diffusers format, replacing the safetensors version.\nNote that during the conversion process the key and model hash will change.\nThe return value is the model configuration for the converted model.", - "operationId": "convert_model", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "key", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "Unique key of the safetensors main model to convert to diffusers format.", - "title": "Key" - }, - "description": "Unique key of the safetensors main model to convert to diffusers format." - } - ], - "responses": { - "200": { - "description": "Model converted successfully", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/Main_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SD2_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SDXLRefiner_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SD3_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_CogView4_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Wan_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_ZImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_ErnieImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Ideogram4_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Krea2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SDXLRefiner_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_ZImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_Krea2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_Anima_Config" - }, - { - "$ref": "#/components/schemas/Main_BnBNF4_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_Wan_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_ZImage_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_Krea2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_Flux2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_Wan_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_Anima_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_Wan_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_Flux2_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_SD3_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/PiDDecoder_Checkpoint_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_ZImage_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_Anima_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SD2_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SD1_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SD2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Flux2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_ZImage_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Krea2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Wan_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Anima_Config" - }, - { - "$ref": "#/components/schemas/LoRA_OMI_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_OMI_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SD2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_ZImage_Config" - }, - { - "$ref": "#/components/schemas/ControlLoRA_LyCORIS_FLUX_Config" - }, - { - "$ref": "#/components/schemas/T5Encoder_T5Encoder_Config" - }, - { - "$ref": "#/components/schemas/T5Encoder_BnBLLMint8_Config" - }, - { - "$ref": "#/components/schemas/T5Encoder_GGUF_Config" - }, - { - "$ref": "#/components/schemas/Qwen3VLEncoder_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/Qwen3VLEncoder_Qwen3VLEncoder_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_Qwen3Encoder_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_GGUF_Config" - }, - { - "$ref": "#/components/schemas/Gemma2Encoder_Gemma2Encoder_Config" - }, - { - "$ref": "#/components/schemas/Gemma2Encoder_GGUF_Config" - }, - { - "$ref": "#/components/schemas/QwenVLEncoder_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/QwenVLEncoder_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/WanT5Encoder_WanT5Encoder_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SD1_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SD2_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SDXL_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SD1_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SD2_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SD1_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SD2_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/T2IAdapter_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/T2IAdapter_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/Spandrel_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/CLIPEmbed_Diffusers_G_Config" - }, - { - "$ref": "#/components/schemas/CLIPEmbed_Diffusers_L_Config" - }, - { - "$ref": "#/components/schemas/CLIPVision_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/SigLIP_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/FLUXRedux_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/LlavaOnevision_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/TextLLM_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/ExternalApiModelConfig" - }, - { - "$ref": "#/components/schemas/Unknown_Config" - } - ], - "title": "Response Convert Model" - }, - "example": { - "path": "string", - "name": "string", - "base": "sd-1", - "type": "main", - "format": "checkpoint", - "config_path": "string", - "key": "string", - "hash": "string", - "file_size": 1, - "description": "string", - "source": "string", - "converted_at": 0, - "variant": "normal", - "prediction_type": "epsilon", - "repo_variant": "fp16", - "upcast_attention": false - } - } - } - }, - "400": { - "description": "Bad request" - }, - "404": { - "description": "Model not found" - }, - "409": { - "description": "There is already a model registered at this location" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v2/models/starter_models": { - "get": { - "tags": ["model_manager"], - "summary": "Get Starter Models", - "operationId": "get_starter_models", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StarterModelResponse" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v2/models/stats": { - "get": { - "tags": ["model_manager"], - "summary": "Get model manager RAM cache performance statistics.", - "description": "Return performance statistics on the model manager's RAM cache. In multi-GPU mode there is\none cache per generation device; their statistics are aggregated. Will return null if no models\nhave been loaded.", - "operationId": "get_stats", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/CacheStats" - }, - { - "type": "null" - } - ], - "title": "Response Get Stats" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v2/models/empty_model_cache": { - "post": { - "tags": ["model_manager"], - "summary": "Empty Model Cache", - "description": "Drop all models from the model cache to free RAM/VRAM. 'Locked' models that are in active use will not be dropped.", - "operationId": "empty_model_cache", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v2/models/hf_login": { - "get": { - "tags": ["model_manager"], - "summary": "Get Hf Login Status", - "operationId": "get_hf_login_status", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HFTokenStatus" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - }, - "post": { - "tags": ["model_manager"], - "summary": "Do Hf Login", - "operationId": "do_hf_login", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Body_do_hf_login" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HFTokenStatus" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - }, - "delete": { - "tags": ["model_manager"], - "summary": "Reset Hf Token", - "operationId": "reset_hf_token", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HFTokenStatus" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v2/models/sync/orphaned": { - "get": { - "tags": ["model_manager"], - "summary": "Get Orphaned Models", - "description": "Find orphaned model directories.\n\nOrphaned models are directories in the models folder that contain model files\nbut are not referenced in the database. This can happen when models are deleted\nfrom the database but the files remain on disk.\n\nReturns:\n List of orphaned model directory information", - "operationId": "get_orphaned_models", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/OrphanedModelInfo" - }, - "type": "array", - "title": "Response Get Orphaned Models" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - }, - "delete": { - "tags": ["model_manager"], - "summary": "Delete Orphaned Models", - "description": "Delete specified orphaned model directories.\n\nArgs:\n request: Request containing list of relative paths to delete\n\nReturns:\n Response indicating which paths were deleted and which had errors", - "operationId": "delete_orphaned_models", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteOrphanedModelsRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteOrphanedModelsResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/download_queue/": { - "get": { - "tags": ["download_queue"], - "summary": "List Downloads", - "description": "Get a list of active and inactive jobs.", - "operationId": "list_downloads", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/DownloadJob" - }, - "type": "array", - "title": "Response List Downloads" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - }, - "patch": { - "tags": ["download_queue"], - "summary": "Prune Downloads", - "description": "Prune completed and errored jobs.", - "operationId": "prune_downloads", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "204": { - "description": "All completed jobs have been pruned" - }, - "400": { - "description": "Bad request" - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/download_queue/i/": { - "post": { - "tags": ["download_queue"], - "summary": "Download", - "description": "Download the source URL to the file or directory indicted in dest.", - "operationId": "download", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Body_download" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DownloadJob" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/download_queue/i/{id}": { - "get": { - "tags": ["download_queue"], - "summary": "Get Download Job", - "description": "Get a download job using its ID.", - "operationId": "get_download_job", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "description": "ID of the download job to fetch.", - "title": "Id" - }, - "description": "ID of the download job to fetch." - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DownloadJob" - } - } - } - }, - "404": { - "description": "The requested download JobID could not be found" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": ["download_queue"], - "summary": "Cancel Download Job", - "description": "Cancel a download job using its ID.", - "operationId": "cancel_download_job", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "description": "ID of the download job to cancel.", - "title": "Id" - }, - "description": "ID of the download job to cancel." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "204": { - "description": "Job has been cancelled" - }, - "404": { - "description": "The requested download JobID could not be found" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/download_queue/i": { - "delete": { - "tags": ["download_queue"], - "summary": "Cancel All Download Jobs", - "description": "Cancel all download jobs.", - "operationId": "cancel_all_download_jobs", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "204": { - "description": "Download jobs have been cancelled" - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/image_moves/start": { - "post": { - "tags": ["image_moves"], - "summary": "Start Image Move", - "operationId": "start_image_move", - "responses": { - "202": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ImageMoveStatusResponse" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/image_moves/recover": { - "post": { - "tags": ["image_moves"], - "summary": "Start Image Move Recovery", - "operationId": "start_image_move_recovery", - "responses": { - "202": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ImageMoveStatusResponse" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/image_moves/status": { - "get": { - "tags": ["image_moves"], - "summary": "Get Image Move Status", - "operationId": "get_image_move_status", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ImageMoveStatusResponse" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/images/upload": { - "post": { - "tags": ["images"], - "summary": "Upload Image", - "description": "Uploads an image for the current user", - "operationId": "upload_image", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "image_category", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/ImageCategory", - "description": "The category of the image" - }, - "description": "The category of the image" - }, - { - "name": "is_intermediate", - "in": "query", - "required": true, - "schema": { - "type": "boolean", - "description": "Whether this is an intermediate image", - "title": "Is Intermediate" - }, - "description": "Whether this is an intermediate image" - }, - { - "name": "board_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "The board to add this image to, if any", - "title": "Board Id" - }, - "description": "The board to add this image to, if any" - }, - { - "name": "session_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "The session ID associated with this upload, if any", - "title": "Session Id" - }, - "description": "The session ID associated with this upload, if any" - }, - { - "name": "crop_visible", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "description": "Whether to crop the image", - "default": false, - "title": "Crop Visible" - }, - "description": "Whether to crop the image" - } - ], - "requestBody": { - "required": true, - "content": { - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/Body_upload_image" - } - } - } - }, - "responses": { - "201": { - "description": "The image was uploaded successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ImageDTO" - } - } - } - }, - "415": { - "description": "Image upload failed" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/images/": { - "post": { - "tags": ["images"], - "summary": "Create Image Upload Entry", - "description": "Uploads an image from a URL, not implemented", - "operationId": "create_image_upload_entry", - "security": [ - { - "HTTPBearer": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Body_create_image_upload_entry" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ImageUploadEntry" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "get": { - "tags": ["images"], - "summary": "List Image Dtos", - "description": "Gets a list of image DTOs for the current user", - "operationId": "list_image_dtos", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "image_origin", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResourceOrigin" - }, - { - "type": "null" - } - ], - "description": "The origin of images to list.", - "title": "Image Origin" - }, - "description": "The origin of images to list." - }, - { - "name": "categories", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ImageCategory" - } - }, - { - "type": "null" - } - ], - "description": "The categories of image to include.", - "title": "Categories" - }, - "description": "The categories of image to include." - }, - { - "name": "is_intermediate", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "description": "Whether to list intermediate images.", - "title": "Is Intermediate" - }, - "description": "Whether to list intermediate images." - }, - { - "name": "board_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "The board id to filter by. Use 'none' to find images without a board.", - "title": "Board Id" - }, - "description": "The board id to filter by. Use 'none' to find images without a board." - }, - { - "name": "offset", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "description": "The page offset", - "default": 0, - "title": "Offset" - }, - "description": "The page offset" - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "description": "The number of images per page", - "default": 10, - "title": "Limit" - }, - "description": "The number of images per page" - }, - { - "name": "order_dir", - "in": "query", - "required": false, - "schema": { - "$ref": "#/components/schemas/SQLiteDirection", - "description": "The order of sort", - "default": "DESC" - }, - "description": "The order of sort" - }, - { - "name": "starred_first", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "description": "Whether to sort by starred images first", - "default": true, - "title": "Starred First" - }, - "description": "Whether to sort by starred images first" - }, - { - "name": "search_term", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "The term to search for", - "title": "Search Term" - }, - "description": "The term to search for" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OffsetPaginatedResults_ImageDTO_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/images/i/{image_name}": { - "delete": { - "tags": ["images"], - "summary": "Delete Image", - "description": "Deletes an image", - "operationId": "delete_image", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "image_name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The name of the image to delete", - "title": "Image Name" - }, - "description": "The name of the image to delete" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteImagesResult" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "patch": { - "tags": ["images"], - "summary": "Update Image", - "description": "Updates an image", - "operationId": "update_image", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "image_name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The name of the image to update", - "title": "Image Name" - }, - "description": "The name of the image to update" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ImageRecordChanges", - "description": "The changes to apply to the image" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ImageDTO" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "get": { - "tags": ["images"], - "summary": "Get Image Dto", - "description": "Gets an image's DTO", - "operationId": "get_image_dto", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "image_name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The name of image to get", - "title": "Image Name" - }, - "description": "The name of image to get" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ImageDTO" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/images/intermediates": { - "get": { - "tags": ["images"], - "summary": "Get Intermediates Count", - "description": "Gets the count of intermediate images. Non-admin users only see their own intermediates.", - "operationId": "get_intermediates_count", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "integer", - "title": "Response Get Intermediates Count" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - }, - "delete": { - "tags": ["images"], - "summary": "Clear Intermediates", - "description": "Clears all intermediates. Requires admin.", - "operationId": "clear_intermediates", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "integer", - "title": "Response Clear Intermediates" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/images/i/{image_name}/metadata": { - "get": { - "tags": ["images"], - "summary": "Get Image Metadata", - "description": "Gets an image's metadata", - "operationId": "get_image_metadata", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "image_name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The name of image to get", - "title": "Image Name" - }, - "description": "The name of image to get" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/MetadataField" - }, - { - "type": "null" - } - ], - "title": "Response Get Image Metadata" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/images/i/{image_name}/workflow": { - "get": { - "tags": ["images"], - "summary": "Get Image Workflow", - "operationId": "get_image_workflow", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "image_name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The name of image whose workflow to get", - "title": "Image Name" - }, - "description": "The name of image whose workflow to get" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WorkflowAndGraphResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/images/i/{image_name}/full": { - "head": { - "tags": ["images"], - "summary": "Get Image Full", - "description": "Gets a full-resolution image file.\n\nBrowser media requests authenticate with the path-scoped HttpOnly cookie set at login.\nReturns 409 while image storage maintenance is active.", - "operationId": "get_image_full_head", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "image_name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The name of full-resolution image file to get", - "title": "Image Name" - }, - "description": "The name of full-resolution image file to get" - }, - { - "name": "invokeai_media_token", - "in": "cookie", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Invokeai Media Token" - } - } - ], - "responses": { - "200": { - "description": "Return the full-resolution image", - "content": { - "image/png": {} - } - }, - "404": { - "description": "Image not found" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "get": { - "tags": ["images"], - "summary": "Get Image Full", - "description": "Gets a full-resolution image file.\n\nBrowser media requests authenticate with the path-scoped HttpOnly cookie set at login.\nReturns 409 while image storage maintenance is active.", - "operationId": "get_image_full", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "image_name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The name of full-resolution image file to get", - "title": "Image Name" - }, - "description": "The name of full-resolution image file to get" - }, - { - "name": "invokeai_media_token", - "in": "cookie", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Invokeai Media Token" - } - } - ], - "responses": { - "200": { - "description": "Return the full-resolution image", - "content": { - "image/png": {} - } - }, - "404": { - "description": "Image not found" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/images/i/{image_name}/thumbnail": { - "get": { - "tags": ["images"], - "summary": "Get Image Thumbnail", - "description": "Gets a thumbnail image file.\n\nBrowser media requests authenticate with the path-scoped HttpOnly cookie set at login.\nReturns 409 while image storage maintenance is active.", - "operationId": "get_image_thumbnail", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "image_name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The name of thumbnail image file to get", - "title": "Image Name" - }, - "description": "The name of thumbnail image file to get" - }, - { - "name": "invokeai_media_token", - "in": "cookie", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Invokeai Media Token" - } - } - ], - "responses": { - "200": { - "description": "Return the image thumbnail", - "content": { - "image/webp": {} - } - }, - "404": { - "description": "Image not found" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/images/i/{image_name}/urls": { - "get": { - "tags": ["images"], - "summary": "Get Image Urls", - "description": "Gets an image and thumbnail URL", - "operationId": "get_image_urls", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "image_name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The name of the image whose URL to get", - "title": "Image Name" - }, - "description": "The name of the image whose URL to get" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ImageUrlsDTO" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/images/delete": { - "post": { - "tags": ["images"], - "summary": "Delete Images From List", - "operationId": "delete_images_from_list", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Body_delete_images_from_list" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteImagesResult" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/images/uncategorized": { - "delete": { - "tags": ["images"], - "summary": "Delete Uncategorized Images", - "description": "Deletes all uncategorized images owned by the current user (or all if admin)", - "operationId": "delete_uncategorized_images", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteImagesResult" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/images/star": { - "post": { - "tags": ["images"], - "summary": "Star Images In List", - "operationId": "star_images_in_list", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Body_star_images_in_list" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StarredImagesResult" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/images/unstar": { - "post": { - "tags": ["images"], - "summary": "Unstar Images In List", - "operationId": "unstar_images_in_list", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Body_unstar_images_in_list" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnstarredImagesResult" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/images/download": { - "post": { - "tags": ["images"], - "summary": "Download Images From List", - "operationId": "download_images_from_list", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Body_download_images_from_list" - } - } - } - }, - "responses": { - "202": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ImagesDownloaded" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/images/download/{bulk_download_item_name}": { - "get": { - "tags": ["images"], - "summary": "Get Bulk Download Item", - "description": "Gets a bulk download zip file.\n\nRequires authentication. The caller must be the user who initiated the\ndownload (tracked by the bulk download service) or an admin.", - "operationId": "get_bulk_download_item", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "bulk_download_item_name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The bulk_download_item_name of the bulk download item to get", - "title": "Bulk Download Item Name" - }, - "description": "The bulk_download_item_name of the bulk download item to get" - } - ], - "responses": { - "200": { - "description": "Return the complete bulk download item", - "content": { - "application/zip": {} - } - }, - "404": { - "description": "Image not found" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/images/names": { - "get": { - "tags": ["images"], - "summary": "Get Image Names", - "description": "Gets ordered list of image names with metadata for optimistic updates", - "operationId": "get_image_names", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "image_origin", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResourceOrigin" - }, - { - "type": "null" - } - ], - "description": "The origin of images to list.", - "title": "Image Origin" - }, - "description": "The origin of images to list." - }, - { - "name": "categories", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ImageCategory" - } - }, - { - "type": "null" - } - ], - "description": "The categories of image to include.", - "title": "Categories" - }, - "description": "The categories of image to include." - }, - { - "name": "is_intermediate", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "description": "Whether to list intermediate images.", - "title": "Is Intermediate" - }, - "description": "Whether to list intermediate images." - }, - { - "name": "board_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "The board id to filter by. Use 'none' to find images without a board.", - "title": "Board Id" - }, - "description": "The board id to filter by. Use 'none' to find images without a board." - }, - { - "name": "order_dir", - "in": "query", - "required": false, - "schema": { - "$ref": "#/components/schemas/SQLiteDirection", - "description": "The order of sort", - "default": "DESC" - }, - "description": "The order of sort" - }, - { - "name": "starred_first", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "description": "Whether to sort by starred images first", - "default": true, - "title": "Starred First" - }, - "description": "Whether to sort by starred images first" - }, - { - "name": "search_term", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "The term to search for", - "title": "Search Term" - }, - "description": "The term to search for" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ImageNamesResult" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/images/images_by_names": { - "post": { - "tags": ["images"], - "summary": "Get Images By Names", - "description": "Gets image DTOs for the specified image names. Maintains order of input names.", - "operationId": "get_images_by_names", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Body_get_images_by_names" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/ImageDTO" - }, - "type": "array", - "title": "Response 200 Get Images By Names" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/videos/upload": { - "post": { - "tags": ["videos"], - "summary": "Upload Video", - "description": "Uploads a video for the current user.", - "operationId": "upload_video", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "video_category", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/ImageCategory", - "description": "The category of the video" - }, - "description": "The category of the video" - }, - { - "name": "is_intermediate", - "in": "query", - "required": true, - "schema": { - "type": "boolean", - "description": "Whether this is an intermediate video", - "title": "Is Intermediate" - }, - "description": "Whether this is an intermediate video" - }, - { - "name": "board_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "The board to add this video to, if any", - "title": "Board Id" - }, - "description": "The board to add this video to, if any" - }, - { - "name": "session_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "The session ID associated with this upload, if any", - "title": "Session Id" - }, - "description": "The session ID associated with this upload, if any" - } - ], - "requestBody": { - "required": true, - "content": { - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/Body_upload_video" - } - } - } - }, - "responses": { - "201": { - "description": "The video was uploaded successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VideoDTO" - } - } - } - }, - "415": { - "description": "Video upload failed" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/videos/i/{video_name}": { - "delete": { - "tags": ["videos"], - "summary": "Delete Video", - "operationId": "delete_video", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "video_name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The name of the video to delete", - "title": "Video Name" - }, - "description": "The name of the video to delete" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteVideosResult" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "patch": { - "tags": ["videos"], - "summary": "Update Video", - "operationId": "update_video", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "video_name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The name of the video to update", - "title": "Video Name" - }, - "description": "The name of the video to update" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VideoRecordChanges", - "description": "The changes to apply to the video" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VideoDTO" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "get": { - "tags": ["videos"], - "summary": "Get Video Dto", - "operationId": "get_video_dto", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "video_name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The name of video to get", - "title": "Video Name" - }, - "description": "The name of video to get" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VideoDTO" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/videos/delete": { - "post": { - "tags": ["videos"], - "summary": "Delete Videos From List", - "operationId": "delete_videos_from_list", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VideoNamesBatch" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteVideosResult" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/videos/uncategorized": { - "delete": { - "tags": ["videos"], - "summary": "Delete Uncategorized Videos", - "description": "Deletes all uncategorized videos owned by the current user (or all if admin).\n\nMirrors ``delete_uncategorized_images`` so the \"Delete All Uncategorized\nImages/Videos\" board action covers both media kinds.", - "operationId": "delete_uncategorized_videos", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteVideosResult" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/api/v1/videos/i/{video_name}/metadata": { - "get": { - "tags": ["videos"], - "summary": "Get Video Metadata", - "operationId": "get_video_metadata", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "video_name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The name of video to get", - "title": "Video Name" - }, - "description": "The name of video to get" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/MetadataField" - }, - { - "type": "null" - } - ], - "title": "Response Get Video Metadata" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/videos/i/{video_name}/workflow": { - "get": { - "tags": ["videos"], - "summary": "Get Video Workflow", - "description": "Gets the workflow and graph saved with a generated video (mirrors the image route).", - "operationId": "get_video_workflow", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "video_name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The name of video whose workflow to get", - "title": "Video Name" - }, - "description": "The name of video whose workflow to get" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WorkflowAndGraphResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/videos/i/{video_name}/full": { - "head": { - "tags": ["videos"], - "summary": "Get Video Full", - "description": "Serves the video file with HTTP Range support so HTML5