{"openapi":"3.1.0","info":{"title":"Scene FastSaaS API","description":"\n    Scene FastSaaS API provides endpoints for managing 3D assets, subscriptions, and user authentication.\n\n    ## Features\n\n    * **Authentication**: Register, login, and OAuth (Google)\n    * **Assets**: Create, read, update, delete 3D assets with media uploads\n    * **Subscriptions**: Manage Stripe subscriptions and billing\n    * **Tenants**: Multi-tenant workspace management\n\n    ## Authentication\n\n    Most endpoints require authentication using JWT Bearer tokens.\n\n    **How to authenticate:**\n    1. Call `/auth/login` or `/auth/register` to get an access token\n    2. Click the \"Authorize\" button (🔓) at the top of this page\n    3. Enter your token in the format: `Bearer <your_token>`\n    4. Click \"Authorize\" and then \"Close\"\n    5. Now you can test authenticated endpoints\n\n    Tenant-scoped endpoints require the `X-TENANT-UUID` header.\n    ","contact":{"name":"Scene FastSaaS","url":"https://scene.link/"},"license":{"name":"MIT"},"version":"1.0.0"},"paths":{"/auth/register":{"post":{"tags":["Authentication"],"summary":"Register a new user","description":"Register a new user account with email and password.\n\n    **Auto-Login:**\n    Upon successful registration, the user is automatically logged in and receives an access token.\n\n    **Tenant Creation:**\n    A personal workspace tenant is automatically created for the user.\n\n    After registration, a verification email will be sent to the provided email address.","operationId":"register_user_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"201":{"description":"User successfully registered and logged in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"},"example":{"email":"user@example.com","access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","token_type":"bearer"}}}},"400":{"description":"Email already registered"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"tags":["Authentication"],"summary":"Login with email and password","description":"Authenticate a user with email and password.\n\n    Returns an access token (JWT) and sets a refresh token cookie.\n    The access token should be included in the `Authorization` header as `Bearer <token>`.","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successfully authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"},"example":{"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","token_type":"bearer","user":{"uuid":"123e4567-e89b-12d3-a456-426614174000","email":"user@example.com","is_verified":true}}}}},"401":{"description":"Invalid credentials"},"403":{"description":"Email not verified"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/logout":{"post":{"tags":["Authentication"],"summary":"Logout","description":"Clear the refresh token cookie to log out the user.","operationId":"logout_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoutResponse"}}}}}}},"/auth/verify-email":{"get":{"tags":["Authentication"],"summary":"Verify Email","operationId":"verify_email_auth_verify_email_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"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"}}}}}}},"/auth/reset-password/request":{"post":{"tags":["Authentication"],"summary":"Reset Password Request","operationId":"reset_password_request_auth_reset_password_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/reset-password/confirm":{"post":{"tags":["Authentication"],"summary":"Reset Password Confirm","operationId":"reset_password_confirm_auth_reset_password_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordConfirmRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/resend-verification":{"post":{"tags":["Authentication"],"summary":"Resend Verification Email","description":"Resend verification email for an unverified user.","operationId":"resend_verification_email_auth_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/refresh":{"post":{"tags":["Authentication"],"summary":"Refresh Token","description":"Exchange a refresh token for new access and refresh tokens.","operationId":"refresh_token_auth_refresh_post","parameters":[{"name":"refresh_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/update-password":{"post":{"tags":["Authentication"],"summary":"Update Password","description":"Update or set password for the authenticated user.\nIf user has no password set (e.g., invited user), old_password is not required.","operationId":"update_password_auth_update_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePasswordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"Bearer":[]}]}},"/auth/me":{"get":{"tags":["Authentication"],"summary":"Get User Info","operationId":"get_user_info_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInfoResponse"}}}}},"security":[{"Bearer":[]}]},"patch":{"tags":["Authentication"],"summary":"Update your own profile","description":"Update the authenticated user's display name.\n\n    Email is not editable here: it is the login identifier, so changing it\n    requires a verification flow rather than a plain write.","operationId":"update_profile_auth_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"Bearer":[]}]}},"/auth/google-login":{"post":{"tags":["Authentication"],"summary":"Google Login","operationId":"google_login_auth_google_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleLoginRequest"}}},"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"}}}}}}},"/auth/github/login":{"get":{"tags":["Authentication"],"summary":"Github Login","operationId":"github_login_auth_github_login_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/github/callback":{"post":{"tags":["Authentication"],"summary":"Github Callback","operationId":"github_callback_auth_github_callback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubCallbackRequest"}}},"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"}}}}}}},"/tenants":{"get":{"tags":["tenants"],"summary":"Get User Tenants","operationId":"get_user_tenants_tenants_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TenantWithRoleDTO"},"type":"array","title":"Response Get User Tenants Tenants Get"}}}}},"security":[{"Bearer":[]}]},"post":{"tags":["tenants"],"summary":"Create Tenant","operationId":"create_tenant_tenants_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"Bearer":[]}]}},"/tenant":{"get":{"tags":["tenants"],"summary":"Get Tenant By Id","operationId":"get_tenant_by_id_tenant_get","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantWithRoleDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["tenants"],"summary":"Update Tenant","operationId":"update_tenant_tenant_put","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantUpdateDTO"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantWithRoleDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tenants"],"summary":"Delete Tenant","operationId":"delete_tenant_tenant_delete","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/members":{"get":{"tags":["tenants"],"summary":"Get Tenant Members","operationId":"get_tenant_members_members_get","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantMemberDTO"},"title":"Response Get Tenant Members Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tenants"],"summary":"Remove Tenant Member","operationId":"remove_tenant_member_members_delete","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveMemberRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/members/role":{"patch":{"tags":["tenants"],"summary":"Change Member Role","operationId":"change_member_role_members_role_patch","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeMemberRoleRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/members/leave":{"post":{"tags":["tenants"],"summary":"Leave Tenant","description":"Allow the authenticated user to remove their own membership from a tenant.\n\nRefuses to leave when the caller is the last remaining admin (would lock\nthe tenant out of admin operations).","operationId":"leave_tenant_members_leave_post","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/members/revoke-access":{"post":{"tags":["tenants"],"summary":"Revoke Member Access","operationId":"revoke_member_access_members_revoke_access_post","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberAccessRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/members/restore-access":{"post":{"tags":["tenants"],"summary":"Restore Member Access","operationId":"restore_member_access_members_restore_access_post","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberAccessRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invite":{"post":{"tags":["tenants"],"summary":"Invite User To Tenant","operationId":"invite_user_to_tenant_invite_post","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteUserRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invitations/{token}/accept":{"get":{"tags":["tenants"],"summary":"Accept Tenant Invitation","operationId":"accept_tenant_invitation_invitations__token__accept_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Accept Tenant Invitation Invitations  Token  Accept Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invitations/{token}/set-password":{"post":{"tags":["tenants"],"summary":"Set Invitation Password","operationId":"set_invitation_password_invitations__token__set_password_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPasswordRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Set Invitation Password Invitations  Token  Set Password Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invitations/{invitation_uuid}/resend":{"post":{"tags":["tenants"],"summary":"Resend Tenant Invitation","operationId":"resend_tenant_invitation_invitations__invitation_uuid__resend_post","security":[{"Bearer":[]}],"parameters":[{"name":"invitation_uuid","in":"path","required":true,"schema":{"type":"string","title":"Invitation Uuid"}},{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invitations/{invitation_uuid}":{"delete":{"tags":["tenants"],"summary":"Delete Tenant Invitation","operationId":"delete_tenant_invitation_invitations__invitation_uuid__delete","security":[{"Bearer":[]}],"parameters":[{"name":"invitation_uuid","in":"path","required":true,"schema":{"type":"string","title":"Invitation Uuid"}},{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/logo/upload-url":{"post":{"tags":["tenants"],"summary":"Get Tenant Logo Upload Url","description":"Generate a presigned URL for uploading tenant logo.","operationId":"get_tenant_logo_upload_url_logo_upload_url_post","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__tenants__logo__upload_logo__UploadUrlRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__tenants__logo__upload_logo__UploadUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/logo":{"post":{"tags":["tenants"],"summary":"Set Tenant Logo","description":"Create Media record for uploaded logo and link it to tenant.","operationId":"set_tenant_logo_logo_post","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetLogoRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetLogoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tenants"],"summary":"Delete Tenant Logo","description":"Remove the tenant logo.","operationId":"delete_tenant_logo_logo_delete","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteLogoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/modules/{module_slug}/render-settings":{"get":{"tags":["tenants"],"summary":"Get Render Settings","description":"Return the tenant's effective *module_slug* render settings (stored\nsparse overrides merged over the code defaults) plus which keys are\ntenant-overridden.\n\nRaises ``404`` when *module_slug* is unknown to the registry, declares no\nrender-settings model, or the declared model failed to import at\ndiscovery time. Raises ``403`` when the tenant does not have\n*module_slug* enabled.","operationId":"get_render_settings_modules__module_slug__render_settings_get","security":[{"Bearer":[]}],"parameters":[{"name":"module_slug","in":"path","required":true,"schema":{"type":"string","title":"Module Slug"}},{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["tenants"],"summary":"Update Render Settings","description":"Validate and persist *overrides* as the tenant's *module_slug*\n``config.render_settings`` sparse blob, replacing whatever was stored\nbefore. Returns the newly-effective settings (mirrors the GET shape).\n\nRaises ``404`` when *module_slug* is unknown to the registry, declares no\nrender-settings model, or the declared model failed to import at\ndiscovery time — checked first. Raises ``403`` when the tenant does not\nhave *module_slug* enabled, checked before body validation.","operationId":"update_render_settings_modules__module_slug__render_settings_put","security":[{"Bearer":[]}],"parameters":[{"name":"module_slug","in":"path","required":true,"schema":{"type":"string","title":"Module Slug"}},{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Overrides"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assets/build-from-external-id":{"post":{"tags":["Assets"],"summary":"Find-or-create a whole_exhibition asset and enqueue a build job","description":"Find an existing asset by ``external_id`` (case-insensitive) or create a\n    new asset of the requested ``asset_type_slug``, then enqueue a\n    ``build_from_external_id`` job against it.\n\n    **Required Headers:**\n    - `Authorization: Bearer <token>`\n    - `X-TENANT-UUID: <tenant_uuid>`\n\n    **Body:**\n    - `asset_type_slug` — slug of the asset type to create if absent\n      (e.g. ``\"whole_exhibition\"``).\n    - `external_id` — composite external identifier used to deduplicate the\n      asset row across re-runs (e.g. ``\"exhibitionUUID|sceneId\"``).\n    - `name` — optional human-readable name; defaults to ``external_id``.\n\n    Returns ``{asset_uuid, job_uuid, flow_run_id}``.","operationId":"build_from_external_id_assets_build_from_external_id_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildFromExternalIdRequest"}}}},"responses":{"202":{"description":"Job accepted and enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildFromExternalIdResponse"}}}},"404":{"description":"asset_type_slug not found"},"409":{"description":"A build job is already in progress for this asset"},"422":{"description":"external_id is blank"},"503":{"description":"Worker queue unavailable"}}}},"/assets/compress-from-external-id":{"post":{"tags":["Assets"],"summary":"Find-or-create an asset and enqueue an external-GLB-compression job","description":"Find an existing asset by ``external_id`` (case-insensitive) or create a\n    new asset of the requested ``asset_type_slug`` (typically\n    ``exhibition_element``), then enqueue an ``external_glb_compression`` job\n    against it — the generic wrapper that pulls a GLB from an external system\n    (e.g. Vortic), compresses it via the existing ``glb_compression`` flow,\n    and pushes the result back.\n\n    **Required Headers:**\n    - `Authorization: Bearer <token>` (or `X-API-Key`)\n    - `X-TENANT-UUID: <tenant_uuid>`\n\n    **Body:**\n    - `asset_type_slug` — slug of the asset type to create if absent\n      (e.g. ``\"exhibition_element\"``).\n    - `external_id` — opaque external identifier used to deduplicate the\n      asset row across re-runs (e.g. ``\"vortic:artwork:123\"``).\n    - `name` — optional human-readable name; defaults to ``external_id``.\n    - `module` — optional asset-type-specific knobs, validated against the\n      module manifest's declared schema.\n    - `gltfpack` — optional per-job gltfpack overrides (same knob vocabulary\n      as the standalone GLB compression job). `source_media_uuid` is rejected.\n\n    Returns ``{asset_uuid, job_uuid, flow_run_id}``.","operationId":"compress_from_external_id_assets_compress_from_external_id_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompressFromExternalIdRequest"}}}},"responses":{"202":{"description":"Job accepted and enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompressFromExternalIdResponse"}}}},"404":{"description":"asset_type_slug not found"},"409":{"description":"A compression job is already in progress for this asset"},"422":{"description":"external_id is blank, or module/gltfpack is invalid"},"503":{"description":"Worker queue unavailable"}}}},"/assets":{"post":{"tags":["Assets"],"summary":"Create a new asset","description":"Create a new 3D asset in your tenant.\n\n    **Required Headers:**\n    - `Authorization: Bearer <token>`\n    - `X-TENANT-UUID: <tenant_uuid>`\n\n    The asset will be linked to both the authenticated user and their tenant.\n    After creating an asset, you can upload media files using the upload endpoints.","operationId":"create_asset_assets_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetCreateRequest"}}}},"responses":{"201":{"description":"Asset successfully created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetResponse"},"example":{"uuid":"123e4567-e89b-12d3-a456-426614174000","name":"My 3D Model","meta":{"category":"furniture"},"user_uuid":"user-uuid","tenant_uuid":"org-uuid","created_at":"2025-12-30T15:00:00Z","updated_at":"2025-12-30T15:00:00Z","media":[]}}}},"401":{"description":"Not authenticated"},"404":{"description":"Tenant not found"},"409":{"description":"Duplicate asset name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateAssetNameError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Assets"],"summary":"List all assets","description":"Get a paginated list of assets belonging to your tenant.\n\n    **Required Headers:**\n    - `Authorization: Bearer <token>`\n    - `X-TENANT-UUID: <tenant_uuid>`\n\n    **Query Parameters:**\n    - `skip`: Number of items to skip (default: 0)\n    - `limit`: Maximum number of items to return (default: 25, max: 100)\n    - `asset_type_uuid`: Optional Asset Type UUID to narrow results to one\n      module-declared type (e.g. InResi \"floorplan\" or \"furniture\").\n    - `q`: Optional free-text search — matches assets where `name` OR any tag\n      ILIKE `%q%`, OR where `meta['external_id']` equals `q` exactly\n      (case-insensitive). A fragment of an external id does NOT match via `q`;\n      paste the full value to find by external id.\n    - `tag`: Repeated param — filter to assets carrying ALL listed tags (AND-match).\n    - `external_id`: Exact (case-insensitive) match on `meta['external_id']`.\n      Whitespace is trimmed before comparison. AND-combined with `q`/`tag` when\n      both are supplied. API-only — no UI control for v1.\n\n    Assets are returned in descending order by creation date (newest first).\n    Each asset includes its associated media files.","operationId":"list_assets_assets_get","parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":25,"title":"Limit"}},{"name":"asset_type_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type Uuid"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-text ILIKE search on name and tags; also matches a full external_id by exact, case-insensitive equality","title":"Q"},"description":"Free-text ILIKE search on name and tags; also matches a full external_id by exact, case-insensitive equality"},{"name":"tag","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Filter to assets carrying ALL listed tags","default":[],"title":"Tag"},"description":"Filter to assets carrying ALL listed tags"},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact (case-insensitive) match on the asset's external id (meta['external_id']). AND-combined with q/tags when both are supplied.","title":"External Id"},"description":"Exact (case-insensitive) match on the asset's external id (meta['external_id']). AND-combined with q/tags when both are supplied."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Paginated list of assets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__assets__dtos__PaginatedAssetsResponse"}}}},"401":{"description":"Not authenticated"},"404":{"description":"Tenant not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assets/check-name":{"get":{"tags":["Assets"],"summary":"Pre-submit duplicate-name check","description":"Check whether an asset with the given name already exists in your tenant\n    (case-insensitive).\n\n    Returns ``exists=false, conflicts=[]`` when the name is unique.\n    Returns ``exists=true`` with up to 5 conflicting assets (including presigned\n    thumbnail URLs) when a case-insensitive match is found.\n\n    **Required Headers:**\n    - `Authorization: Bearer <token>`\n    - `X-TENANT-UUID: <tenant_uuid>`\n\n    **Query Parameters:**\n    - `name`: The asset name to check (required)\n\n    This is a *hint* endpoint. The authoritative collision check happens\n    server-side on `POST /assets`. Always handle 409 on submit.","operationId":"check_asset_name_assets_check_name_get","parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Asset name to check","title":"Name"},"description":"Asset name to check"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Name check result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckNameResponse"}}}},"401":{"description":"Not authenticated"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assets/render-latest":{"post":{"tags":["Assets"],"summary":"Find-or-create an asset and enqueue a build + render-latest waiter job","description":"Find an existing asset by ``external_id`` (case-insensitive) or create a\n    new asset of the requested ``asset_type_slug``, then enqueue a 0-token\n    ``build_from_external_id`` job and a ``render-latest-wait`` waiter job\n    that awaits the build and dispatches the GPU render to ``render-gpu``\n    (the default ``render-asset`` deployment, queue ``class-20``).\n\n    **Required Headers:**\n    - `Authorization: Bearer <token>`\n    - `X-TENANT-UUID: <tenant_uuid>`\n\n    **Body:**\n    - `external_id` — composite external identifier used to deduplicate the\n      asset row (e.g. ``\"exhibitionUUID|sceneId\"``).\n    - `asset_type_slug` — slug of the asset type to create if absent\n      (e.g. ``\"whole_exhibition\"``).\n    - `name` — optional human-readable name; defaults to ``external_id``.\n    - Render params: ``camera_position``, ``camera_rotation``,\n      ``resolution_x``, ``resolution_y``, ``samples``, ``module``.\n\n    Returns ``{asset_uuid, render_job_uuid, render_flow_run_id,\n    build_job_uuid, build_flow_run_id}``.  The primary client tracking\n    handle is ``render_flow_run_id`` — the ``waiter-pool`` waiter run id.","operationId":"render_latest_assets_render_latest_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderLatestRequest"}}}},"responses":{"202":{"description":"Jobs accepted and enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderLatestResponse"}}}},"404":{"description":"asset_type_slug not found"},"409":{"description":"A build job is already in progress for this asset"},"422":{"description":"external_id is blank or render params are invalid"},"503":{"description":"Worker queue unavailable"}}}},"/assets/render-activity":{"get":{"tags":["Assets"],"summary":"Is a named render pending or running for this external id?","description":"Look up an asset by ``external_id`` (case-insensitive, tenant-scoped)\n    and report whether any of its renders are currently pending or running.\n\n    **Required Headers:**\n    - `Authorization: Bearer <token>` or `X-API-Key: <key>`\n    - `X-TENANT-UUID: <tenant_uuid>`\n\n    **Query Parameters:**\n    - `external_id` — required; exact (case-insensitive) match on\n      ``meta['external_id']``.\n    - `render_type` — optional; single-valued, ANDed onto the tenant/asset\n      tag set (e.g. ``\"hdr_lightmap\"``). Omitted means any render activity.\n    - `job_type` — optional, repeatable.\n\n    Returns ``{asset_uuid, external_id, active, jobs}``, where each job entry\n    carries ``flow_run_id`` — the handle a caller then passes to\n    ``POST /jobs/{flow_run_id}/cancel``.","operationId":"render_activity_assets_render_activity_get","parameters":[{"name":"external_id","in":"query","required":true,"schema":{"type":"string","description":"Exact (case-insensitive) match on the asset's external id (meta['external_id']).","title":"External Id"},"description":"Exact (case-insensitive) match on the asset's external id (meta['external_id'])."},{"name":"render_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Single-valued render_type filter, ANDed onto the mandatory tenant/env/asset tag set. Omitted means 'any render activity'.","title":"Render Type"},"description":"Single-valued render_type filter, ANDed onto the mandatory tenant/env/asset tag set. Omitted means 'any render activity'."},{"name":"job_type","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Repeatable job_type filter","default":[],"title":"Job Type"},"description":"Repeatable job_type filter"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Render-activity result (possibly empty)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderActivityResponse"}}}},"401":{"description":"Not authenticated"},"404":{"description":"No asset found for this external_id in your tenant"},"422":{"description":"external_id is blank"},"503":{"description":"Worker queue unavailable"}}}},"/assets/{asset_id}":{"get":{"tags":["Assets"],"summary":"Get a specific asset","description":"Retrieve details of a specific asset by its UUID.\n\n    **Required Headers:**\n    - `Authorization: Bearer <token>`\n    - `X-TENANT-UUID: <tenant_uuid>`\n\n    The asset must belong to your tenant.","operationId":"get_asset_assets__asset_id__get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Asset details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetResponse"}}}},"401":{"description":"Not authenticated"},"404":{"description":"Asset not found or doesn't belong to your tenant"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Assets"],"summary":"Update an asset","description":"Update an existing asset's properties.\n\n    **Required Headers:**\n    - `Authorization: Bearer <token>`\n    - `X-TENANT-UUID: <tenant_uuid>`\n\n    All fields are optional - only provide the fields you want to update.\n    The asset must belong to your tenant.","operationId":"update_asset_assets__asset_id__patch","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetUpdateRequest"}}}},"responses":{"200":{"description":"Asset successfully updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetResponse"}}}},"401":{"description":"Not authenticated"},"404":{"description":"Asset not found or doesn't belong to your tenant"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Assets"],"summary":"Delete an asset","description":"Delete an asset and all its associated media files.\n\n    **Required Headers:**\n    - `Authorization: Bearer <token>`\n    - `X-TENANT-UUID: <tenant_uuid>`\n\n    **Warning:** This action is permanent and will:\n    - Delete the asset record from the database\n    - Delete all associated media records\n    - Delete all media files from S3 storage\n\n    The asset must belong to your tenant.","operationId":"delete_asset_assets__asset_id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Asset successfully deleted","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Asset Assets  Asset Id  Delete"},"example":{"message":"Asset deleted successfully"}}}},"401":{"description":"Not authenticated"},"404":{"description":"Asset not found or doesn't belong to your tenant"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assets/{asset_id}/generate-glb":{"post":{"tags":["Assets"],"summary":"Enqueue a format-conversion job (GLB export + conditional thumbnail)","description":"Resolve the asset's convertible source media (``file_blend`` wins\n    outright; otherwise the first of ``file_raw``/``file_fbx``/``file_obj``/\n    ``file_dae``/``file_glb`` supplies its own format) and enqueue a\n    ``format_conversion`` job. gltfpack compression always runs. A thumbnail\n    is only produced when the asset has none yet (single-shot PNG); an\n    asset that already has a thumbnail gets no bundled thumbnail from this\n    call.\n\n    **Required Headers:**\n    - `Authorization: Bearer <token>`\n    - `X-TENANT-UUID: <tenant_uuid>`\n\n    Returns ``{job_uuid, flow_run_id}``.","operationId":"generate_glb_assets__asset_id__generate_glb_post","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"202":{"description":"Job accepted and enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateGlbResponse"}}}},"401":{"description":"Not authenticated"},"404":{"description":"Asset not found or doesn't belong to your tenant"},"409":{"description":"A format-conversion job is already in progress for this asset"},"422":{"description":"Asset has no convertible source media"},"503":{"description":"Worker queue unavailable"}}}},"/assets/{asset_id}/generate-thumbnail":{"post":{"tags":["Assets"],"summary":"Enqueue a single-shot 2D thumbnail job","description":"Enqueue a ``thumbnail_generation`` job with ``shot='single'`` — renders\n    exactly one still frame (no turntable loop, no WebM) and uploads only\n    ``thumbnail_png``. Requires a ``file_blend`` media row.\n\n    **Required Headers:**\n    - `Authorization: Bearer <token>`\n    - `X-TENANT-UUID: <tenant_uuid>`\n\n    Returns ``{job_uuid, flow_run_id}``.","operationId":"generate_thumbnail_assets__asset_id__generate_thumbnail_post","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"202":{"description":"Job accepted and enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateThumbnailResponse"}}}},"401":{"description":"Not authenticated"},"404":{"description":"Asset not found or doesn't belong to your tenant"},"409":{"description":"An active thumbnail-generation job already exists for this asset"},"422":{"description":"Asset has no file_blend media"},"503":{"description":"Worker queue unavailable"}}}},"/assets/{asset_id}/check-new-version":{"post":{"tags":["Assets"],"summary":"Check the asset's CMS source for a newer blend","description":"Resolves the asset's module (Vortic or InResi) and checks its CMS source\n    for a newer blend than the one last pulled. On a genuine change, enqueues\n    a build job (pull + publish a new version) and returns its handle for the\n    UI to poll. Reports ``status=\"up_to_date\"`` when checked and unchanged,\n    or ``status=\"not_applicable\"`` for uploaded (Mode B) or non-CMS assets —\n    nothing to check.\n\n    **Required Headers:**\n    - `Authorization: Bearer <token>`\n    - `X-TENANT-UUID: <tenant_uuid>`\n\n    Returns ``{status, new_version_uuid?, job_uuid?, detail}``.","operationId":"check_new_version_assets__asset_id__check_new_version_post","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Check completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckNewVersionResponse"}}}},"401":{"description":"Not authenticated"},"404":{"description":"Asset not found or doesn't belong to your tenant"},"409":{"description":"A build job is already in progress for this asset"},"503":{"description":"The asset's CMS or the worker queue is unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assets/{asset_id}/media/upload-url":{"post":{"tags":["Assets"],"summary":"Get presigned upload URL","description":"Generate a presigned S3 URL for uploading a media file.\n\n    **Required Headers:**\n    - `Authorization: Bearer <token>`\n    - `X-TENANT-UUID: <tenant_uuid>`\n\n    **Upload Flow:**\n    1. Call this endpoint to get a presigned URL\n    2. Upload the file directly to S3 using the returned URL (PUT request)\n    3. Call the `/assets/{asset_id}/media` endpoint to confirm the upload\n\n    The presigned URL expires after 1 hour (3600 seconds).\n    If `content_type` is provided, you **must** include it in the PUT request to S3.","operationId":"get_upload_url_assets__asset_id__media_upload_url_post","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__assets__dtos__UploadUrlRequest"}}}},"responses":{"200":{"description":"Presigned URL generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__assets__dtos__UploadUrlResponse"},"example":{"upload_url":"https://s3.amazonaws.com/bucket/path?signature=...","object_key":"assets/org-uuid/asset-uuid/unique-filename.glb","expires_in":3600,"content_type":"model/gltf-binary"}}}},"401":{"description":"Not authenticated"},"404":{"description":"Asset not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assets/{asset_id}/media":{"post":{"tags":["Assets"],"summary":"Confirm media upload","description":"Create a media record after successfully uploading a file to S3.\n\n    **Required Headers:**\n    - `Authorization: Bearer <token>`\n    - `X-TENANT-UUID: <tenant_uuid>`\n\n    Call this endpoint after uploading the file to S3 using the presigned URL.\n    The `path` field should be the `object_key` returned from the upload URL endpoint.\n\n    **Media Types:**\n    - `file`: Main 3D file (e.g., .glb)\n    - `file_encrypted`: Encrypted version of main file\n    - `compressed_glb`: Compressed GLB (gltfpack output)\n    - `file_usdz`: USDZ format for iOS AR\n    - `thumbnail`: Thumbnail image\n\n    **Constraints:**\n    - Only one media per role per asset is allowed\n    - If a media with the same role exists, you must delete it first","operationId":"create_media_assets__asset_id__media_post","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaCreateRequest"}}}},"responses":{"201":{"description":"Media record created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaResponse"},"example":{"uuid":"media-uuid","role":"file","format":"glb","path":"assets/org-uuid/asset-uuid/file.glb","mime":"model/gltf-binary","filesize":1234567,"created_at":"2025-12-30T15:00:00Z","updated_at":"2025-12-30T15:00:00Z"}}}},"400":{"description":"Media with this role already exists for this asset"},"401":{"description":"Not authenticated"},"404":{"description":"Asset not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assets/{asset_id}/media/{media_id}":{"delete":{"tags":["Assets"],"summary":"Delete a media file","operationId":"delete_media_assets__asset_id__media__media_id__delete","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"media_id","in":"path","required":true,"schema":{"type":"string","title":"Media Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Assets"],"summary":"Update a media file's meta (View as 360 toggle)","description":"Merge ``meta`` into a media row. For this feature only the\n    ``projection`` key is accepted, with value ``equirectangular`` (marks\n    the media as a 360/panoramic image) or ``null`` (clears it).\n\n    **Required Headers:**\n    - `Authorization: Bearer <token>`\n    - `X-TENANT-UUID: <tenant_uuid>`\n\n    The asset must belong to your tenant; a private asset is writable only\n    by its owner.","operationId":"update_media_meta_assets__asset_id__media__media_id__patch","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"media_id","in":"path","required":true,"schema":{"type":"string","title":"Media Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaMetaUpdateRequest"}}}},"responses":{"200":{"description":"Media meta successfully updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaResponse"}}}},"401":{"description":"Not authenticated"},"404":{"description":"Asset or media not found, or doesn't belong to your tenant"},"422":{"description":"meta contains an unsupported key or projection value"}}}},"/assets/{asset_id}/render-set/{render_group_uuid}":{"delete":{"tags":["Assets"],"summary":"Delete an entire render set","description":"Delete every media row sharing one ``meta.render_group_uuid`` for this\n    asset — including the HIDDEN ``render_intermediate`` rows (raw EXRs,\n    mask preview PNGs, camera-record/object-map JSONs) that the gallery\n    does not display. Deleting a render set one visible tile at a time\n    would orphan those intermediate rows and their S3 objects, so this is a\n    single server-side bulk delete keyed by ``render_group_uuid``.\n\n    **Required Headers:**\n    - `Authorization: Bearer <token>`\n    - `X-TENANT-UUID: <tenant_uuid>`\n\n    Returns ``{deleted, render_group_uuid}``. ``deleted=0`` when no media\n    matches the group uuid (the set may already be gone) — this is not a 404.","operationId":"delete_render_set_assets__asset_id__render_set__render_group_uuid__delete","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"render_group_uuid","in":"path","required":true,"schema":{"type":"string","title":"Render Group Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Render set deleted (or already empty)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteRenderSetResponse"}}}},"401":{"description":"Not authenticated"},"404":{"description":"Asset not found or doesn't belong to your tenant"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/asset-library/whoami":{"get":{"tags":["asset-library"],"summary":"Whoami","description":"Identity & scope echo.\n\nReturns the calling user's UUID + email, their resolved tenant UUID,\nand (when authenticated via API key) the key UUID and its scope list.\nThe ``server_version`` field matches the ``/v1/`` URL prefix so that the\nplugin can detect API surface version bumps.\n\nNo required scope — all authenticated callers can reach this endpoint\nregardless of which (if any) asset-library scopes their key carries.","operationId":"whoami_v1_asset_library_whoami_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhoAmIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/asset-library/assets":{"get":{"tags":["asset-library"],"summary":"List Assets","description":"Browse/search the asset library.\n\nOnly assets with at least one published version are returned.\nThumbnail signed URLs are embedded for grid rendering.\nVisibility rules are applied server-side.","operationId":"list_assets_v1_asset_library_assets_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-text ILIKE search on name and tags","title":"Q"},"description":"Free-text ILIKE search on name and tags"},{"name":"tag","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Filter to assets carrying ALL listed tags","default":[],"title":"Tag"},"description":"Filter to assets carrying ALL listed tags"},{"name":"visibility","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional restrictor: private|tenant|public","title":"Visibility"},"description":"Optional restrictor: private|tenant|public"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","description":"recent | name | -name","default":"recent","title":"Sort"},"description":"recent | name | -name"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset","default":0,"title":"Skip"},"description":"Pagination offset"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size 1-100","default":25,"title":"Limit"},"description":"Page size 1-100"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__asset_library__dtos__PaginatedAssetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["asset-library"],"summary":"Create Asset Mirror","description":"Mirror of ``POST /assets`` scoped to the asset-library namespace.\n\nAccepts the same ``AssetCreateRequest`` body as the admin endpoint and\nreturns a minimal ``AssetCreatedResponse`` (uuid, name, asset_type_uuid) —\nthe addon only needs these to proceed to the upload-URL step.\n\nErrors propagate from the admin handler as-is; HTTPException 404 (tenant not\nfound) will surface as a plain 404.","operationId":"create_asset_mirror_v1_asset_library_assets_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetCreatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/asset-library/assets/{asset_id}":{"get":{"tags":["asset-library"],"summary":"Get Asset","description":"Per-asset metadata with published-version list.\n\nReturns ``AssetDetailResponse`` including all published versions\nordered newest-first.\n\nErrors:\n  - ``404 ASSET_LIBRARY_ASSET_NOT_FOUND`` when the asset does not exist\n    OR is not visible to the caller (404 hides existence either way).\n  - ``403 ASSET_LIBRARY_SCOPE_FORBIDDEN`` when the caller lacks\n    ``asset_library:read`` (raised by ``require_scope`` before this handler).","operationId":"get_asset_v1_asset_library_assets__asset_id__get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/asset-library/assets/{asset_id}/versions/{version}":{"get":{"tags":["asset-library"],"summary":"Get Version","description":"Per-version detail with embedded download envelope.\n\n``version`` may be an integer version number or the literal ``\"latest\"``.\nFor ``\"latest\"``, resolves via ``Asset.latest_version_uuid``.\n\nThe ``download`` envelope is only embedded when the caller has\n``asset_library:download`` (or ``system:*``) scope.  Callers with only\n``asset_library:read`` receive ``download: null`` and must use the\ndownload endpoint (which enforces the scope explicitly).","operationId":"get_version_v1_asset_library_assets__asset_id__versions__version__get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetVersionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/asset-library/assets/{asset_id}/versions/{version}/download":{"get":{"tags":["asset-library"],"summary":"Download Url","description":"Return a fresh signed download URL for a ``.blend`` version.\n\nRequires both ``asset_library:read`` and ``asset_library:download`` scopes.\nThe returned ``sha256`` comes from the ``AssetVersion`` row so the plugin\ncan verify the download even when the S3 ETag differs (multipart ETags).","operationId":"download_url_v1_asset_library_assets__asset_id__versions__version__download_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedUrlEnvelope"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/asset-library/assets/{asset_id}/versions/{version}/media/{role}/download":{"get":{"tags":["asset-library"],"summary":"Version Media Download","description":"Return a fresh signed download URL for a version's media by role.\n\nRequires both ``asset_library:read`` and ``asset_library:download``\nscopes. ``role`` matches ``Media.role`` verbatim (e.g. ``\"optimised_glb\"``,\n``\"file_blend\"``) — an unrecognised role behaves identically to a\nrecognised role with no matching row on this version (404).","operationId":"version_media_download_v1_asset_library_assets__asset_id__versions__version__media__role__download_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"role","in":"path","required":true,"schema":{"type":"string","title":"Role"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedUrlEnvelope"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/asset-library/assets/{asset_id}/versions/{version}/preview":{"get":{"tags":["asset-library"],"summary":"Preview Url","description":"Return a signed URL for the asset thumbnail or preview image.\n\n``size=thumb`` prefers ``MediaRole.THUMBNAIL_PNG``, falls back to\n``MediaRole.THUMBNAIL`` (WebM), from version media then asset media.\n``size=preview`` resolves first ``MediaRole.RENDER`` (from the asset-level\nper-asset media), then falls back to THUMBNAIL_PNG → THUMBNAIL (version-owned\nfirst, then asset-level).\n\n``404`` when neither media type is available.\n\nThe ``version`` path param is validated (to apply visibility and withdrawn\nchecks) but preview media is not version-scoped.","operationId":"preview_url_v1_asset_library_assets__asset_id__versions__version__preview_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"size","in":"query","required":false,"schema":{"enum":["thumb","preview"],"type":"string","description":"thumb = THUMBNAIL; preview = RENDER falling back to THUMBNAIL","default":"thumb","title":"Size"},"description":"thumb = THUMBNAIL; preview = RENDER falling back to THUMBNAIL"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedUrlEnvelope"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/asset-library/assets/{asset_id}/resolve-latest":{"get":{"tags":["asset-library"],"summary":"Resolve Latest","description":"Resolve the latest published version for a single asset.\n\nSets ``Cache-Control: max-age=60, must-revalidate`` and an ``ETag``\nderived from ``(asset_uuid, latest_version_uuid)`` so clients can\ndetect when the latest pointer changes without re-downloading metadata.\n\nReturns ``latest_version: null`` when the asset exists and is visible\nbut has no published version yet.\n\nVisibility rules apply:\n  - Not visible or non-existent → ``404 ASSET_LIBRARY_ASSET_NOT_FOUND``.","operationId":"resolve_latest_v1_asset_library_assets__asset_id__resolve_latest_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveLatestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/asset-library/manifest":{"get":{"tags":["asset-library"],"summary":"Get Manifest","description":"Return a compact, cursor-paginated manifest of all visible assets.\n\nEach entry carries asset identity, tags, visibility, latest version number,\nand an optional thumbnail URL.  Designed for periodic plugin sync into a\nlocal SQLite cache.\n\nOnly assets with at least one published version are included.\n\n**Visibility** rules are applied server-side — private assets from other\nowners are never surfaced.","operationId":"get_manifest_v1_asset_library_manifest_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 datetime — return only assets where updated_at >= since. Uses the asset's updated_at, not the latest version's published_at.","title":"Since"},"description":"ISO 8601 datetime — return only assets where updated_at >= since. Uses the asset's updated_at, not the latest version's published_at."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque pagination token from a previous response's next_cursor. When omitted, starts from the beginning.","title":"Cursor"},"description":"Opaque pagination token from a previous response's next_cursor. When omitted, starts from the beginning."},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Page size (1 – 1000). Defaults to ASSET_LIBRARY_MANIFEST_MAX_PAGE_SIZE. Values above 1000 are rejected with 400 ASSET_LIBRARY_INVALID_QUERY.","title":"Limit"},"description":"Page size (1 – 1000). Defaults to ASSET_LIBRARY_MANIFEST_MAX_PAGE_SIZE. Values above 1000 are rejected with 400 ASSET_LIBRARY_INVALID_QUERY."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManifestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/asset-library/resolve-latest":{"post":{"tags":["asset-library"],"summary":"Batch Resolve Latest","description":"Batch-resolve the latest published version for a set of assets.\n\nThe batch is capped at 200 UUIDs; a request outside the 1–200 range returns\n``400 ASSET_LIBRARY_INVALID_QUERY``.\n\nPer-asset failures (not visible, no published version, non-existent UUID)\nare partitioned into ``missing`` or ``forbidden`` — they never cause the\nwhole call to fail with a 4xx status.\n\n**One SELECT:** the implementation issues a single SQL SELECT against\n``assets`` regardless of batch size.  Callers can verify via a\n``sqlalchemy.event`` statement-count assertion in tests.","operationId":"batch_resolve_latest_v1_asset_library_resolve_latest_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResolveLatestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResolveLatestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/asset-library/asset-types":{"get":{"tags":["asset-library"],"summary":"List Asset Types For Library","description":"E13 — Return Asset Types enabled for the requesting tenant.\n\nWhen ``?for=upload`` is provided, further filters to ``user_uploadable=True``\nso the Blender upload dialog shows only types the user may create.\n\nResponse shape per item::\n\n    {\n        \"uuid\": \"...\",\n        \"slug\": \"floorplan\",\n        \"display_name\": \"Floorplan\",\n        \"user_uploadable\": true,\n        \"module_uuid\": \"...\",\n        \"module_slug\": \"inresi\"\n    }\n\nAuth: ``asset_library:read`` scope required (same as all read endpoints in\nthis namespace).  JWT callers are always permitted.\n\nErrors:\n  - ``400 ASSET_LIBRARY_INVALID_QUERY`` when ``?for=`` has an unrecognised value.","operationId":"list_asset_types_for_library_v1_asset_library_asset_types_get","parameters":[{"name":"for","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When set to 'upload', filters to asset types with user_uploadable=True. Any other value is rejected with 400.","title":"For"},"description":"When set to 'upload', filters to asset types with user_uploadable=True. Any other value is rejected with 400."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"},"title":"Response List Asset Types For Library V1 Asset Library Asset Types Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/asset-library/assets/{asset_uuid}/media/upload-url":{"post":{"tags":["asset-library"],"summary":"Get Upload Url Mirror","description":"Mirror of ``POST /assets/{id}/media/upload-url``.\n\nReturns the presigned S3 upload URL + object_key.  Auth is downcast to the\nadmin handler's ``(user, tenant_uuid)`` tuple.","operationId":"get_upload_url_mirror_v1_asset_library_assets__asset_uuid__media_upload_url_post","parameters":[{"name":"asset_uuid","in":"path","required":true,"schema":{"type":"string","title":"Asset Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__assets__dtos__UploadUrlRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__assets__dtos__UploadUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/asset-library/assets/{asset_uuid}/media":{"post":{"tags":["asset-library"],"summary":"Create Media Mirror","description":"Mirror of ``POST /assets/{id}/media``.\n\nTriggers the canonical hashing-version flow + format-converter + module\nhooks.  Auth is downcast to the admin handler's ``(user, tenant_uuid)``\ntuple.","operationId":"create_media_mirror_v1_asset_library_assets__asset_uuid__media_post","parameters":[{"name":"asset_uuid","in":"path","required":true,"schema":{"type":"string","title":"Asset Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/asset-library/assets/{asset_uuid}":{"delete":{"tags":["asset-library"],"summary":"Delete Asset Mirror","description":"Mirror of ``DELETE /assets/{id}`` for failed-upload cleanup.\n\nIdempotent: returns 204 both when the asset was deleted and when it was\nalready absent (404 from the admin handler is swallowed).\n\nThe admin ``delete_asset`` handler uses ``CurrentTenantDep`` (JWT-only path)\nwhile this mirror uses ``CurrentUserOrAPIKeyWithKeyDep`` (API-key path).\nRather than call into the admin handler directly — which would require\nconstructing a fake ``Tenant`` ORM object — we replicate the minimal delete\nlogic inline: verify ownership + tenant scope, then cascade-delete.\n\nVisibility rule mirrors the admin handler: private assets are only deletable\nby their owner.","operationId":"delete_asset_mirror_v1_asset_library_assets__asset_uuid__delete","parameters":[{"name":"asset_uuid","in":"path","required":true,"schema":{"type":"string","title":"Asset Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/asset-library/check-name":{"get":{"tags":["asset-library"],"summary":"Check Asset Name For Library","description":"Return ``exists=True`` + up to 5 case-insensitive name conflicts in the\ncaller's tenant (thumbnail URLs presigned at request time), else\n``exists=False``.\n\nAuth: ``asset_library:read`` scope (same as all reads in this namespace).","operationId":"check_asset_name_for_library_v1_asset_library_check_name_get","parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Asset name to check","title":"Name"},"description":"Asset name to check"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckNameResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/asset-library/tags":{"get":{"tags":["asset-library"],"summary":"List Org Tags For Library","description":"Return the tenant's curated org tags (sorted ``sort_order`` ASC, ``name`` ASC).\n\nAuth: ``asset_library:read`` scope (same as all reads in this namespace).","operationId":"list_org_tags_for_library_v1_asset_library_tags_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgTagListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/asset-library/health":{"get":{"tags":["asset-library"],"summary":"Health","description":"Liveness check for the asset-library API surface.\n\nDistinct from the app-level /health: lets the plugin verify\n*this surface* is reachable specifically (versioned, mounted, alive).\nNo auth required.","operationId":"health_v1_asset_library_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health V1 Asset Library Health Get"}}}}}}},"/tags/org":{"get":{"tags":["tags"],"summary":"List Org Tags","description":"List the tenant's curated org tags sorted by (sort_order ASC, name ASC).","operationId":"list_org_tags_tags_org_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgTagListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tags"],"summary":"Create Org Tag","description":"Create a new curated org tag for the tenant.  Admin-only.\n\nReturns 409 with ``code=\"duplicate_tag_name\"`` when a tag with the same\nname (case-insensitive) already exists in this tenant.","operationId":"create_org_tag_tags_org_post","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgTagCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgTagResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tags/org/{tag_uuid}":{"patch":{"tags":["tags"],"summary":"Update Org Tag","description":"Rename and/or reorder a curated org tag.  Admin-only.\n\nReturns 404 when the tag does not exist in this tenant.\nReturns 409 with ``code=\"duplicate_tag_name\"`` on a case-insensitive name\ncollision.","operationId":"update_org_tag_tags_org__tag_uuid__patch","security":[{"Bearer":[]}],"parameters":[{"name":"tag_uuid","in":"path","required":true,"schema":{"type":"string","title":"Tag Uuid"}},{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgTagUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgTagResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tags"],"summary":"Delete Org Tag","description":"Remove a curated org tag from the tenant.  Admin-only.\n\nAssets that carry the deleted tag keep it as a free-text value — deletion\ndoes not cascade to ``Asset.tags``.\n\nReturns 404 when the tag does not exist in this tenant.","operationId":"delete_org_tag_tags_org__tag_uuid__delete","security":[{"Bearer":[]}],"parameters":[{"name":"tag_uuid","in":"path","required":true,"schema":{"type":"string","title":"Tag Uuid"}},{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tags/autocomplete":{"get":{"tags":["tags"],"summary":"Autocomplete Tags","description":"Get tag suggestions for autocomplete.\n\nOrg tags matching the query are returned first (sorted by sort_order),\nfollowed by usage-histogram hits.  Each row includes a ``source`` field\nof ``\"org\"`` or ``\"history\"`` so callers can render them differently.\n\nThe response shape is backward-compatible with the previous ``TagResponse``\nfields (``name``, ``usage_count``, ``last_used``); ``source`` is additive.","operationId":"autocomplete_tags_tags_autocomplete_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":50,"description":"Search query for tag names","title":"Q"},"description":"Search query for tag names"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Maximum number of suggestions","default":10,"title":"Limit"},"description":"Maximum number of suggestions"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Autocomplete Tags Tags Autocomplete Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tags/popular":{"get":{"tags":["tags"],"summary":"Get Popular Tags","description":"Get most popular tags for the tenant","operationId":"get_popular_tags_tags_popular_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of popular tags","default":20,"title":"Limit"},"description":"Maximum number of popular tags"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagAutocompleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tags/cleanup":{"delete":{"tags":["tags"],"summary":"Cleanup Unused Tags","description":"Remove tag statistics for tags with zero usage count","operationId":"cleanup_unused_tags_tags_cleanup_delete","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Cleanup Unused Tags Tags Cleanup Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api-keys":{"post":{"tags":["API Keys"],"summary":"Create Api Key","description":"Create a new API key for the current tenant.\n\nOwner is the acting admin and tenant is the current tenant — neither is\ncaller-supplied. `key_type='system'` is rejected: this surface only\never mints tenant-managed keys.\n\n**Important**: The full API key is only shown once in this response.\nStore it securely - you won't be able to retrieve it again.","operationId":"create_api_key_api_keys_post","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["API Keys"],"summary":"List Api Keys","description":"List every tenant-managed API key belonging to the current tenant.\n\nTenant-wide: a key created by another admin of this tenant is included.\nSystem keys are never returned, even one pinned to this tenant, since the\ntype allowlist excludes them.\n\nOne query: outer-joins `User` for the owner's email and outer-joins\n`UserTenant` (on user_uuid + tenant_uuid) to derive whether that owner is\nstill an active member — both joins are outer so a key survives even when\nits owning `User` row or `UserTenant` row is gone.","operationId":"list_api_keys_api_keys_get","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api-keys/scopes":{"get":{"tags":["API Keys"],"summary":"List Api Key Scopes","description":"Scope vocabulary for the create-dialog picker.\n\nDerived from `APIKeyScope` via `app.api.api_keys.scopes.SCOPE_VOCABULARY`\n— the same source `validate_scopes` checks against — so the UI's option\nlist can never drift from what create actually accepts. Returns no\ntenant-scoped data; gated identically to the rest of this router for\nsurface consistency, not secrecy.\n\nDeclared before the `/{api_key_uuid}` routes below so a literal\n`/api-keys/scopes` is never captured by a parameterised GET on this\nrouter in the future.","operationId":"list_api_key_scopes_api_keys_scopes_get","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyScopeListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api-keys/{api_key_uuid}":{"delete":{"tags":["API Keys"],"summary":"Delete Api Key","description":"Delete a tenant-managed API key belonging to the current tenant.","operationId":"delete_api_key_api_keys__api_key_uuid__delete","security":[{"Bearer":[]}],"parameters":[{"name":"api_key_uuid","in":"path","required":true,"schema":{"type":"string","title":"Api Key Uuid"}},{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api-keys/{api_key_uuid}/deactivate":{"patch":{"tags":["API Keys"],"summary":"Deactivate Api Key","description":"Deactivate a tenant-managed API key (can be reactivated later).\n\nReturns the updated row (200) rather than 204, so the UI need not refetch\nafter a deactivate action.","operationId":"deactivate_api_key_api_keys__api_key_uuid__deactivate_patch","security":[{"Bearer":[]}],"parameters":[{"name":"api_key_uuid","in":"path","required":true,"schema":{"type":"string","title":"Api Key Uuid"}},{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api-keys/{api_key_uuid}/activate":{"patch":{"tags":["API Keys"],"summary":"Activate Api Key","description":"Reactivate a deactivated tenant-managed API key.\n\nRefused with 409 while the key's owner is not an active member of this\ntenant — no `UserTenant` row, or `access_revoked_at` set. This is\nthe deliberate recovery path: restoring access, or\nminting a fresh key, are what an admin does next.","operationId":"activate_api_key_api_keys__api_key_uuid__activate_patch","security":[{"Bearer":[]}],"parameters":[{"name":"api_key_uuid","in":"path","required":true,"schema":{"type":"string","title":"Api Key Uuid"}},{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/asset-versions":{"post":{"tags":["Asset Versions (System)"],"summary":"Create a new AssetVersion (internal)","description":"Create a new AssetVersion for an asset.\n\nCalled by the format-converter flow (Stage 1) to create the version that\nwill own all derived media for this conversion run.  Starts in status\n``hashing``; the caller calls the publish endpoint once the .blend SHA-256\nis known.","operationId":"create_asset_version_api_asset_versions_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAssetVersionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/asset-versions/{version_uuid}/publish":{"patch":{"tags":["Asset Versions (System)"],"summary":"Publish an AssetVersion — set sha256, filesize, status=published (internal)","description":"Transition an AssetVersion from ``hashing`` to ``published``.\n\nAlso updates ``Asset.latest_version_uuid`` / ``Asset.latest_version_number``\nwhen the new version is the highest.\n\nWhen *body* carries a ``sha256`` the worker computed from the local source\nfile, it is trusted and stamped directly.  Otherwise the backend falls back\nto ``_hash_media_from_s3``, which streams the whole stored object back —\ncheap when the API and object store share a LAN, but a full WAN transfer\n(and a likely client timeout on large blends) when they do not.  The worker\nalready supplies ``filesize`` at media-creation time, so accepting its\n``sha256`` here extends an existing trust boundary rather than adding one.","operationId":"publish_asset_version_api_asset_versions__version_uuid__publish_patch","parameters":[{"name":"version_uuid","in":"path","required":true,"schema":{"type":"string","title":"Version Uuid"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AssetVersionPublishRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/asset-versions/{version_uuid}/metrics":{"patch":{"tags":["Asset Versions (System)"],"summary":"Stamp poly_count and dimensions onto an AssetVersion (internal)","description":"Record poly_count and bounding-box dimensions on an AssetVersion.\n\nCalled by the format-converter flow (Stage 1) after the Blender scene is\nloaded and BEFORE calling the publish endpoint.  The version must exist;\nits current status is not checked so that retries can re-stamp.\n\nValidation:\n- poly_count must be > 0 (enforced by the request schema).\n- dimensions must be exactly 3 positive floats (enforced by the schema).","operationId":"stamp_asset_version_metrics_api_asset_versions__version_uuid__metrics_patch","parameters":[{"name":"version_uuid","in":"path","required":true,"schema":{"type":"string","title":"Version Uuid"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetVersionMetricsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/asset-versions/{version_uuid}":{"get":{"tags":["Asset Versions (System)"],"summary":"Fetch an AssetVersion by UUID (internal)","description":"Return a single AssetVersion including its ``meta`` JSONB column.\n\nCalled by the render flow to read ``meta.cameras`` when ``camera_name``\nis supplied by the caller.  Uses the system API key so the render worker\ncan access any tenant's version without a user session.","operationId":"get_asset_version_api_asset_versions__version_uuid__get","parameters":[{"name":"version_uuid","in":"path","required":true,"schema":{"type":"string","title":"Version Uuid"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/asset-versions/{version_uuid}/hook-outcome":{"patch":{"tags":["Asset Versions (System)"],"summary":"Persist hook (a/c) outcomes onto an AssetVersion (internal)","description":"Merge hook outputs into AssetVersion and optionally FormatConversionJob.\n\nCalled by the framework's hook runner after hook (a) and hook (c) complete.\n\n- ``meta_merge``: merged into ``AssetVersion.meta`` using PostgreSQL's\n  ``||`` JSONB operator (additive; never overwrites the full column).\n- ``validation_passed`` / ``validation_report_md``: written to the two\n  hook (a) outcome columns.\n- ``hook_reports_patch``: merged into ``FormatConversionJob.hook_reports``\n  when ``job_uuid`` is provided.","operationId":"persist_hook_outcome_api_asset_versions__version_uuid__hook_outcome_patch","parameters":[{"name":"version_uuid","in":"path","required":true,"schema":{"type":"string","title":"Version Uuid"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HookOutcomeRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/wallet":{"get":{"tags":["Tokens"],"summary":"Get Wallet","description":"Get the current tenant's token wallet (creates an empty one if missing).","operationId":"get_wallet_api_tokens_wallet_get","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/wallet/thresholds":{"patch":{"tags":["Tokens"],"summary":"Update Wallet Thresholds","description":"Update the low / critical balance alert thresholds.","operationId":"update_wallet_thresholds_api_tokens_wallet_thresholds_patch","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThresholdsUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/extra-usage":{"patch":{"tags":["Tokens"],"summary":"Update Extra Usage","description":"Toggle Extra Usage and/or adjust the monthly addon-spend limit.\n\nUpdates any combination of ``enabled`` (the master toggle) and\n``monthly_spend_limit_minor`` (the per-tenant spend ceiling enforced by\nthe checkout session-create guard and the auto-reload under-lock guard).\nFields omitted (``None``) are left unchanged — mirrors\n``update_wallet_thresholds``'s get-or-create + mutate + commit shape.\n\nReturns the full ``WalletResponse`` as it now stands, including the\nrecomputed ``spend_limit_remaining_minor``.\n\nError codes:\n- **422** — ``monthly_spend_limit_minor`` is negative or exceeds\n  ``ADDON_SPEND_LIMIT_MAX_MINOR`` (DTO-level bound), or an unknown field\n  is present (``extra=\"forbid\"``).","operationId":"update_extra_usage_api_tokens_extra_usage_patch","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtraUsageUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/auto-topup":{"patch":{"tags":["Tokens"],"summary":"Update Auto Topup","description":"Configure per-tenant off-session auto-renew (pack mode or custom mode).\n\nUpdates any combination of ``enabled``, ``price_id`` (pack mode),\n``amount_minor`` (custom mode), and ``floor``. Fields omitted (``None``)\nare left unchanged. When either ``price_id`` or ``amount_minor`` is\ngiven, the tenant's billing currency is resolved first\n(``resolve_addon_currency`` — a plain tenant-column read) and used to\nvalidate it — a Price/amount outside that currency is rejected exactly\nlike an unknown Price.\n\n- **Pack mode** (``price_id`` set): resolved through\n  ``StripeTokenPackCatalog.get_pack`` and stored in\n  ``auto_topup_price_id``; clears any previously configured custom\n  amount (``auto_topup_amount_minor`` -> ``NULL``).\n- **Custom mode** (``amount_minor`` set): must be one of the\n  ``ADDON_TOPUP_RUNGS_MAJOR_UNITS`` slider rungs (minor units); the\n  tenant's custom-topup Price is discovered via\n  ``StripeTokenPackCatalog.find_custom_topup`` and its id stored in\n  ``auto_topup_price_id`` alongside the amount in\n  ``auto_topup_amount_minor``.\n\nReturns the full ``AutoTopupConfig`` as it now stands on the wallet.\n\nError codes:\n- **422** — ``price_id`` does not resolve to a valid token pack in the\n  tenant's billing currency (the Stripe Price must belong to\n  ``STRIPE_TOKEN_PACK_PRODUCT_ID``, carry a positive ``token_grant``,\n  and match the resolved currency).\n- **422** — ``amount_minor`` is not one of the\n  ``ADDON_TOPUP_RUNGS_MAJOR_UNITS`` slider rungs, or no custom-topup\n  Price is configured for the tenant's billing currency.","operationId":"update_auto_topup_api_tokens_auto_topup_patch","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoTopupUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoTopupConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/ledger":{"get":{"tags":["Tokens"],"summary":"List Ledger","description":"Paginated, filterable view of the tenant's token ledger.","operationId":"list_ledger_api_tokens_ledger_get","security":[{"Bearer":[]}],"parameters":[{"name":"entry_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by entry_type","title":"Entry Type"},"description":"Filter by entry_type"},{"name":"reference_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Type"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive lower bound on created_at","title":"Start"},"description":"Inclusive lower bound on created_at"},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Exclusive upper bound on created_at","title":"End"},"description":"Exclusive upper bound on created_at"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/usage/export.csv":{"get":{"tags":["Tokens"],"summary":"Export Usage Csv","description":"Stream the tenant's ledger as CSV (suitable for finance review).","operationId":"export_usage_csv_api_tokens_usage_export_csv_get","security":[{"Bearer":[]}],"parameters":[{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End"}},{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/estimate":{"post":{"tags":["Tokens"],"summary":"Estimate","description":"Quote the token cost of a model call without holding any tokens.","operationId":"estimate_api_tokens_estimate_post","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/checkout":{"post":{"tags":["Tokens"],"summary":"Create Token Checkout","description":"Create a Stripe Checkout Session for a one-time addon top-up.\n\n``price_id`` resolves to **either** a currency-resolved fixed token pack\n**or** the currency-resolved custom-topup Price — the tenant's billing\ncurrency is resolved from ``tenant.currency`` via\n``resolve_addon_currency`` before either lookup, so a Price in the wrong\ncurrency is rejected exactly like a foreign Price.\n\nFor a **fixed pack** the line item is a plain ``{\"price\": price_id}`` and\n``amount_minor`` is ignored. For the **custom-topup Price** the amount is\nchosen IN-APP, not on Stripe's hosted page: ``amount_minor`` is\nREQUIRED, validated against the custom Price's own\n``custom_unit_amount`` ``[min, max]`` range, and charged via a dynamic\n``price_data`` line item (``{\"price_data\": {\"currency\": ..., \"unit_amount\":\namount_minor, \"product\": STRIPE_TOKEN_PACK_PRODUCT_ID}, \"quantity\": 1}``).\nThe custom-topup Price's own id is still stamped into the Session's\n``metadata.price_id`` — ``price_data`` never creates a real Stripe Price,\nso the credit path (``handle_checkout_session_completed``) resolves the\n``tokens_per_major_unit`` rate from the metadata id exactly as before.\n\nOn `checkout.session.completed`, the webhook handler credits the wallet\nvia `TokenWalletService.credit(...)` keyed on `payment_intent` for\nidempotency.\n\nWorks against either real Stripe or `stripe/stripe-mock` depending on\nthe `STRIPE_API_BASE` setting; the response contract is identical.\n\nError codes:\n- **404** — ``price_id`` does not resolve to a fixed pack or the\n  custom-topup Price in the tenant's billing currency.\n- **422** — ``invalid_custom_amount``: ``price_id`` is the custom-topup\n  Price and ``amount_minor`` is missing or outside its\n  ``[min_minor, max_minor]`` bounds.\n- **422** — the session-create spend guard rejects the purchase:\n  ``extra_usage_disabled`` (Extra Usage is off), ``spend_limit_reached``\n  (no remaining monthly allowance), ``pack_exceeds_remaining_allowance``\n  (a fixed pack's price exceeds the remaining allowance), or\n  ``custom_exceeds_remaining_allowance`` (the app-collected custom\n  amount exceeds the remaining allowance). Both amounts are known\n  upfront, so this is checked for a custom buy too. A concurrent\n  session racing this session-create check can still overshoot the\n  limit slightly; the race-free enforcement point remains auto-reload's\n  under-lock guard.","operationId":"create_token_checkout_api_tokens_checkout_post","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/dev/complete-checkout":{"post":{"tags":["Tokens"],"summary":"Dev Complete Checkout","description":"Finalise a mock-checkout purchase.\n\nOnly available when `STRIPE_API_BASE` is set (i.e. the stack is\npointed at `stripe-mock`). stripe-mock never fires real webhooks, so\nin dev the frontend mock-checkout page calls this endpoint instead\nof relying on `checkout.session.completed`. The production webhook\nhandler is untouched — different code path, different security\nsurface, no signing-check relaxation.\n\nIdempotent: the synthetic `payment_intent` is derived from the\n`session_id`, so the same idempotency key shape the real webhook\nuses (`stripe:purchase:{payment_intent}`) collapses retries.\n\nBranches on the resolved Price exactly like the real webhook: a fixed\npack (`token_grant` metadata) credits `pack.token_grant`; the\ncustom-topup Price (`tokens_per_major_unit` metadata) credits\n`custom_grant(request.amount_minor, rate)`, where `amount_minor` is\ndev-only (see `DevCompleteCheckoutRequest`). The real flow collects\nthat amount IN-APP at `POST /checkout` time (not on a Stripe-hosted\n`custom_unit_amount` collection page), but stripe-mock never fires a\nreal `checkout.session.completed` webhook — so this endpoint needs the\ncaller to resupply the amount, bounded by the same\n`custom_unit_amount` min/max `POST /checkout` already validated it\nagainst.\n\nError codes:\n- **404** — `price_id` is neither a valid fixed pack nor the\n  custom-topup Price.\n- **422** — `price_id` is the custom-topup Price but `amount_minor` is\n  missing or outside its `[min_minor, max_minor]` bounds.","operationId":"dev_complete_checkout_api_tokens_dev_complete_checkout_post","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevCompleteCheckoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Dev Complete Checkout Api Tokens Dev Complete Checkout Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/dev/grant-subscription":{"post":{"tags":["Tokens"],"summary":"Dev Grant Subscription","description":"Seed a subscription bucket grant without real Stripe / Test Clocks.\n\nOnly available when ``STRIPE_API_BASE`` is set (stripe-mock mode). Mirrors the\nreal ``invoice.paid`` path — calls ``reset_subscription_bucket`` with a synthetic\nidempotency key so the grant is idempotent on repeated calls for the same\n``subscription_id`` + period start epoch.\n\n``allotment`` is clamped against ``TOKEN_GRANT_MAX_PER_EVENT`` — this path\ncalls ``reset_subscription_bucket`` directly (bypassing the real\n``invoice.paid`` handler's ``_resolve_token_grant`` clamp), so it needs its\nown guard against minting an arbitrarily large subscription balance.\n\nError codes:\n- **422** — ``allotment`` exceeds ``settings.TOKEN_GRANT_MAX_PER_EVENT``.","operationId":"dev_grant_subscription_api_tokens_dev_grant_subscription_post","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevGrantSubscriptionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Dev Grant Subscription Api Tokens Dev Grant Subscription Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/packages":{"get":{"tags":["Tokens"],"summary":"List Packages","description":"List active token packs plus the custom-topup descriptor, both\ncurrency-resolved to the tenant's billing currency (`tenant.currency`,\nno Stripe involved).\n\nAn unconfigured `STRIPE_TOKEN_PACK_PRODUCT_ID` legitimately returns an\nempty `items` list and a `None` `custom_topup`. A Stripe outage (retries\nexhausted) surfaces as a 502 — the browse endpoint must not silently\ndegrade to an empty catalog.","operationId":"list_packages_api_tokens_packages_get","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPackageListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/usage/summary":{"get":{"tags":["Tokens"],"summary":"Usage Summary","description":"Aggregate token usage for the tenant over the past `days` days.\n\n`total_tokens_spent` and `by_model` reflect tokens actually SETTLED\n(delivered) within the window — a HOLD's own amount is never counted on\nits own, so a released hold contributes zero (the wallet already\nreturned those tokens) and an in-flight hold contributes zero (nothing\nhas been spent yet; it still shows up in `total_holds_outstanding`,\nwhich is read straight off the wallet's live `held` column). Per-model\nidentity is read from the matching HOLD row's `provider_id` / `model_id`\nmeta, joined back via each SETTLE row's own `hold_idempotency_key` —\nSETTLE rows carry no provider/model of their own. Rows lacking that\nmetadata are grouped under (provider=unknown, model=unknown).","operationId":"usage_summary_api_tokens_usage_summary_get","security":[{"Bearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/job-prices":{"get":{"tags":["Tokens"],"summary":"List Job Prices","description":"Effective token cost of every render the tenant could invoke.\n\nRead-only, parameter-less. Narrows the tenant-scoped priceable-key\ncatalog (`list_priceable_keys_for_tenant`) to the `(render, '')`\njob-type default plus named renders declared on modules the tenant has\n**enabled** — a tenant never sees priced workflows for other job types,\nor for a module it doesn't have — then resolves every remaining key\nthrough the same batch resolver the charge path uses, so what a tenant\nsees here is definitionally what a render costs.\n\nResponse items carry `job_type`, `render_type`, `display_name`,\n`module_slug`, `tokens`, `priced` — never `source` or `pricing_uuid`\n(a tenant must not learn which layer produced its price).","operationId":"list_job_prices_api_tokens_job_prices_get","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JobPriceItem"},"title":"Response List Job Prices Api Tokens Job Prices Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/invoices/periods":{"get":{"tags":["Billing"],"summary":"List Invoice Periods","description":"The tenant's selectable billing periods, newest first, capped at\n`INVOICE_PERIOD_CAP_MONTHS`. Drives the frontend period selector.\n\n`has_subscription_invoice` is read off a full `InvoiceAssembler.assemble`\ncall per period rather than re-implementing Stripe-invoice matching here,\nso this list can never disagree with what `GET /invoices/{period_key}`\nitself returns for the same period. This trades some redundant\nper-period aggregation work for that correctness guarantee — acceptable\nat the `INVOICE_PERIOD_CAP_MONTHS` (default 24) scale this endpoint\noperates at.","operationId":"list_invoice_periods_api_billing_invoices_periods_get","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoicePeriodListItem"},"title":"Response List Invoice Periods Api Billing Invoices Periods Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/invoices/{period_key}":{"get":{"tags":["Billing"],"summary":"Get Invoice","description":"Assemble the invoice for a specific period (`period_key = \"YYYY-MM\"`).\n\nError codes:\n- **404** — `period_key` doesn't parse to `\"YYYY-MM\"` (including the\n  literal `\"current\"` — use `GET /current-spend` for the in-progress\n  period instead).","operationId":"get_invoice_api_billing_invoices__period_key__get","security":[{"Bearer":[]}],"parameters":[{"name":"period_key","in":"path","required":true,"schema":{"type":"string","title":"Period Key"}},{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__billing__dtos__InvoiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/current-spend":{"get":{"tags":["Billing"],"summary":"Get Current Spend","description":"The in-progress period, spend-to-date.\n\nIf a paid Stripe invoice already covers the current period (the normal\ncase — Stripe bills subscriptions in advance), `subscription` reflects\nthat invoice with `not_yet_billed = False`, exactly like a closed\nperiod. Only when no paid invoice covers the period yet does\n`subscription` fall back to a live-price estimate with\n`subscription.not_yet_billed = True`, which is excluded from\n`totals.money_charged_minor`.","operationId":"get_current_spend_api_billing_current_spend_get","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__billing__dtos__InvoiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/plans":{"get":{"tags":["payments"],"summary":"Get Available Plans","description":"Return every subscription tier for the UI.\n\nOnly *active* tiers (currently just Pro) are subscribe-able and have their\nprice + monthly token grant pulled LIVE from Stripe. Inactive tiers\n(Basic/Enterprise) are returned as placeholders — the frontend greys them\nout — using their static config price. A Stripe hiccup never fails the\nlist: the active tier falls back to its config price and logs a warning.\n\nA migrated tier (`tier.stripe_product_id` set — see\n`app/config/products.py` module docstring) resolves its monthly price live\nvia `resolve_subscription_price`, in the VIEWER's billing currency when an\n``X-TENANT-UUID`` header is supplied (``tenant.currency``, the same value\ncheckout charges in). Without a tenant header (catalog browsing before a\ntenant is selected) the tier's configured default currency is used. A tier\nwith no ``stripe_product_id`` configured has no live pricing — it's\nreturned using its static config price only.\n\nOnly the monthly price is resolved. There is no annual Price configured\nand no interval toggle in the UI, so resolving one was a guaranteed miss:\na second `list_prices` round-trip per tier that could only ever log a\nwarning. ``price_annual`` is still returned, from config.","operationId":"get_available_plans_payments_plans_get","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionPlanResponse"},"title":"Response Get Available Plans Payments Plans Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/usage/storage":{"get":{"tags":["payments"],"summary":"Get Storage Usage","description":"Storage the tenant is using, against what its licences include.","operationId":"get_storage_usage_payments_usage_storage_get","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageUsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/subscription":{"get":{"tags":["payments"],"summary":"Get Tenant Subscription","operationId":"get_tenant_subscription_payments_subscription_get","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionResponse"},{"type":"null"}],"title":"Response Get Tenant Subscription Payments Subscription Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/subscription/resume":{"post":{"tags":["payments"],"summary":"Resume Tenant Subscription","description":"Clear `cancel_at_period_end` on a subscription that is still live.\n\nA subscription cancelled through the Billing Portal isn't a distinct\nstate in Stripe — it stays `active` with `cancel_at_period_end=true`\nuntil the period actually ends. Resuming is therefore just flipping that\nflag back on the same subscription, never a new Checkout Session.\n\nA `past_due` subscription is resumable too: a failed card during dunning\nshould not trap a customer who wants to stay. Clearing the flag does not\nsettle the outstanding invoice — that is a separate payment.","operationId":"resume_tenant_subscription_payments_subscription_resume_post","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/checkout":{"post":{"tags":["payments"],"summary":"Create Checkout Session","operationId":"create_checkout_session_payments_checkout_post","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/portal":{"post":{"tags":["payments"],"summary":"Create Portal Session","operationId":"create_portal_session_payments_portal_post","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/invoices":{"get":{"tags":["payments"],"summary":"Get Tenant Invoices","operationId":"get_tenant_invoices_payments_invoices_get","security":[{"Bearer":[]}],"parameters":[{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/app__api__payments__invoices__shared_dtos__InvoiceResponse"},"title":"Response Get Tenant Invoices Payments Invoices Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/invoices/{invoice_id}/download":{"get":{"tags":["payments"],"summary":"Download Invoice","operationId":"download_invoice_payments_invoices__invoice_id__download_get","security":[{"Bearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"x-tenant-uuid","in":"header","required":true,"schema":{"type":"string","description":"UUID of the tenant to operate within","title":"X-Tenant-Uuid"},"description":"UUID of the tenant to operate within"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Download Invoice Payments Invoices  Invoice Id  Download Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/webhooks/stripe":{"post":{"tags":["webhooks"],"summary":"Handle Stripe Webhook","operationId":"handle_stripe_webhook_payments_webhooks_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Handle Stripe Webhook Payments Webhooks Stripe Post"}}}}}}},"/feedback/":{"post":{"tags":["feedback"],"summary":"Submit Feedback","operationId":"submit_feedback_feedback__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackSubmitRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"Bearer":[]}]}},"/super-admin/tenants":{"get":{"tags":["super-admin"],"summary":"Get All Tenants","operationId":"get_all_tenants_super_admin_tenants_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TenantWithMetricsDTO"},"type":"array","title":"Response Get All Tenants Super Admin Tenants Get"}}}}},"security":[{"Bearer":[]}]}},"/super-admin/tenants/{tenant_uuid}":{"get":{"tags":["super-admin"],"summary":"Get Tenant Details","operationId":"get_tenant_details_super_admin_tenants__tenant_uuid__get","security":[{"Bearer":[]}],"parameters":[{"name":"tenant_uuid","in":"path","required":true,"schema":{"type":"string","title":"Tenant Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantDetailsDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["super-admin"],"summary":"Patch Tenant","operationId":"patch_tenant_super_admin_tenants__tenant_uuid__patch","security":[{"Bearer":[]}],"parameters":[{"name":"tenant_uuid","in":"path","required":true,"schema":{"type":"string","title":"Tenant Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantPatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantPatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/modules":{"get":{"tags":["super-admin"],"summary":"List Modules","description":"Return all modules discovered by the registry, joined to DB rows for UUIDs.\n\nThe registry is the canonical source of truth for which modules exist.\nThe DB rows supply the ``uuid`` fields (assigned at first startup sync).\nModules not yet synced to the DB (e.g. in a test environment without a\nstartup sync) are excluded from the response.","operationId":"list_modules_super_admin_modules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ModuleSummaryDTO"},"type":"array","title":"Response List Modules Super Admin Modules Get"}}}}},"security":[{"Bearer":[]}]}},"/super-admin/tenants/{tenant_uuid}/modules":{"get":{"tags":["super-admin"],"summary":"List Tenant Modules","description":"Return per-tenant module status for every discovered module.\n\nEvery module appears in the list regardless of whether the tenant has an\nactive TenantModule row — this lets the UI render a full toggle grid even\nfor modules that have never been enabled.","operationId":"list_tenant_modules_super_admin_tenants__tenant_uuid__modules_get","security":[{"Bearer":[]}],"parameters":[{"name":"tenant_uuid","in":"path","required":true,"schema":{"type":"string","title":"Tenant Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantModuleStatusDTO"},"title":"Response List Tenant Modules Super Admin Tenants  Tenant Uuid  Modules Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/tenants/{tenant_uuid}/modules/{module_uuid}":{"put":{"tags":["super-admin"],"summary":"Update Tenant Module","description":"Upsert TenantModule enablement and config.\n\n- If a TenantModule row exists: update ``enabled``, ``config``, and (when\n  toggling to ``enabled=True``) set ``enabled_at`` and\n  ``enabled_by_user_uuid``.\n- If no row exists: create one.\n\n``config`` is replaced wholesale, not merged. A PUT that omits a key\npresent in the stored config drops that key — this is deliberate: it's\nwhat lets a super-admin delete a key entirely (e.g. via the raw JSON\ntextarea) without a separate \"delete this key\" affordance. There is no\nserver-side merge and none is planned; the one blessed caller, the admin\nUI, guarantees no-clobber itself by always loading the full existing\nconfig, editing one section, and sending the complete result back\n(``ModulesPage.helpers.ts::splitConfig``/``composeConfigForSave``). Any\nother caller (a script, a future second admin surface) must do the same\n— send the complete config, not a partial one — or it will silently wipe\nsibling keys set by a previous call.\n\nAudit fields lifecycle:\n- ``enabled_at`` and ``enabled_by_user_uuid`` are set when a module is\n  toggled **to** ``enabled=True``.  They are left unchanged when a module\n  is toggled **to** ``enabled=False`` so the history of the last enablement\n  is preserved.\n\nA ``config[\"options\"]`` blob (present only) is validated against the\nmodule's declared ``TenantModuleOptions`` model before anything is\nwritten: an unrecognised value or unknown key raises 422 naming the\noffending key(s); an \"options\" key sent for a module that declares no\noptions model raises 422 too, since a key nothing reads is how stale\nconfig accumulates. An absent \"options\" key is unaffected — behaves\nbyte-identically to before this validation existed.\n\nReturns 204 on success.","operationId":"update_tenant_module_super_admin_tenants__tenant_uuid__modules__module_uuid__put","security":[{"Bearer":[]}],"parameters":[{"name":"tenant_uuid","in":"path","required":true,"schema":{"type":"string","title":"Tenant Uuid"}},{"name":"module_uuid","in":"path","required":true,"schema":{"type":"string","title":"Module Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantModuleUpdateRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/job-pricing/catalog":{"get":{"tags":["super-admin"],"summary":"Get Job Pricing Catalog","description":"Every priceable key, annotated with its current global price.\n\nIssues exactly one query — every `job_pricing` row — rather than one\nlookup per catalog key. A global row whose key the registry no longer\n(or does not yet) declare is appended rather than dropped, so a price\nset ahead of a module shipping stays visible.","operationId":"get_job_pricing_catalog_super_admin_job_pricing_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/JobPricingCatalogEntry"},"type":"array","title":"Response Get Job Pricing Catalog Super Admin Job Pricing Catalog Get"}}}}},"security":[{"Bearer":[]}]}},"/super-admin/job-pricing":{"get":{"tags":["super-admin"],"summary":"List Job Pricing","operationId":"list_job_pricing_super_admin_job_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/JobPricingRow"},"type":"array","title":"Response List Job Pricing Super Admin Job Pricing Get"}}}}},"security":[{"Bearer":[]}]},"put":{"tags":["super-admin"],"summary":"Upsert Job Pricing","description":"Upsert-by-key. Creates a new row, or updates the existing row for\nthe same `(job_type, render_type)` key in place — the row count for\nthat key never grows past one.","operationId":"upsert_job_pricing_super_admin_job_pricing_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobPricingUpsertRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobPricingRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"Bearer":[]}]}},"/super-admin/job-pricing/{pricing_uuid}":{"delete":{"tags":["super-admin"],"summary":"Delete Job Pricing","operationId":"delete_job_pricing_super_admin_job_pricing__pricing_uuid__delete","security":[{"Bearer":[]}],"parameters":[{"name":"pricing_uuid","in":"path","required":true,"schema":{"type":"string","title":"Pricing Uuid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/tenants/{tenant_uuid}/job-pricing":{"get":{"tags":["super-admin"],"summary":"Get Tenant Job Pricing","description":"Effective price table for one tenant, over the full catalog.\n\nEvery number and every `source` comes straight from\n`resolve_job_prices` — this handler enumerates keys and shapes the\nresponse, it never re-derives precedence.","operationId":"get_tenant_job_pricing_super_admin_tenants__tenant_uuid__job_pricing_get","security":[{"Bearer":[]}],"parameters":[{"name":"tenant_uuid","in":"path","required":true,"schema":{"type":"string","title":"Tenant Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantEffectiveJobPricingRow"},"title":"Response Get Tenant Job Pricing Super Admin Tenants  Tenant Uuid  Job Pricing Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["super-admin"],"summary":"Upsert Tenant Job Pricing","description":"Upsert-by-key override for one tenant.\n\nAn override may be created for a key with no global row at all — it is\nabsolute and needs nothing to inherit.","operationId":"upsert_tenant_job_pricing_super_admin_tenants__tenant_uuid__job_pricing_put","security":[{"Bearer":[]}],"parameters":[{"name":"tenant_uuid","in":"path","required":true,"schema":{"type":"string","title":"Tenant Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantJobPricingUpsertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantJobPricingRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/tenants/{tenant_uuid}/job-pricing/{pricing_uuid}":{"delete":{"tags":["super-admin"],"summary":"Delete Tenant Job Pricing","operationId":"delete_tenant_job_pricing_super_admin_tenants__tenant_uuid__job_pricing__pricing_uuid__delete","security":[{"Bearer":[]}],"parameters":[{"name":"tenant_uuid","in":"path","required":true,"schema":{"type":"string","title":"Tenant Uuid"}},{"name":"pricing_uuid","in":"path","required":true,"schema":{"type":"string","title":"Pricing Uuid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/users":{"get":{"tags":["super-admin"],"summary":"List All Users","operationId":"list_all_users_super_admin_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserDTO"},"type":"array","title":"Response List All Users Super Admin Users Get"}}}}},"security":[{"Bearer":[]}]}},"/super-admin/users/{user_uuid}":{"patch":{"tags":["super-admin"],"summary":"Patch User","operationId":"patch_user_super_admin_users__user_uuid__patch","security":[{"Bearer":[]}],"parameters":[{"name":"user_uuid","in":"path","required":true,"schema":{"type":"string","title":"User Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPatchRequest"}}}},"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"}}}}}}},"/super-admin/feedback":{"get":{"tags":["super-admin"],"summary":"Get All Feedback","operationId":"get_all_feedback_super_admin_feedback_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FeedbackWithUserDTO"},"type":"array","title":"Response Get All Feedback Super Admin Feedback Get"}}}}},"security":[{"Bearer":[]}]}},"/super-admin/invite-requests":{"get":{"tags":["super-admin"],"summary":"List Invite Requests","operationId":"list_invite_requests_super_admin_invite_requests_get","security":[{"Bearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InviteRequestDTO"},"title":"Response List Invite Requests Super Admin Invite Requests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/tenants/{tenant_uuid}/reconcile-grants":{"post":{"tags":["super-admin"],"summary":"Reconcile Tenant Subscription Grants","description":"Re-derive this tenant's subscription grants from Stripe's paid invoices.\n\nSafe to run repeatedly: each grant is keyed on subscription and period, so\nan invoice that was already granted is counted and skipped rather than\ncredited twice. Only periods that are still running are backfilled.","operationId":"reconcile_tenant_subscription_grants_super_admin_tenants__tenant_uuid__reconcile_grants_post","security":[{"Bearer":[]}],"parameters":[{"name":"tenant_uuid","in":"path","required":true,"schema":{"type":"string","title":"Tenant Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconcileGrantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/invite-requests/{uuid}/approve":{"post":{"tags":["super-admin"],"summary":"Approve Invite Request","operationId":"approve_invite_request_super_admin_invite_requests__uuid__approve_post","security":[{"Bearer":[]}],"parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","title":"Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteRequestDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/invite-requests/{uuid}/reject":{"post":{"tags":["super-admin"],"summary":"Reject Invite Request","operationId":"reject_invite_request_super_admin_invite_requests__uuid__reject_post","security":[{"Bearer":[]}],"parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","title":"Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteRequestDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/system-api-keys":{"get":{"tags":["super-admin"],"summary":"List System Api Keys","description":"List all system API keys in the system.","operationId":"list_system_api_keys_super_admin_system_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemAPIKeyListResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"tags":["super-admin"],"summary":"Create System Api Key","description":"Create a new system API key.\n\n**Important**: The full API key is only shown once in this response.\nStore it securely - you won't be able to retrieve it again.","operationId":"create_system_api_key_super_admin_system_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemAPIKeyCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemAPIKeyCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"Bearer":[]}]}},"/super-admin/system-api-keys/{api_key_uuid}":{"delete":{"tags":["super-admin"],"summary":"Delete System Api Key","description":"Delete a system API key.","operationId":"delete_system_api_key_super_admin_system_api_keys__api_key_uuid__delete","security":[{"Bearer":[]}],"parameters":[{"name":"api_key_uuid","in":"path","required":true,"schema":{"type":"string","title":"Api Key Uuid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/system-api-keys/{api_key_uuid}/activate":{"patch":{"tags":["super-admin"],"summary":"Activate System Api Key","description":"Activate a system API key.","operationId":"activate_system_api_key_super_admin_system_api_keys__api_key_uuid__activate_patch","security":[{"Bearer":[]}],"parameters":[{"name":"api_key_uuid","in":"path","required":true,"schema":{"type":"string","title":"Api Key Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemAPIKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/system-api-keys/{api_key_uuid}/deactivate":{"patch":{"tags":["super-admin"],"summary":"Deactivate System Api Key","description":"Deactivate a system API key.","operationId":"deactivate_system_api_key_super_admin_system_api_keys__api_key_uuid__deactivate_patch","security":[{"Bearer":[]}],"parameters":[{"name":"api_key_uuid","in":"path","required":true,"schema":{"type":"string","title":"Api Key Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemAPIKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/ai/providers":{"get":{"tags":["super-admin"],"summary":"List Ai Providers","operationId":"list_ai_providers_super_admin_ai_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AIProviderResponse"},"type":"array","title":"Response List Ai Providers Super Admin Ai Providers Get"}}}}},"security":[{"Bearer":[]}]}},"/super-admin/ai/providers/{provider_uuid}":{"get":{"tags":["super-admin"],"summary":"Get Ai Provider","operationId":"get_ai_provider_super_admin_ai_providers__provider_uuid__get","security":[{"Bearer":[]}],"parameters":[{"name":"provider_uuid","in":"path","required":true,"schema":{"type":"string","title":"Provider Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["super-admin"],"summary":"Update Ai Provider","operationId":"update_ai_provider_super_admin_ai_providers__provider_uuid__patch","security":[{"Bearer":[]}],"parameters":[{"name":"provider_uuid","in":"path","required":true,"schema":{"type":"string","title":"Provider Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIProviderUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/ai/models":{"get":{"tags":["super-admin"],"summary":"List Ai Models","operationId":"list_ai_models_super_admin_ai_models_get","security":[{"Bearer":[]}],"parameters":[{"name":"provider_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Uuid"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AIModelResponse"},"title":"Response List Ai Models Super Admin Ai Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/ai/models/{model_uuid}":{"get":{"tags":["super-admin"],"summary":"Get Ai Model","operationId":"get_ai_model_super_admin_ai_models__model_uuid__get","security":[{"Bearer":[]}],"parameters":[{"name":"model_uuid","in":"path","required":true,"schema":{"type":"string","title":"Model Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["super-admin"],"summary":"Delete Ai Model","operationId":"delete_ai_model_super_admin_ai_models__model_uuid__delete","security":[{"Bearer":[]}],"parameters":[{"name":"model_uuid","in":"path","required":true,"schema":{"type":"string","title":"Model Uuid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/ai/models/{model_uuid}/pricing":{"get":{"tags":["super-admin"],"summary":"List Ai Model Pricing","operationId":"list_ai_model_pricing_super_admin_ai_models__model_uuid__pricing_get","security":[{"Bearer":[]}],"parameters":[{"name":"model_uuid","in":"path","required":true,"schema":{"type":"string","title":"Model Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AIModelPricingResponse"},"title":"Response List Ai Model Pricing Super Admin Ai Models  Model Uuid  Pricing Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["super-admin"],"summary":"Create Ai Model Pricing","description":"Create a new active pricing row for a model, atomically with variations.\n\nReturns 201 Created with the new row, or 200 OK with the existing active\nrow when the request is a no-op (all fields identical to the current\nactive row).\n\nNo-op comparison is always against the **active** row, not whichever row\nopened the dialog. Saving an inactive row's unchanged values still creates\na new active row (because the comparison with the current active row differs).\n\nWhen ``request.variations`` is provided, the variations are validated\nagainst the descriptor and persisted atomically. When omitted/None, the\nnew row has ``variations = None`` (no server-side carry-forward).","operationId":"create_ai_model_pricing_super_admin_ai_models__model_uuid__pricing_post","security":[{"Bearer":[]}],"parameters":[{"name":"model_uuid","in":"path","required":true,"schema":{"type":"string","title":"Model Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelPricingCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelPricingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/ai/pricing/{pricing_uuid}/activate":{"patch":{"tags":["super-admin"],"summary":"Activate Ai Model Pricing","description":"Promote an inactive pricing row to active (PATCH .../activate).\n\nSteps:\n  1. Load the target row (404 if not found).\n  2. Find all OTHER active rows for the same model; close them out.\n  3. Set target row is_active=True, effective_from=now, effective_until=NULL.\n  4. Commit. Return the activated row.\n\nThe target row's existing variations are carried forward as-is — re-activating\nan older row restores whatever variation configuration it had at the time it\nwas last active.","operationId":"activate_ai_model_pricing_super_admin_ai_pricing__pricing_uuid__activate_patch","security":[{"Bearer":[]}],"parameters":[{"name":"pricing_uuid","in":"path","required":true,"schema":{"type":"string","title":"Pricing Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelPricingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/ai/pricing/{pricing_uuid}":{"delete":{"tags":["super-admin"],"summary":"Delete Ai Model Pricing","operationId":"delete_ai_model_pricing_super_admin_ai_pricing__pricing_uuid__delete","security":[{"Bearer":[]}],"parameters":[{"name":"pricing_uuid","in":"path","required":true,"schema":{"type":"string","title":"Pricing Uuid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/ai/registry/providers":{"get":{"tags":["super-admin"],"summary":"List Registry Providers","description":"List all provider slugs available in ai-providers.","operationId":"list_registry_providers_super_admin_ai_registry_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProviderRegistryEntry"},"type":"array","title":"Response List Registry Providers Super Admin Ai Registry Providers Get"}}}}},"security":[{"Bearer":[]}]}},"/super-admin/ai/registry/workflows":{"get":{"tags":["super-admin"],"summary":"List Registry Workflows","description":"List workflow descriptors from the ai-providers catalog.\n\nFiltered to image-to-image and image-to-video by default.\nPass ?kinds=text-to-image or ?kinds=all to override.","operationId":"list_registry_workflows_super_admin_ai_registry_workflows_get","security":[{"Bearer":[]}],"parameters":[{"name":"kinds","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of modality kinds to include. Defaults to 'image-to-image,image-to-video' when omitted.","title":"Kinds"},"description":"Comma-separated list of modality kinds to include. Defaults to 'image-to-image,image-to-video' when omitted."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowRegistryEntry"},"title":"Response List Registry Workflows Super Admin Ai Registry Workflows Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/ai/registry/install":{"post":{"tags":["super-admin"],"summary":"Install Registry Workflow","description":"Install a workflow descriptor as an AIModel + ModelPricing row.","operationId":"install_registry_workflow_super_admin_ai_registry_install_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallRegistryRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"Bearer":[]}]}},"/super-admin/ai/registry/{workflow_id}":{"delete":{"tags":["super-admin"],"summary":"Uninstall Registry Workflow","description":"Idempotent uninstall by workflow_id (= model.slug).\n\nDeletes the matching AIModel row and cascade-deletes all associated\nModelPricing rows. Returns 204 whether or not the model existed.","operationId":"uninstall_registry_workflow_super_admin_ai_registry__workflow_id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/ai/providers/{provider_uuid}/test-connection":{"post":{"tags":["super-admin"],"summary":"Test Ai Provider Connection","description":"Probe provider reachability via the ai-test-connection worker flow.\n\nTriggers the ``ai-test-connection`` Prefect deployment (ai-pool) with the\nprovider's slug and polls the run to a terminal state (~60s budget).\nThe flow runs ``Credentials.from_env()`` +\n``PROVIDER_FACTORIES[slug].build()`` + ``test_connection(force=True)`` on\nthe worker — the same three lines the backend used to run in-process —\nand reports the resulting ConnectionResult-shaped ``{kind, detail}`` dict\nas its Completed state message. Provider credentials now live on the\nworker (Infisical) only; the backend holds none and imports nothing from\nthe runtime ``ai_providers`` package.\n\nNever raises HTTP 500 for an unhealthy/unreachable provider, a Prefect\noutage, or a run that fails/times out — all surface as\n``kind=\"transport_failed\"`` so the admin UI renders a red badge instead\nof a stack trace.","operationId":"test_ai_provider_connection_super_admin_ai_providers__provider_uuid__test_connection_post","security":[{"Bearer":[]}],"parameters":[{"name":"provider_uuid","in":"path","required":true,"schema":{"type":"string","title":"Provider Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIProviderTestConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/ai/models/{model_uuid}/status":{"patch":{"tags":["super-admin"],"summary":"Patch Ai Model Status","description":"Narrow status-only PATCH.\n\nAccepts `{status: 'active'|'preview'|'disabled'|'deprecated'}`. Free-form\nJSONB blob editing via the broad PATCH has been removed.","operationId":"patch_ai_model_status_super_admin_ai_models__model_uuid__status_patch","security":[{"Bearer":[]}],"parameters":[{"name":"model_uuid","in":"path","required":true,"schema":{"type":"string","title":"Model Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelStatusUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/ai/models/{model_uuid}/re-derive":{"post":{"tags":["super-admin"],"summary":"Re Derive Ai Model Billing","description":"Re-compute billing_unit / billing_meter from the current descriptor.\n\nThis is the only post-install writer of the two snapshot columns.\nReturns 404 when the model is orphaned (descriptor no longer available).\nOn success, overwrites both snapshot columns and returns the updated row.\n\nThe operation is unconditional — no ?apply_meter flag is needed because\nre-derive is an explicit admin action that always applies both values.","operationId":"re_derive_ai_model_billing_super_admin_ai_models__model_uuid__re_derive_post","security":[{"Bearer":[]}],"parameters":[{"name":"model_uuid","in":"path","required":true,"schema":{"type":"string","title":"Model Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/ai/models/{model_uuid}/pricing/{pricing_uuid}/variations":{"put":{"tags":["super-admin"],"summary":"Update Ai Model Pricing Variations","description":"PUT variations on a specific pricing row.\n\nSteps:\n  1. Resolve model (404 if not found).\n  2. Resolve pricing (404 if not found, 409 if pricing.model_uuid != model.uuid).\n  3. Resolve descriptor (4xx orphan message if missing).\n  4. Validate + type-coerce via _validate_and_coerce_variations.\n  5. Persist via pricing.variations = coerced_list; commit.\n  6. Return updated pricing row (no warnings — negative cost is a hard error).","operationId":"update_ai_model_pricing_variations_super_admin_ai_models__model_uuid__pricing__pricing_uuid__variations_put","security":[{"Bearer":[]}],"parameters":[{"name":"model_uuid","in":"path","required":true,"schema":{"type":"string","title":"Model Uuid"}},{"name":"pricing_uuid","in":"path","required":true,"schema":{"type":"string","title":"Pricing Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelPricingUpdateVariationsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelPricingUpdateVariationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/ai/models/{model_uuid}/pricing-summary":{"get":{"tags":["super-admin"],"summary":"Get Ai Model Pricing Summary","description":"GET pricing summary for a model.\n\nSteps:\n  1. Resolve model via _get_model_or_404.\n  2. Load the active ModelPricing row. If none → 409.\n  3. Resolve descriptor via _resolve_descriptor. If None → 422 (orphan).\n  4. Call compute_pricing_summary and return the dict.","operationId":"get_ai_model_pricing_summary_super_admin_ai_models__model_uuid__pricing_summary_get","security":[{"Bearer":[]}],"parameters":[{"name":"model_uuid","in":"path","required":true,"schema":{"type":"string","title":"Model Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Ai Model Pricing Summary Super Admin Ai Models  Model Uuid  Pricing Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/job-runs":{"get":{"tags":["super-admin"],"summary":"List Super Admin Job Runs","description":"List job runs across every tenant.\n\n``tenant_uuid`` is a client-supplied FILTER here, not an authorisation\nboundary -- safe only because this route sits behind ``SuperAdminDep``\nand lives on a distinct route from the tenant one. The ``env:`` tag\nfilter still applies (a super-admin sees the whole config, not the\nwhole shared fleet); there is deliberately no ``env`` override parameter.\n\n``asset_uuid`` narrows the tag filter the same way it does on the tenant\nsurface, and drives one batched ``resolve_asset_names`` call scoped by\n``tenant_uuid`` -- ``None`` when no tenant filter was supplied, so an\nasset in ANY tenant resolves. Unlike the tenant route, this DTO gains no\n``asset_filter`` echo (no admin chip -- deliberate).","operationId":"list_super_admin_job_runs_super_admin_job_runs_get","security":[{"Bearer":[]}],"parameters":[{"name":"tenant_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional filter -- omit for every tenant","title":"Tenant Uuid"},"description":"Optional filter -- omit for every tenant"},{"name":"bucket","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/JobBucket"},"description":"Repeatable: pending|running|completed|failed","default":[],"title":"Bucket"},"description":"Repeatable: pending|running|completed|failed"},{"name":"job_type","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Repeatable job_type filter","default":[],"title":"Job Type"},"description":"Repeatable job_type filter"},{"name":"deployment_name","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Repeatable deployment name filter","default":[],"title":"Deployment Name"},"description":"Repeatable deployment name filter"},{"name":"job_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact job_uuid match","title":"Job Uuid"},"description":"Exact job_uuid match"},{"name":"asset_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact asset_uuid match","title":"Asset Uuid"},"description":"Exact asset_uuid match"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Defaults to until-30d","title":"Since"},"description":"Defaults to until-30d"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Defaults to now","title":"Until"},"description":"Defaults to now"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Capped server-side at 100","default":25,"title":"Limit"},"description":"Capped server-side at 100"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"include_total","in":"query","required":false,"schema":{"type":"boolean","description":"Skip the /flow_runs/count call when false","default":true,"title":"Include Total"},"description":"Skip the /flow_runs/count call when false"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuperAdminRunPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/job-runs/{flow_run_id}":{"get":{"tags":["super-admin"],"summary":"Get Super Admin Job Run","description":"One job run's full detail, any tenant.\n\nA run outside the (optional) ``tenant_uuid`` filter and a genuinely\nunknown run id produce an IDENTICAL 404 -- the id is pushed into the\nsame tag-filtered Prefect query rather than fetched then compared.\n``prefect_ui_url`` is populated here -- the one field difference from the\ntenant route's ``JobRunDetail`` beyond ``tenant_uuid`` itself.","operationId":"get_super_admin_job_run_super_admin_job_runs__flow_run_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"flow_run_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Run Id"}},{"name":"tenant_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional filter","title":"Tenant Uuid"},"description":"Optional filter"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuperAdminJobRunDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/job-runs/{flow_run_id}/logs":{"get":{"tags":["super-admin"],"summary":"Get Super Admin Job Run Logs","description":"Cursor-tailable Prefect logs for one job, any tenant.\n\nEntered through the SAME visibility gate as the tenant route -- a\n``tenant_uuid`` filter narrows which runs match the gate's direct-tag\ntier, but the gate mechanism itself is unchanged.","operationId":"get_super_admin_job_run_logs_super_admin_job_runs__flow_run_id__logs_get","security":[{"Bearer":[]}],"parameters":[{"name":"flow_run_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Run Id"}},{"name":"tenant_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional filter","title":"Tenant Uuid"},"description":"Optional filter"},{"name":"level_ge","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":0,"description":"0/10/20/30/40","default":20,"title":"Level Ge"},"description":"0/10/20/30/40"},{"name":"include_task_logs","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Task Logs"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Tail cursor","title":"After"},"description":"Tail cursor"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Capped server-side at 500","default":200,"title":"Limit"},"description":"Capped server-side at 500"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Ignored when `after` is supplied","default":0,"title":"Offset"},"description":"Ignored when `after` is supplied"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/job-runs/{flow_run_id}/cancel":{"post":{"tags":["super-admin"],"summary":"Cancel Super Admin Job Run","description":"Operator cancel.\n\nReuses ``PrefectQueryService.cancel_run`` UNMODIFIED with\n``stamp_marker=False`` -- so NO ``cancel:*`` tag is ever written on this\npath, and the run's eventual ``CANCELLED`` terminal takes the unchanged\n``release`` branch (never ``settle``) regardless of whether the run had\nstarted. ``billed`` is therefore always ``null`` in the response.\n\n``body.expected_billing`` is deliberately never read here -- the\nstale-dialog guard on the tenant route exists to protect a UI promise\nmade to a tenant user; an operator action makes no such promise and\nstamps no marker to keep it in the first place. Cascade still applies,\nreused unmodified.","operationId":"cancel_super_admin_job_run_super_admin_job_runs__flow_run_id__cancel_post","security":[{"Bearer":[]}],"parameters":[{"name":"flow_run_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Run Id"}},{"name":"tenant_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional filter","title":"Tenant Uuid"},"description":"Optional filter"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelJobRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/job-runs/{flow_run_id}/force-resolve":{"post":{"tags":["super-admin"],"summary":"Force Resolve Super Admin Job Run","description":"Stuck-``CANCELLING`` operator lever.\n\nSets the run's state DIRECTLY to terminal ``CANCELLED``. Always\nRELEASES, including when a tenant's billable cancel preceded the\nstuckness: any pre-existing ``cancel:*`` marker is stripped before the\nterminal state is set, so the terminal webhook's ``release`` branch\napplies unconditionally, exactly as the ordinary super-admin cancel\nabove.\n\nOnly accepts a run CURRENTLY in ``CANCELLING`` -- any other state\nreturns ``409 {\"code\": \"not_cancelling\"}`` without touching Prefect's\n``set_state`` at all (this is a stuck-state lever, not a second cancel\npath; a merely-cancellable run must go through the ordinary cancel route\ninstead). A non-``ACCEPT`` orchestration result on the forced transition\nis reported honestly as ``409 {\"code\": \"force_resolve_rejected\"}`` rather\nthan a lying ``200``. Absent from the tenant router entirely -- this\nlever is super-admin only.","operationId":"force_resolve_super_admin_job_run_super_admin_job_runs__flow_run_id__force_resolve_post","security":[{"Bearer":[]}],"parameters":[{"name":"flow_run_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Run Id"}},{"name":"tenant_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional filter","title":"Tenant Uuid"},"description":"Optional filter"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForceResolveJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/webhook-logs":{"get":{"tags":["super-admin"],"summary":"List Webhook Event Logs","description":"Paginated, newest-first list of webhook delivery log rows.\n\nNever returns ``payload`` -- Stripe payloads are large and carry customer\nPII (email, billing address). Use the detail route for that.\n\n``attempt_number`` / ``attempt_count`` are window functions over\n``stripe_event_id``, computed over THIS filtered result set (not the\nwhole table) -- applying a filter such as ``processed`` narrows what\ncounts as an \"attempt\" in the same way it narrows what is returned.","operationId":"list_webhook_event_logs_super_admin_webhook_logs_get","security":[{"Bearer":[]}],"parameters":[{"name":"event_type","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Repeatable exact event_type filter","default":[],"title":"Event Type"},"description":"Repeatable exact event_type filter"},{"name":"processed","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Three-state filter","title":"Processed"},"description":"Three-state filter"},{"name":"has_error","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter on error IS/ISN'T set","title":"Has Error"},"description":"Filter on error IS/ISN'T set"},{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"enum":["succeeded","retrying","gave_up"],"type":"string"},{"type":"null"}],"description":"Derived tri-state filter (succeeded/retrying/gave_up) -- a shortcut over processed + has_error for the one combination an operator actually thinks in","title":"Outcome"},"description":"Derived tri-state filter (succeeded/retrying/gave_up) -- a shortcut over processed + has_error for the one combination an operator actually thinks in"},{"name":"stripe_event_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact match -- pulls every delivery attempt","title":"Stripe Event Id"},"description":"Exact match -- pulls every delivery attempt"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"created_at lower bound","title":"Since"},"description":"created_at lower bound"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"created_at upper bound","title":"Until"},"description":"created_at upper bound"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Capped server-side at 100","default":25,"title":"Limit"},"description":"Capped server-side at 100"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEventLogPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/webhook-logs/{uuid}":{"get":{"tags":["super-admin"],"summary":"Get Webhook Event Log","description":"One webhook log row, including the full ``payload``.","operationId":"get_webhook_event_log_super_admin_webhook_logs__uuid__get","security":[{"Bearer":[]}],"parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","title":"Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEventLogDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/flows/health":{"get":{"tags":["Flows"],"summary":"Check Prefect API connectivity","description":"Ping the Prefect API and return its version/status.","operationId":"prefect_health_flows_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Prefect Health Flows Health Get"}}}}}}},"/flows/{flow_run_id}/status":{"get":{"tags":["Flows"],"summary":"Get flow run status","description":"Get the status of a Prefect flow run.\n\nTenant-scoped: all flows triggered by PrefectService include tenant_uuid\nin their parameters. Any flow run whose parameters.tenant_uuid does not\nmatch the caller's tenant is treated as 404, so flow-run IDs cannot be\nused to probe other tenants' jobs.","operationId":"get_flow_status_flows__flow_run_id__status_get","parameters":[{"name":"flow_run_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Flow Status Flows  Flow Run Id  Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/invite-requests":{"post":{"tags":["Public"],"summary":"Request an invite (public)","description":"Public: record a PENDING invite request. No email is sent — a\nsuper-admin reviews requests in-app. A duplicate email that is already in\nthe pipeline (pending/approved/activated) or already has an account → 409,\nwhich the frontend renders as success. A REJECTED email may reapply.","operationId":"submit_invite_request_public_invite_requests_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteRequestCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteRequestSubmitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/invite-requests/{activation_token}/activate":{"post":{"tags":["Public"],"summary":"Activate an approved invite — set password and log in","description":"Public: an approved applicant sets a password and is provisioned +\nlogged in. Provisioning (user + personal tenant + Stripe customer) happens\nhere, not at approval — so an approved-but-never-activated request leaves\nnothing to clean up.","operationId":"activate_invite_request_public_invite_requests__activation_token__activate_post","parameters":[{"name":"activation_token","in":"path","required":true,"schema":{"type":"string","title":"Activation Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateRequest"}}}},"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"}}}}}}},"/public/upload":{"post":{"tags":["Public"],"summary":"Upload GLB file with email only","description":"Upload a GLB file using only an email address - no account registration required.\n\n    **Features:**\n    - Auto-creates user and tenant if email doesn't exist\n    - Sends verification email (non-blocking)\n    - Creates publicly viewable asset\n    - Triggers thumbnail generation\n    - Returns shareable public URL\n\n    **File Requirements:**\n    - Must be a .glb file\n    - Maximum size: 50MB\n\n    **Response:**\n    - `asset_uuid`: Unique identifier for the asset\n    - `public_url`: Shareable URL for viewing the asset\n    - `user_created`: Whether a new user was created\n    - `verification_sent`: Whether verification email was sent","operationId":"upload_public_asset_public_upload_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_upload_public_asset_public_upload_post"}}},"required":true},"responses":{"201":{"description":"GLB file uploaded successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUploadResponse"},"example":{"asset_uuid":"123e4567-e89b-12d3-a456-426614174000","public_url":"https://scene.app/public/123e4567-e89b-12d3-a456-426614174000","user_created":true,"verification_sent":true}}}},"400":{"description":"Invalid file type or size"},"500":{"description":"Upload failed"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/upload-complete":{"post":{"tags":["Public"],"summary":"Complete a public .blend upload — triggers SHA-256 hashing","description":"Second step of the two-step public .blend upload flow.\n\n    Must be called by the client AFTER the S3 PUT succeeds.  Streams the\n    uploaded object back from S3, computes SHA-256, and publishes the\n    ``AssetVersion``.  Until this endpoint is called, the version remains in\n    ``status='hashing'`` and is invisible to the Blender plugin.\n\n    Idempotent: calling it a second time on an already-published version\n    returns the current state without re-hashing.","operationId":"public_upload_complete_public_upload_complete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUploadCompleteRequest"}}},"required":true},"responses":{"200":{"description":"Version published with SHA-256 populated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUploadCompleteResponse"}}}},"404":{"description":"AssetVersion not found"},"409":{"description":"Version in unexpected status"},"500":{"description":"S3 read or hash failure"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/{asset_uuid}":{"get":{"tags":["Public"],"summary":"View public asset","description":"View a publicly shared 3D asset - no authentication required.\n\n    **Features:**\n    - Returns asset metadata and media files\n    - Generates presigned download URLs for media\n    - Only shows assets with public visibility\n    - Read-only access (cannot edit or delete)\n\n    **Media Types:**\n    - `file`: Main GLB file\n    - `thumbnail`: Generated thumbnail image\n    - Additional formats may be available","operationId":"view_public_asset_public__asset_uuid__get","parameters":[{"name":"asset_uuid","in":"path","required":true,"schema":{"type":"string","title":"Asset Uuid"}}],"responses":{"200":{"description":"Asset details with media URLs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAssetResponse"},"example":{"uuid":"123e4567-e89b-12d3-a456-426614174000","name":"My 3D Model","media":[{"role":"file","format":"glb","url":"https://s3.amazonaws.com/bucket/path?signature=...","mime":"model/gltf-binary"},{"role":"thumbnail","format":"png","url":"https://s3.amazonaws.com/bucket/thumb?signature=...","mime":"image/png"}],"can_edit":false,"can_delete":false,"created_at":"2025-01-04T20:00:00Z"}}}},"404":{"description":"Asset not found or not public"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ai/models":{"get":{"tags":["AI Catalog"],"summary":"List catalog AI models allowed for the authenticated tenant","description":"List catalog models allowed for the authenticated tenant.\n\nReturns only models that are (a) globally active (or the requested status),\n(b) from an active provider, and (c) on the tenant's ``ai-generation``\nmodule allowlist.  When the module is disabled for the tenant, returns an\nempty list.\n\nClients can filter by ``provider_slug`` or by inspecting the returned\n``input_schema`` to decide which models fit their UI. There is no\n``adapter`` filter — all registry-installed models use the same\nai_providers adapter.","operationId":"list_ai_models_public_api_ai_models_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status (active|preview|disabled|deprecated). Defaults to showing only active.","title":"Status"},"description":"Filter by status (active|preview|disabled|deprecated). Defaults to showing only active."},{"name":"provider_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by provider slug","title":"Provider Slug"},"description":"Filter by provider slug"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AIModelPublic"},"title":"Response List Ai Models Public Api Ai Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ai/models/{model_uuid}":{"get":{"tags":["AI Catalog"],"summary":"Get a single catalog AI model (tenant-scoped)","description":"Get a single catalog model, scoped to the authenticated tenant's allowlist.\n\nReturns 404 when the model does not exist or when it is not on the\ntenant's allowlist (so the tenant cannot enumerate un-allowed model UUIDs\nby probing this endpoint).","operationId":"get_ai_model_public_api_ai_models__model_uuid__get","parameters":[{"name":"model_uuid","in":"path","required":true,"schema":{"type":"string","title":"Model Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelPublic"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/asset-types":{"get":{"tags":["Asset Types"],"summary":"List Asset Types","description":"Return Asset Types enabled for the requesting tenant.\n\nWhen ``?for=upload`` is provided, further filters to ``user_uploadable=True``.\nThe implicit \"None (standard asset)\" choice is injected client-side by the\nupload form — this endpoint never returns a null/none sentinel entry.\n\nResponse shape per item::\n\n    {\n        \"uuid\": \"...\",\n        \"slug\": \"floorplan\",\n        \"display_name\": \"Floorplan\",\n        \"user_uploadable\": true,\n        \"module_uuid\": \"...\",\n        \"module_slug\": \"inresi\",\n        \"has_render_settings\": true,\n        \"supports_external_id_import\": true,\n        \"external_id_placeholder\": \"CMS ID (e.g. 12345)\"\n    }\n\nThe three capability fields are computed server-side from the owning\nmodule's manifest via the in-process registry — never a\nmodule slug the frontend is expected to compare against. Applies to both\nbranches below (``?for=upload`` and the plain listing) — both already\nyield ``(AssetType, Module)`` rows, so the registry lookup is scoped\ncorrectly with no extra query.","operationId":"list_asset_types_api_asset_types_get","parameters":[{"name":"for","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"For"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"},"title":"Response List Asset Types Api Asset Types Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/asset-types/{asset_type_uuid}/view-controls":{"get":{"tags":["Asset Types"],"summary":"Get View Controls","description":"Return the view-controls schema for an asset type.\n\nThe requesting tenant must have the owning module enabled (tenant-scoped\nboundary).  Returns ``{}`` for asset types with no ``view_controls`` hook\ndeclared.\n\nReturns 404 when:\n- the asset type UUID does not exist, or\n- the requesting tenant does not have the owning module enabled.","operationId":"get_view_controls_api_asset_types__asset_type_uuid__view_controls_get","parameters":[{"name":"asset_type_uuid","in":"path","required":true,"schema":{"type":"string","title":"Asset Type Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get View Controls Api Asset Types  Asset Type Uuid  View Controls Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/asset-types/{asset_type_uuid}/render-workflows":{"get":{"tags":["Asset Types"],"summary":"Get Render Workflows","description":"Return the named render workflows declared for an asset type.\n\nThe requesting tenant must have the owning module enabled (tenant-scoped\nboundary).  Returns ``[]`` for asset types with no ``custom_render_flows``\ndeclared — the manifest stays the single source of truth, there is no DB\ncolumn mirroring this.\n\nResponse shape per item: ``{\"key\": \"...\", \"display_name\": \"...\",\n\"supports_furniture_style\": bool, \"supports_low_quality\": bool,\n\"uses_tenant_render_settings\": bool, \"default_upload_results\": bool,\n\"token_cost\": int, \"priced\": bool}`` (the three capability booleans are\nindependent declarations, not one \"is this vortic\" flag;\n``default_upload_results`` is the dialog's Upload Results checkbox\ninitial state — e.g. ``False`` for vortic's ``hdr_lightmap``;\n``token_cost``/``priced`` are the calling tenant's effective render\nprice for that named render, resolved through the same batch resolver\nthe charge path uses — never a ``source`` or ``pricing_uuid`` field, so\nthe tenant can't tell which layer produced the price).\n\nReturns 404 when:\n- the asset type UUID does not exist, or\n- the requesting tenant does not have the owning module enabled.","operationId":"get_render_workflows_api_asset_types__asset_type_uuid__render_workflows_get","parameters":[{"name":"asset_type_uuid","in":"path","required":true,"schema":{"type":"string","title":"Asset Type Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"},"title":"Response Get Render Workflows Api Asset Types  Asset Type Uuid  Render Workflows Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/asset-types/{asset_type_uuid}/render-settings":{"get":{"tags":["Asset Types"],"summary":"Get Asset Type Render Settings","description":"Read-only per-asset-type alias for the tenant's effective render settings.\n\nLets a caller holding only an ``asset_type_uuid`` (no module slug) read\nthe same data ``GET /modules/{module_slug}/render-settings`` serves —\ne.g. ``NamedRenderDialog``'s \"Settings that will be used\" preview, which\nknows ``assetTypeUuid`` but cannot resolve a module slug without mounting\n``TenantProvider``. The tenant-admin read+write form keeps using\n``/modules/{module_slug}/render-settings`` directly, taking the slug from\n``TenantAssetType.module_slug`` as data it already has.\n\nSame tenant-scoping join as view-controls / render-workflows above (404\nwhen the asset type doesn't exist or the tenant doesn't have the owning\nmodule enabled), plus a further 404 when the owning module declares no\nsettings model — mirroring ``get_render_settings``'s first two steps\n(``app/api/tenants/render_settings/get.py``). No admin gate: this route\nis read-only, so it is exactly as sensitive as view-controls/render-workflows.","operationId":"get_asset_type_render_settings_api_asset_types__asset_type_uuid__render_settings_get","parameters":[{"name":"asset_type_uuid","in":"path","required":true,"schema":{"type":"string","title":"Asset Type Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/module-context/{asset_uuid}":{"get":{"tags":["Asset Types"],"summary":"Get Module Context","description":"Internal endpoint used by the Prefect worker's ``load_module_context`` task.\n\nReturns 204 (no body) when the asset has no active module context\n(asset_type_uuid IS NULL, or tenant has no enabled module for the type).\n\nReturns 200 with a JSON body when a module context is active.","operationId":"get_module_context_api_module_context__asset_uuid__get","parameters":[{"name":"asset_uuid","in":"path","required":true,"schema":{"type":"string","title":"Asset Uuid"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/assets/{asset_uuid}/linked-assets":{"patch":{"tags":["Asset Types"],"summary":"Patch Linked Assets","description":"Write (replace, idempotent) ``Asset.linked_asset_uuids``.\n\nCalled by hook (d) runner after successful link resolution.  The list is\nstored as-is; callers should de-duplicate before calling.\n\n``linked_refs`` is optional: when omitted, any existing\n``Asset.meta.linked_refs`` is left untouched (back-compat with callers\nthat only send the bare UUID list); when provided, it idempotently\nreplaces the ``linked_refs`` key in ``Asset.meta`` — other ``meta`` keys\n(e.g. ``external_id``) are preserved.","operationId":"patch_linked_assets_api_assets__asset_uuid__linked_assets_patch","parameters":[{"name":"asset_uuid","in":"path","required":true,"schema":{"type":"string","title":"Asset Uuid"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_LinkedAssetsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/jobs":{"post":{"tags":["Jobs"],"summary":"Create a job","description":"Create and enqueue a new job.\n\nAccepts the uniform job envelope::\n\n    {\n        \"job_type\": \"render\" | \"format_conversion\" | \"ai_generation\",\n        \"target\": { \"target_type\": \"asset\"|\"model\", ... },\n        \"params\":  { \"params_type\": \"<job_type>\", ... },\n        \"metadata\": { \"source\": \"<surface>\" },   # optional\n        \"parent_job_uuid\": null                  # optional retry control\n    }\n\nThe old flat per-type shape is rejected (hard cutover, no compat window).\n``job_type`` must match ``params.params_type``.\n\nReturns ``{job_uuid, flow_run_id}`` — the UI subscribes to Supabase\n``flow_events`` filtered by ``flow_run_id`` to track progress and receive\nthe presigned result URLs when the job completes.\n\nError codes:\n\n- **402** — insufficient token balance (``code: \"insufficient_tokens\"``).\n- **409** — no active pricing for the requested AI model, or an active\n  job already exists for this ``(asset_uuid, job_type)`` combination\n  (``code: \"active_job_exists\"``).\n- **503** — Prefect failed to accept the flow-run request; token hold\n  has already been released.","operationId":"create_job_jobs_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateJobRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Jobs"],"summary":"List jobs","description":"List the caller's tenant's job runs.\n\nTenant scoping is structural: ``RunScope.for_tenant`` is built ONLY from\n``auth``'s ``(user, tenant_uuid)`` tuple. A client-supplied ``tenant_uuid``\nquery parameter (not declared above) is simply ignored by FastAPI rather\nthan bound to anything — it can never change which tenant's runs come\nback.\n\nThe response echoes the *resolved* ``window`` so the client can freeze\nthe top of the result set across subsequent page requests (pagination\nwithout a local table): re-send the same ``until`` on every later page;\nan explicit refresh omits ``until`` to re-anchor. The list shows\ntop-level runs only — a nested run is reachable via\n``/{flow_run_id}/children``, never as a free-standing row here.\n``asset_uuid`` is ANDed onto the mandatory tenant/env tag set and echoed\nback as ``asset_filter`` when supplied. ``render_type`` is likewise\nANDed on, single-valued — unlike ``job_type``, which is repeatable and\nOR'd via the filter's other combinator slot.","operationId":"list_jobs_jobs_get","parameters":[{"name":"bucket","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/JobBucket"},"description":"Repeatable: pending|running|completed|failed","default":[],"title":"Bucket"},"description":"Repeatable: pending|running|completed|failed"},{"name":"job_type","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Repeatable job_type filter","default":[],"title":"Job Type"},"description":"Repeatable job_type filter"},{"name":"deployment_name","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Repeatable deployment name filter","default":[],"title":"Deployment Name"},"description":"Repeatable deployment name filter"},{"name":"job_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact job_uuid match","title":"Job Uuid"},"description":"Exact job_uuid match"},{"name":"asset_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact asset_uuid match","title":"Asset Uuid"},"description":"Exact asset_uuid match"},{"name":"render_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact render_type match. Single-valued (unlike the repeatable job_type filter above) — ANDed into the mandatory tag set, not OR'd.","title":"Render Type"},"description":"Exact render_type match. Single-valued (unlike the repeatable job_type filter above) — ANDed into the mandatory tag set, not OR'd."},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Defaults to until-30d","title":"Since"},"description":"Defaults to until-30d"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Defaults to now","title":"Until"},"description":"Defaults to now"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Capped server-side at 100","default":25,"title":"Limit"},"description":"Capped server-side at 100"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"include_total","in":"query","required":false,"schema":{"type":"boolean","description":"Skip the /flow_runs/count call when false","default":true,"title":"Include Total"},"description":"Skip the /flow_runs/count call when false"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/jobs/{flow_run_id}":{"get":{"tags":["Jobs"],"summary":"Get job detail","description":"Get one job's full detail.\n\nA run belonging to another tenant and a run that does not exist produce\nan IDENTICAL 404 — the run id is pushed into the tenant-tag-filtered\nPrefect query rather than fetched then compared, so there is no\nexistence oracle. ``prefect_ui_url`` is always ``None`` on this\ntenant route. Raw ``parameters`` are never echoed — only\n``parameters_summary``.","operationId":"get_job_jobs__flow_run_id__get","parameters":[{"name":"flow_run_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRunDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/jobs/{flow_run_id}/children":{"get":{"tags":["Jobs"],"summary":"List a job's direct child runs","description":"Direct children (one level) of an already-verified parent.\n\nEntered ONLY through ``PrefectQueryService.verify_visible`` — a client\ncan never name a child directly and have it returned; it can only\nenumerate descendants of a run it already owns. Tag propagation means\nthis is where the ``asset:`` tag earns its keep on the read side: a\nchild reliably carries it even when its own parameters never mentioned\nthe asset.\n\nThis route stays DELIBERATELY, even though ``GET /{flow_run_id}/tree``\nnow returns the same information as part of the whole subtree: it is a\ndocumented API surface in its own right, and its body builder\n(``build_children_body``) is exactly what the tree walk's own\n``parent_flow_run_id`` channel reuses.","operationId":"get_job_children_jobs__flow_run_id__children_get","parameters":[{"name":"flow_run_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRunChildrenPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/jobs/{flow_run_id}/tree":{"get":{"tags":["Jobs"],"summary":"Get a job's entire descendant subtree","description":"The root plus every descendant of an already-verified run, in one\nresponse — the whole tree the unified log viewer's Gantt chart renders.\n\nEntered ONLY through the same visibility gate as ``/children``. The id\nset is derived server-side by ``PrefectQueryService.collect_subtree``\nfrom the ``VerifiedRun`` alone — the client never supplies a run-id\nlist at all. ``nodes[0]`` is always the root itself, so\n``JobRunDetail`` needs no provenance field of its own: the page reads\nthe root's chip out of this same response.\n\nProvenance resolution applies ``worker_provenance.parse_provenance`` to\neach node's matching raw log rows and, via ``build_job_run_node``,\nconsults the tenant-redaction predicate exactly once per node — the ONLY\nplace in this route the predicate is read.","operationId":"get_job_tree_jobs__flow_run_id__tree_get","parameters":[{"name":"flow_run_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRunTree"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/jobs/{flow_run_id}/logs":{"get":{"tags":["Jobs"],"summary":"Get a job's Prefect logs","description":"Cursor-tailable Prefect logs for one job.\n\nEntered ONLY through the same visibility gate as ``/children``.\n``cursor`` is the timestamp of the last returned row, so a subsequent\ntail fetch (passing it as ``after``) fetches only deltas.\n\n``descendants=true`` is a MODE on this same route, not a new one — the\nvisibility gate, the 404 body, the ``no-store`` header and the\n``prefect_unavailable`` mapping are shared rather than re-implemented.\nIn that mode the id set is derived server-side from the same\n``VerifiedRun`` via ``PrefectQueryService.collect_subtree``, never from\nanything the client sends, and every returned row carries the\n``flow_run_id`` that emitted it. Without ``descendants``, the response is byte-identical to\ntoday's.\n\n``run_ids`` narrows that same subtree fetch to a\ncaller-supplied id subset, with no ``after`` cursor, so a tree poll that\ndiscovers new children can backfill just their pre-cursor history\ninstead of re-fetching the whole merged subtree. It is intersected with\nthe server-derived subtree id set below -- an id outside that set is\nsilently dropped, never honoured -- so it can only ever narrow a fetch\nthe caller was already entitled to, never widen one. Supplying\n``run_ids`` whose intersection with the subtree is empty returns an\nempty page; it never falls back to the full subtree, since that would\nsilently undo the scoping a caller asked for. ``run_ids`` is simply not\nread when ``descendants`` is false.","operationId":"get_job_logs_jobs__flow_run_id__logs_get","parameters":[{"name":"flow_run_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Run Id"}},{"name":"level_ge","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":0,"description":"0/10/20/30/40","default":20,"title":"Level Ge"},"description":"0/10/20/30/40"},{"name":"include_task_logs","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Task Logs"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Tail cursor","title":"After"},"description":"Tail cursor"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Capped server-side at 200","default":200,"title":"Limit"},"description":"Capped server-side at 200"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Ignored when `after` is supplied","default":0,"title":"Offset"},"description":"Ignored when `after` is supplied"},{"name":"descendants","in":"query","required":false,"schema":{"type":"boolean","description":"Merge logs across the run's entire descendant subtree","default":false,"title":"Descendants"},"description":"Merge logs across the run's entire descendant subtree"},{"name":"run_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Repeatable: scope the descendants=true fetch to these run ids for the new-child backfill. Ignored outside descendants=true. Always intersected with the caller's own verified subtree server-side -- never a substitute for it.","default":[],"title":"Run Ids"},"description":"Repeatable: scope the descendants=true fetch to these run ids for the new-child backfill. Ignored outside descendants=true. Always intersected with the caller's own verified subtree server-side -- never a substitute for it."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/jobs/{flow_run_id}/cancel":{"post":{"tags":["Jobs"],"summary":"Cancel a job","description":"Cancel one of the caller's tenant's job runs, cascading to its entire\ndescendant tree.\n\nAuth is ``CurrentUserOrAPIKeyDep`` -- any tenant member, not gated on\n``CurrentAdminDep``. A foreign or unknown ``flow_run_id`` produces the\nSAME 404 body as the read routes -- no existence oracle -- and neither\na tag write nor a ``set_state`` is ever attempted for it, because the\n``expected_billing`` guard below and ``PrefectQueryService.cancel_run``\nboth push the id INTO a tenant-tag-filtered query rather than fetching\nthen comparing.\n\nThe ``expected_billing`` guard runs BEFORE any tag write or\n``set_state``: it re-derives the billing outcome the cancel is about to\napply -- keyed on the run's OWN held amount via ``_get_job_hold_amount``\n(the same one-row indexed ``:hold`` lookup the detail route uses),\nnever on state alone (a zero-token hold is always \"free\", whatever the\nstate) -- and, on a ``free`` -> ``full`` mismatch against the\ncaller-supplied ``expected_billing``, returns ``409 billing_changed``\nwithout touching Prefect at all. Omitted ``expected_billing`` (API-key\ncallers, who are not driving a dialog) skips the guard entirely,\nincluding its DB lookup.\n\nThis guard's read and ``cancel_run``'s own ownership/marker read are\nseparate Prefect calls, so a run can transition in the gap between\nthem. Rather than re-reading, the guard's approved outcome is threaded\ninto ``cancel_run`` as *promised_billing* -- but ONLY when\n``expected_billing`` was supplied AND equals the guard's own derived\n``actual_billing`` (a literal match, not merely \"the guard didn't\n409\"; a caller who braced for ``\"full\"`` while the guard happened to\nread ``\"free\"`` is not owed a binding free-cancel promise it never\nasked for). On a match, ``cancel_run`` honours that promise for the\nmarker/``billed`` decision instead of re-deriving it from its own\npotentially-drifted read, so a run that starts in the gap between the\ntwo reads after being promised a free cancel is never billed against\nthat promise -- drift always resolves in the user's favour.","operationId":"cancel_job_jobs__flow_run_id__cancel_post","parameters":[{"name":"flow_run_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelJobRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/media/{media_id}/thumbnail":{"get":{"tags":["Media"],"summary":"Get Thumbnail","description":"Serve a cached (or freshly generated) JPG thumbnail for ``media_id``.\n\nNo ``Authorization`` / ``X-TENANT-UUID`` header is read or required --\nthe URL-embedded ``(exp, sig)`` capability (minted by\n``app.api.media.signing.thumbnail_url_for`` inside an already-authorized\nasset read) is the sole credential.\n\nError codes:\n- **403** — signature invalid/tampered or ``exp`` has passed.\n- **400** — ``w`` is not in ``THUMBNAIL_ALLOWED_WIDTHS`` (belt-and-braces\n  even for a validly-signed width).\n- **404** — no ``Media`` row for ``media_id``, or its source object is\n  missing from the originals bucket.\n- **415** — ``media`` is not a raster image (3D file, video, encrypted).\n\nA generation failure (corrupt/unsupported source) is not a hard error:\nit returns **200** with the static \"Processing\" placeholder JPG,\n``Cache-Control: no-store``, and ``X-Thumbnail-Placeholder: 1`` -- and\nperforms no write to the thumbnail store, so the next request retries\nreal generation.","operationId":"get_thumbnail_media__media_id__thumbnail_get","parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","title":"Media Id"}},{"name":"exp","in":"query","required":true,"schema":{"type":"integer","description":"Unix timestamp the capability expires at.","title":"Exp"},"description":"Unix timestamp the capability expires at."},{"name":"sig","in":"query","required":true,"schema":{"type":"string","description":"HMAC-SHA256(media_id:width:exp) hex digest.","title":"Sig"},"description":"HMAC-SHA256(media_id:width:exp) hex digest."},{"name":"w","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Requested width in px. Defaults to THUMBNAIL_DEFAULT_WIDTH.","title":"W"},"description":"Requested width in px. Defaults to THUMBNAIL_DEFAULT_WIDTH."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/prefect/flow-run-terminal":{"post":{"tags":["internal"],"summary":"Settle or release a job's token hold on Prefect terminal state","description":"Called by the Prefect billing automation when a flow run reaches a terminal state.\n\nAuth: ``Authorization: Bearer <PREFECT_WEBHOOK_SECRET>``.\n\nCompleteness rule: ``Completed`` is only settled as success when the\nflow's ``state_message`` contains a non-empty ``media`` list.  If the\nmessage is absent or empty, the job is released (treated as failed) so\nthe user is never charged for a run that produced no output.\n\nEmpty ``job_uuid`` is a silent no-op, not an error: it means the\nterminating flow run never carried a ``job:<uuid>`` tag — e.g. a\ndistributed render's render-asset sub-jobs' own inner subflows, or any\nrun triggered directly via the CLI/``prefect deployment run``. These runs\nhave no token hold to settle, so there's nothing for this endpoint to do.\n``billing-terminal``'s trigger is now tag-scoped to avoid calling this\nendpoint for such runs at all (``app/prefect/automations.py``), but\n``zombie-marker``'s trigger deliberately stays unscoped (it must keep\ncrash-marking zombie sub-flows regardless of tag), so its billing-webhook\naction can still reach here with an empty ``job_uuid`` — this must stay a\ncheap 200, not a 422, or a distributed run's zombie fan-out reproduces the\nsame doomed-webhook flood this no-op prevents for billing-terminal.\n\nA plain Prefect ``CANCELLED`` does not mean an unconditional release.\nOn this branch this endpoint makes one Prefect call —\n``_fetch_run_facts`` — to read the run's ``cancel:*`` tag.\n``cancel:billable`` (user cancelled a run that had already started)\nsettles at the full held amount; anything else — ``cancel:free``, no tag\nat all (operator/CLI/automation kill), or a failed marker fetch —\nreleases. ``action`` reports which branch fired: ``settle_cancelled`` vs\n``release``.\n\nOn every branch whose ``action`` isn't ``settle`` (release,\nrelease_incomplete, settle_cancelled) this endpoint also makes a\nbest-effort CMS release notification via ``notify_terminal`` — the\nterminal-webhook backstop, covering an operator/CLI kill or\na cancel that never reached the synchronous flip in\n``app/api/jobs/router.py::cancel_job``. The notify's ``phase`` is taken\nfrom the RAW Prefect state, never from ``action``:\n``PrefectTerminalState.CANCELLED`` -> ``\"cancelled\"``, every other\nnon-settle outcome -> ``\"failed\"``. This distinction is load-bearing —\n``settle_cancelled`` and ``release`` both mean a cancel here, and\nnotifying ``\"failed\"`` for either would clobber the value the\nsynchronous flip (or this same notify, replayed) already wrote. The\nCANCELLED branch reuses the SAME ``_fetch_run_facts`` call the marker\nread already made rather than fetching twice; every other non-settle\nbranch makes its own single call. A notify failure never changes\n``action`` or the settle/release ledger effect.","operationId":"flow_run_terminal_internal_prefect_flow_run_terminal_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowRunTerminalPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowRunTerminalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/flow-events":{"post":{"tags":["internal"],"summary":"Insert a Prefect flow-run state change event into Supabase","description":"Called by the Prefect flow-events automation on every flow-run state change.\n\nAuth: ``Authorization: Bearer <FLOW_EVENTS_SECRET>``.\n\nStrips the ``prefect.flow-run.`` prefix from ``flow_run_id`` (matching the\ntester-app handler), parses ``state_message`` as JSON into ``metadata``\n(falls back to ``{\"state_message\": …}`` on parse failure), then inserts a\n``flow_events`` row into Supabase via the service-role key.","operationId":"flow_events_internal_flow_events_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowEventPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowEventResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vortic/notify":{"post":{"tags":["vortic"],"summary":"Vortic CMS upload notify intake","description":"Vortic fires this on an artwork high-bundle or room-model CMS upload:\n    ``{\"id\": <positive int>, \"type\": \"artwork\"|\"room\"}`` — no other field is\n    read.\n\n    **Required Headers:**\n    - `X-API-Key: <key>` (the system API key Vortic already uses for other\n      Scene calls)\n    - `X-Tenant-UUID: <tenant_uuid>`\n\n    Translates the packet to ``external_id = \"vortic:<type>:<id>\"`` and\n    enqueues an ``external_glb_compression`` job against an\n    ``exhibition_element`` asset in the caller's tenant — the same service\n    call ``POST /assets/compress-from-external-id`` makes.\n\n    Always responds fast (never awaits a compression). A concurrent\n    duplicate that trips the active-job guard is swallowed into a ``200``\n    with ``skipped=true`` rather than a 409 — Vortic must never wait on a\n    long hold.\n\n    Returns ``{asset_uuid, job_uuid, flow_run_id, skipped}``.","operationId":"vortic_notify_vortic_notify_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-UUID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VorticNotifyRequest"}}}},"responses":{"202":{"description":"Job accepted and enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VorticNotifyResponse"}}}},"200":{"description":"Duplicate active job swallowed (skipped=true)"},"401":{"description":"Not authenticated"},"403":{"description":"Invalid or inactive API key"},"422":{"description":"Malformed notify packet"},"503":{"description":"Worker queue unavailable"}}}},"/health":{"get":{"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Check Health Get"}}}}}}},"/sentry-debug":{"get":{"summary":"Trigger Error","description":"Debug endpoint to test Sentry error reporting","operationId":"trigger_error_sentry_debug_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Trigger Error Sentry Debug Get"}}}}}}}},"components":{"schemas":{"AIGenerationParams":{"properties":{"params_type":{"type":"string","enum":["ai_generation"],"const":"ai_generation","title":"Params Type","default":"ai_generation"},"payload":{"type":"object","title":"Payload","description":"Model-specific inputs, validated against the model's JSON Schema."}},"additionalProperties":false,"type":"object","title":"AIGenerationParams","description":"Execution parameters for an ai_generation job.\n\n``payload`` carries the model-specific inputs validated against the\nmodel's JSON Schema (derived from its WorkflowDescriptor) at request\ntime.  This is the same semantics as the legacy ``AIGenerationInput.payload``."},"AIModelPricingCreateRequest":{"properties":{"unit":{"type":"string","title":"Unit","description":"per_call|per_second|per_image|per_1k_tokens"},"base_cost_usd":{"type":"number","minimum":0.0,"title":"Base Cost Usd"},"markup_pct":{"type":"number","maximum":10.0,"minimum":0.0,"title":"Markup Pct","default":0.2},"tokens_per_unit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Tokens Per Unit"},"variations":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"Variations"}},"type":"object","required":["unit","base_cost_usd"],"title":"AIModelPricingCreateRequest"},"AIModelPricingResponse":{"properties":{"uuid":{"type":"string","title":"Uuid"},"model_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Uuid"},"provider_id":{"type":"string","title":"Provider Id"},"model_id":{"type":"string","title":"Model Id"},"unit":{"type":"string","title":"Unit"},"base_cost_usd":{"type":"number","title":"Base Cost Usd"},"markup_pct":{"type":"number","title":"Markup Pct"},"tokens_per_unit":{"type":"integer","title":"Tokens Per Unit"},"is_active":{"type":"boolean","title":"Is Active"},"effective_from":{"type":"string","format":"date-time","title":"Effective From"},"effective_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective Until"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"variations":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"Variations"}},"type":"object","required":["uuid","model_uuid","provider_id","model_id","unit","base_cost_usd","markup_pct","tokens_per_unit","is_active","effective_from","effective_until","created_at"],"title":"AIModelPricingResponse"},"AIModelPricingUpdateVariationsRequest":{"properties":{"variations":{"items":{"type":"object"},"type":"array","title":"Variations"}},"type":"object","required":["variations"],"title":"AIModelPricingUpdateVariationsRequest","description":"Request body for PUT .../pricing/{pricing_uuid}/variations."},"AIModelPricingUpdateVariationsResponse":{"properties":{"pricing":{"$ref":"#/components/schemas/AIModelPricingResponse"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["pricing"],"title":"AIModelPricingUpdateVariationsResponse","description":"Response for PUT .../pricing/{pricing_uuid}/variations.\n\nReturns the updated pricing row.  The ``warnings`` list is always empty\nunder the current absolute-cost model — negative ``cost_usd`` is a hard\n400 error, not a warning.  The field is kept for backwards-compatibility\nwith any callers that check ``response.warnings``."},"AIModelPublic":{"properties":{"uuid":{"type":"string","title":"Uuid"},"slug":{"type":"string","title":"Slug"},"display_name":{"type":"string","title":"Display Name"},"status":{"type":"string","title":"Status"},"sort_order":{"type":"integer","title":"Sort Order"},"input_schema":{"type":"object","title":"Input Schema"},"modality":{"type":"string","title":"Modality"},"wire_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wire Model"},"provider_uuid":{"type":"string","title":"Provider Uuid"},"provider_slug":{"type":"string","title":"Provider Slug"},"provider_display_name":{"type":"string","title":"Provider Display Name"}},"type":"object","required":["uuid","slug","display_name","status","sort_order","input_schema","modality","wire_model","provider_uuid","provider_slug","provider_display_name"],"title":"AIModelPublic","description":"Public view of an `ai_models` row.\n\n`input_schema` is derived on read from the live descriptor.\n`modality` is derived on read from the live descriptor — the raw string\nvalue (e.g. ``\"image_edit\"``, ``\"image_to_video\"``) so UIs can filter the\nmodel picker by capability without parsing the schema.\n`output_schema` has been removed — see module docstring."},"AIModelResponse":{"properties":{"uuid":{"type":"string","title":"Uuid"},"provider_uuid":{"type":"string","title":"Provider Uuid"},"provider_slug":{"type":"string","title":"Provider Slug"},"slug":{"type":"string","title":"Slug"},"display_name":{"type":"string","title":"Display Name"},"status":{"type":"string","title":"Status"},"sort_order":{"type":"integer","title":"Sort Order"},"billing_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Unit"},"billing_meter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Meter"},"current_billing_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Billing Unit"},"current_billing_meter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Billing Meter"},"is_drifted":{"type":"boolean","title":"Is Drifted","default":false},"is_orphaned":{"type":"boolean","title":"Is Orphaned","default":false},"modality_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modality Kind"},"wire_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wire Model"},"pricing_axes_hint":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"Pricing Axes Hint"},"pricing_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pricing Hint"},"pricing_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pricing Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["uuid","provider_uuid","provider_slug","slug","display_name","status","sort_order","created_at","updated_at"],"title":"AIModelResponse"},"AIModelStatusUpdateRequest":{"properties":{"status":{"type":"string","title":"Status","description":"New status: active | preview | disabled | deprecated"}},"type":"object","required":["status"],"title":"AIModelStatusUpdateRequest"},"AIProviderResponse":{"properties":{"uuid":{"type":"string","title":"Uuid"},"slug":{"type":"string","title":"Slug"},"display_name":{"type":"string","title":"Display Name"},"homepage_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Homepage Url"},"is_active":{"type":"boolean","title":"Is Active"},"model_count":{"type":"integer","title":"Model Count","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["uuid","slug","display_name","homepage_url","is_active","created_at","updated_at"],"title":"AIProviderResponse"},"AIProviderTestConnectionResponse":{"properties":{"kind":{"type":"string","title":"Kind"},"detail":{"type":"object","title":"Detail"}},"type":"object","required":["kind","detail"],"title":"AIProviderTestConnectionResponse","description":"Response from POST /super-admin/ai/providers/{uuid}/test-connection.\n\nMirrors the ConnectionResult discriminated union from ai_providers.\nThe `kind` field drives badge colour in the admin UI:\nok → green, auth_failed / account_suspended → orange,\ntransport_failed → red, unsupported → grey."},"AIProviderUpdateRequest":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Display Name"},"homepage_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Homepage Url"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"AIProviderUpdateRequest"},"APIKeyCreateRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Friendly name for the API key"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes","description":"List of permission scopes. Omitted or empty defaults to full tenant access ('tenant:*') for a 'user' key, or 'embed:read' for a 'public' key."},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"Optional expiration date"},"key_type":{"type":"string","title":"Key Type","description":"Key kind to mint. 'user' (default) or 'public' (restricted to embed:read only). 'system' is rejected downstream — this surface never mints system keys.","default":"user"}},"type":"object","required":["name"],"title":"APIKeyCreateRequest"},"APIKeyCreateResponse":{"properties":{"uuid":{"type":"string","title":"Uuid"},"name":{"type":"string","title":"Name"},"api_key":{"type":"string","title":"Api Key"},"key_prefix":{"type":"string","title":"Key Prefix"},"key_type":{"type":"string","title":"Key Type"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["uuid","name","api_key","key_prefix","key_type","scopes","expires_at","created_at"],"title":"APIKeyCreateResponse"},"APIKeyListResponse":{"properties":{"api_keys":{"items":{"$ref":"#/components/schemas/APIKeyResponse"},"type":"array","title":"Api Keys"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["api_keys","total"],"title":"APIKeyListResponse"},"APIKeyResponse":{"properties":{"uuid":{"type":"string","title":"Uuid"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"key_type":{"type":"string","title":"Key Type"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"usage_count":{"type":"integer","title":"Usage Count"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"},"owner_is_active_member":{"type":"boolean","title":"Owner Is Active Member","default":false},"is_expired":{"type":"boolean","title":"Is Expired","default":false}},"type":"object","required":["uuid","name","key_prefix","key_type","scopes","last_used_at","usage_count","expires_at","is_active","created_at"],"title":"APIKeyResponse"},"APIKeyScopeInfo":{"properties":{"value":{"type":"string","title":"Value"},"label":{"type":"string","title":"Label"},"family":{"type":"string","title":"Family"}},"type":"object","required":["value","label","family"],"title":"APIKeyScopeInfo"},"APIKeyScopeListResponse":{"properties":{"scopes":{"items":{"$ref":"#/components/schemas/APIKeyScopeInfo"},"type":"array","title":"Scopes"}},"type":"object","required":["scopes"],"title":"APIKeyScopeListResponse"},"ActivateRequest":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"ActivateRequest"},"AssetCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"external_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"External Id"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Tags for the asset (trimmed and validated)"},"visibility":{"anyOf":[{"type":"string","enum":["private","tenant","public"]},{"type":"null"}],"title":"Visibility","description":"Asset visibility; defaults to 'tenant' when omitted"},"asset_type_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type Uuid","description":"Optional Asset Type UUID (from the customer-module framework). When set, the ingest pipeline runs the owning module's hooks (validation, view_controls, enumerate_cameras, resolve_links).  NULL → standard asset, no module hooks fire."}},"type":"object","required":["name"],"title":"AssetCreateRequest"},"AssetCreatedResponse":{"properties":{"asset_uuid":{"type":"string","title":"Asset Uuid"},"name":{"type":"string","title":"Name"},"asset_type_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type Uuid"}},"type":"object","required":["asset_uuid","name"],"title":"AssetCreatedResponse","description":"Minimal response returned by ``POST /v1/asset-library/assets``.\n\nIntentionally smaller than the admin ``AssetResponse`` — the addon only\nneeds the UUID, name, and asset_type_uuid to proceed to the upload-URL step."},"AssetDetailResponse":{"properties":{"asset_uuid":{"type":"string","title":"Asset Uuid"},"name":{"type":"string","title":"Name"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"visibility":{"type":"string","enum":["private","tenant","public"],"title":"Visibility"},"latest_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Version"},"latest_published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Published At"},"thumbnail":{"anyOf":[{"$ref":"#/components/schemas/SignedUrlEnvelope"},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"versions":{"items":{"$ref":"#/components/schemas/VersionSummary"},"type":"array","title":"Versions"},"asset_type_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type Uuid"},"asset_type_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type Slug"},"asset_type_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type Display Name"},"module_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module Slug"},"validation_passed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Validation Passed"},"validation_report_md":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validation Report Md"}},"type":"object","required":["asset_uuid","name","tags","visibility","updated_at"],"title":"AssetDetailResponse","description":"Full asset record returned by ``GET /v1/asset-library/assets/{asset_id}``.\n\nExtends ``AssetSummaryResponse`` with the full published-version list\n(newest-first) and an optional description field.\n\nAlso carries the asset-type fields (mirroring the manifest, None for\nstandard assets) and the latest version's validation outcome (None when\nno validation hook ran)."},"AssetFilterEcho":{"properties":{"asset_uuid":{"type":"string","title":"Asset Uuid"},"asset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Name"}},"type":"object","required":["asset_uuid"],"title":"AssetFilterEcho","description":"The resolved ``asset_uuid`` filter, echoed back on ``GET /jobs`` when\nthe caller supplied one — so the frontend's filter chip is always\nlabelled, even when the result set is empty, with zero extra client\nrequests."},"AssetResponse":{"properties":{"uuid":{"type":"string","title":"Uuid"},"name":{"type":"string","title":"Name"},"visibility":{"type":"string","title":"Visibility","default":"tenant"},"meta":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Meta"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"user_uuid":{"type":"string","title":"User Uuid"},"tenant_uuid":{"type":"string","title":"Tenant Uuid"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"media":{"items":{"$ref":"#/components/schemas/MediaResponse"},"type":"array","title":"Media","default":[]},"asset_type_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type Uuid"},"asset_type_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type Slug"},"asset_type_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type Display Name"},"produces_glb":{"type":"boolean","title":"Produces Glb","default":true},"supports_reupload":{"type":"boolean","title":"Supports Reupload","default":false},"validation_passed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Validation Passed"},"validation_report_md":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validation Report Md"},"version_meta":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Version Meta"},"latest_version_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Version Uuid"},"latest_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Version Number"},"linked_asset_uuids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Linked Asset Uuids"}},"type":"object","required":["uuid","name","user_uuid","tenant_uuid","created_at","updated_at"],"title":"AssetResponse"},"AssetSummaryResponse":{"properties":{"asset_uuid":{"type":"string","title":"Asset Uuid"},"name":{"type":"string","title":"Name"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"visibility":{"type":"string","enum":["private","tenant","public"],"title":"Visibility"},"latest_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Version"},"latest_published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Published At"},"thumbnail":{"anyOf":[{"$ref":"#/components/schemas/SignedUrlEnvelope"},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},"type":"object","required":["asset_uuid","name","tags","visibility","updated_at"],"title":"AssetSummaryResponse","description":"List/grid-view item returned by ``GET /v1/asset-library/assets``."},"AssetTarget":{"properties":{"target_type":{"type":"string","enum":["asset"],"const":"asset","title":"Target Type","default":"asset"},"asset_uuid":{"type":"string","title":"Asset Uuid","description":"UUID of the asset to operate on"},"asset_version_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Version Uuid","description":"Pin the job to a specific asset version. When None, the processor resolves the latest published version."}},"additionalProperties":false,"type":"object","required":["asset_uuid"],"title":"AssetTarget","description":"Target for render and format_conversion jobs — identifies the asset."},"AssetTypeSummaryDTO":{"properties":{"uuid":{"type":"string","title":"Uuid"},"slug":{"type":"string","title":"Slug"},"display_name":{"type":"string","title":"Display Name"},"user_uploadable":{"type":"boolean","title":"User Uploadable"}},"type":"object","required":["uuid","slug","display_name","user_uploadable"],"title":"AssetTypeSummaryDTO"},"AssetUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"external_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"External Id"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Tags for the asset (trimmed and validated)"},"visibility":{"anyOf":[{"type":"string","enum":["private","tenant","public"]},{"type":"null"}],"title":"Visibility","description":"Asset visibility"},"meta":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Meta","description":"Top-level meta keys to merge into the asset's meta dict. Existing keys not present in this patch are preserved. Supply a namespace dict (e.g. {'vortic': {...}}) to update a single namespace without clobbering others."}},"type":"object","title":"AssetUpdateRequest"},"AssetVersionDetailResponse":{"properties":{"asset_uuid":{"type":"string","title":"Asset Uuid"},"version":{"type":"integer","title":"Version"},"status":{"type":"string","enum":["published","withdrawn","hashing","hash_failed"],"title":"Status"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"published_by_user_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published By User Uuid"},"sha256":{"type":"string","title":"Sha256"},"filesize":{"type":"integer","title":"Filesize"},"poly_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Poly Count"},"dimensions":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Dimensions"},"meta":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Meta"},"publish_notes":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Publish Notes"},"download":{"anyOf":[{"$ref":"#/components/schemas/SignedUrlEnvelope"},{"type":"null"}]}},"type":"object","required":["asset_uuid","version","status","sha256","filesize"],"title":"AssetVersionDetailResponse","description":"Full version record returned by ``GET /…/versions/{version}``."},"AssetVersionMetricsRequest":{"properties":{"poly_count":{"type":"integer","exclusiveMinimum":0.0,"title":"Poly Count"},"dimensions":{"items":{"type":"number"},"type":"array","maxItems":3,"minItems":3,"title":"Dimensions"}},"type":"object","required":["poly_count","dimensions"],"title":"AssetVersionMetricsRequest"},"AssetVersionPublishRequest":{"properties":{"sha256":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}],"title":"Sha256","description":"Lowercase hex SHA-256 of the uploaded file, computed by the worker from the local source file before/after upload."},"filesize":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Filesize","description":"Size in bytes of the uploaded file, computed by the worker."}},"type":"object","title":"AssetVersionPublishRequest","description":"Optional worker-supplied file digest for the publish transition.\n\nThe worker uploads the artifact straight to S3 over its own (LAN) endpoint\nand already computes ``filesize`` from the local file, so it can hand the\n``sha256`` over at publish time too.  When ``sha256`` is supplied the\nbackend skips ``_hash_media_from_s3`` — the one code path in the service\nthat streams whole asset objects, which costs a full WAN round-trip when\nthe API and the object store are not co-located (Render.com <-> Garage).\n\nOmitting both fields (``{}`` or no body) preserves the original behaviour:\nthe backend reads the stored object back and hashes it itself."},"AssetVersionResponse":{"properties":{"uuid":{"type":"string","title":"Uuid"},"asset_uuid":{"type":"string","title":"Asset Uuid"},"version_number":{"type":"integer","title":"Version Number"},"status":{"type":"string","title":"Status"},"published_by_user_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published By User Uuid"},"sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sha256"},"filesize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Filesize"},"poly_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Poly Count"},"dimensions":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Dimensions"},"meta":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["uuid","asset_uuid","version_number","status","created_at"],"title":"AssetVersionResponse"},"AutoTopupConfig":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"floor":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Floor"},"price_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Id"},"payment_method_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method Id"},"consecutive_failures":{"type":"integer","title":"Consecutive Failures"},"recharge_seq":{"type":"integer","title":"Recharge Seq"},"in_progress":{"type":"boolean","title":"In Progress"},"mode":{"type":"string","enum":["pack","custom"],"title":"Mode","description":"Derived from auto_topup_amount_minor NULL-ness: 'pack' when NULL (price_id is a fixed-pack Price), 'custom' when set (price_id is the custom-topup Price, charged via amount_minor)."},"amount_minor":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Minor","description":"Custom auto-reload amount, in the tenant's resolved billing-currency minor units. None in pack mode."}},"type":"object","required":["enabled","floor","price_id","payment_method_id","consecutive_failures","recharge_seq","in_progress","mode"],"title":"AutoTopupConfig"},"AutoTopupUpdateRequest":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","description":"Enable or disable off-session auto-renew"},"price_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Id","description":"Stripe Price id of the addon pack to auto-purchase when balance runs out (pack mode) — currency-resolved against the tenant's Stripe billing country. Mutually exclusive with amount_minor."},"amount_minor":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Amount Minor","description":"Custom auto-reload amount, in the tenant's resolved billing-currency minor units (custom mode). Must equal one of the ADDON_TOPUP_RUNGS_MAJOR_UNITS slider rungs — the server resolves and stores the matching custom-topup Price id itself. Mutually exclusive with price_id."},"floor":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Floor","description":"Spendable level at or below which a recharge triggers. None means trigger only when a hold fails (InsufficientTokensError)."}},"additionalProperties":false,"type":"object","title":"AutoTopupUpdateRequest","description":"Body for PATCH /api/tokens/auto-topup.\n\n``extra=\"forbid\"`` so a field-name mismatch (e.g. a stale\n``auto_topup_``-prefixed client) fails loudly with a 422 instead of the\nkeys being silently dropped and the endpoint returning 200 with an\nunchanged config.\n\nSupports a **custom mode**: set ``amount_minor`` (one of the\n``ADDON_TOPUP_RUNGS_MAJOR_UNITS`` slider rungs, expressed in the\ntenant's resolved billing-currency minor units) instead of ``price_id``\n— the server resolves the tenant's custom-topup Price itself and stores\nits id in ``auto_topup_price_id`` alongside the amount. **Pack mode**\n(``price_id`` set) clears any previously configured custom amount\n(``auto_topup_amount_minor`` -> ``NULL``). The two are mutually\nexclusive within a single request."},"BatchRenderPostProcessParams":{"properties":{"params_type":{"type":"string","enum":["batch_render_post_process"],"const":"batch_render_post_process","title":"Params Type","default":"batch_render_post_process"},"module":{"type":"object","title":"Module","description":"Asset-type-specific knobs for the module's declared batch_render_post_process_flow (e.g. InResi's furniture_style_id). Validated against the module manifest's batch_render_post_process_params_schema at request time."}},"additionalProperties":false,"type":"object","title":"BatchRenderPostProcessParams","description":"Execution parameters for a batch_render_post_process job\n(module-abstracted ReUpload).\n\nGeneric module-abstracted envelope, mirroring ``RenderParams``'\n``module`` bag: ``module`` carries asset-type-specific knobs (e.g.\nInResi's ``furniture_style_id``) validated at request time against the\nmodule manifest's ``batch_render_post_process_params_schema``\n(``extension_schema_for`` / ``validate_extension_params``, the same seam\n``RenderProcessor.validate`` uses). This layer carries NO inresi\nidentifiers — it doesn't know what ``module`` contains, only that some\nmodule declared a schema for it.\n\nFor InResi specifically (today's only implementation): a ReUpload\nre-dispatches ``inresi-render-finalise`` standalone (no render precedes\nit) to snapshot whatever is currently checkpointed for\n(asset_version, furniture_style_id) to the CMS as a fresh styleRender —\n\"render without upload, then ReUpload\" and \"render with upload\" must\nproduce identical CMS results. An empty selection (nothing checkpointed\nfor this version+style, or only low-quality rows) fails loudly inside\nthe flow itself — this schema does not attempt to pre-validate that."},"BatchResolveLatestEntry":{"properties":{"latest_version":{"type":"integer","title":"Latest Version"},"sha256":{"type":"string","title":"Sha256"},"published_at":{"type":"string","format":"date-time","title":"Published At"}},"type":"object","required":["latest_version","sha256","published_at"],"title":"BatchResolveLatestEntry","description":"Per-asset entry inside ``BatchResolveLatestResponse.results``.\n\n``latest_version`` is the version number of the most recently published version.\n``sha256`` is the SHA-256 hex digest of that version's ``.blend`` file.\n``published_at`` is the UTC timestamp when that version was published."},"BatchResolveLatestRequest":{"properties":{"asset_ids":{"items":{"type":"string"},"type":"array","title":"Asset Ids"}},"type":"object","title":"BatchResolveLatestRequest","description":"Request body for ``POST /v1/asset-library/resolve-latest``.\n\nRange validation (1–200) is enforced inside the endpoint handler rather\nthan via Pydantic constraints so that out-of-range requests return the\ntyped ``400 ASSET_LIBRARY_INVALID_QUERY`` error rather than a Pydantic\n422.  An empty list produces a ``400``, not a ``422``."},"BatchResolveLatestResponse":{"properties":{"results":{"additionalProperties":{"$ref":"#/components/schemas/BatchResolveLatestEntry"},"type":"object","title":"Results"},"missing":{"items":{"type":"string"},"type":"array","title":"Missing"},"forbidden":{"items":{"type":"string"},"type":"array","title":"Forbidden"}},"type":"object","required":["results","missing","forbidden"],"title":"BatchResolveLatestResponse","description":"Response for ``POST /v1/asset-library/resolve-latest``.\n\n``results`` maps ``asset_uuid → BatchResolveLatestEntry`` for all assets that\nexist, are visible to the caller, and have at least one published version.\n\n``missing`` lists asset UUIDs that do not exist or have no published version\nvisible to the caller (visibility hides them as 404).\n\n``forbidden`` is reserved for future per-asset scope refinement; always ``[]``\nin v1 (the whole endpoint requires ``asset_library:read``)."},"Body_upload_public_asset_public_upload_post":{"properties":{"email":{"type":"string","title":"Email"},"asset_name":{"type":"string","title":"Asset Name"},"filename":{"type":"string","title":"Filename"}},"type":"object","required":["email","asset_name","filename"],"title":"Body_upload_public_asset_public_upload_post"},"BuildFromExternalIdParams":{"properties":{"params_type":{"type":"string","enum":["build_from_external_id"],"const":"build_from_external_id","title":"Params Type","default":"build_from_external_id"},"user_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Uuid","description":"UUID of the user who triggered the build (optional)."}},"additionalProperties":false,"type":"object","title":"BuildFromExternalIdParams","description":"Execution parameters for a build_from_external_id job.\n\nThe asset is find-or-created by the build endpoint before the job is\nenqueued, so ``asset_uuid`` always exists and ``external_id`` is carried by\nthe asset's ``meta[\"external_id\"]`` — it is NOT a flow param.\n\n``to_flow_params`` emits ``{asset_uuid, tenant_uuid, job_uuid}`` (and\noptionally ``user_uuid``) — the same shape as format-converter, because the\ndispatcher is keyed on ``asset_uuid`` identically to render dispatch."},"BuildFromExternalIdRequest":{"properties":{"asset_type_slug":{"type":"string","title":"Asset Type Slug","description":"Slug of the asset type to create when no existing asset is found (e.g. 'whole_exhibition').  Must match a registered AssetType slug."},"external_id":{"type":"string","title":"External Id","description":"Composite external identifier (e.g. '{exhibitionUUID}|{sceneId}'). Used to look up an existing asset before creating one.  Stored in ``asset.meta['external_id']``."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Human-readable name for the new asset.  Defaults to the ``external_id`` value when omitted."}},"additionalProperties":false,"type":"object","required":["asset_type_slug","external_id"],"title":"BuildFromExternalIdRequest"},"BuildFromExternalIdResponse":{"properties":{"asset_uuid":{"type":"string","title":"Asset Uuid"},"job_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Uuid"},"flow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flow Run Id"},"status":{"type":"string","enum":["importing","up_to_date"],"title":"Status","default":"importing"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["asset_uuid"],"title":"BuildFromExternalIdResponse"},"CancelJobRequest":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Reason","description":"Free text, embedded in the Prefect state MESSAGE, never the state name."},"expected_billing":{"anyOf":[{"type":"string","enum":["free","full"]},{"type":"null"}],"title":"Expected Billing","description":"The billing outcome the confirmation dialog promised the user (guards against billing state changing between dialog display and confirmation). Omitted by API-key callers, who are not driving a dialog."}},"additionalProperties":false,"type":"object","title":"CancelJobRequest","description":"``POST /jobs/{flow_run_id}/cancel`` request body.\n\nEvery field is optional. ``extra=\"forbid\"`` is what makes cascade a\nnon-caller-tunable option: a client sending ``{\"cascade\": false}`` gets\na ``422`` rather than the field being silently ignored -- there is no\n``cascade`` field to accept."},"CancelJobResponse":{"properties":{"flow_run_id":{"type":"string","title":"Flow Run Id"},"outcome":{"type":"string","enum":["cancelling","cancelled"],"title":"Outcome"},"state_type":{"type":"string","title":"State Type"},"billed":{"anyOf":[{"type":"string","enum":["free","full"]},{"type":"null"}],"title":"Billed"},"children_cancelled":{"type":"integer","title":"Children Cancelled"},"children_failed":{"type":"integer","title":"Children Failed"}},"additionalProperties":false,"type":"object","required":["flow_run_id","outcome","state_type","billed","children_cancelled","children_failed"],"title":"CancelJobResponse","description":"``POST /jobs/{flow_run_id}/cancel`` ``200`` response body."},"ChangeMemberRoleRequest":{"properties":{"user_uuid":{"type":"string","title":"User Uuid"},"new_role":{"type":"string","title":"New Role"}},"type":"object","required":["user_uuid","new_role"],"title":"ChangeMemberRoleRequest"},"CheckNameResponse":{"properties":{"exists":{"type":"boolean","title":"Exists"},"conflicts":{"items":{"$ref":"#/components/schemas/ExistingAssetBrief"},"type":"array","title":"Conflicts"}},"type":"object","required":["exists","conflicts"],"title":"CheckNameResponse","description":"Response shape for GET /assets/check-name."},"CheckNewVersionResponse":{"properties":{"status":{"type":"string","enum":["updated","up_to_date","not_applicable"],"title":"Status"},"new_version_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Version Uuid"},"job_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Uuid"},"flow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flow Run Id"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["status","detail"],"title":"CheckNewVersionResponse"},"CheckoutRequest":{"properties":{"price_id":{"type":"string","title":"Price Id","description":"Stripe Price id to purchase — either a currency-resolved fixed token pack or the currency-resolved custom-topup Price."},"amount_minor":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Amount Minor","description":"App-collected top-up amount, in the tenant's resolved billing-currency minor units (chosen IN-APP, not on Stripe's hosted page). REQUIRED when price_id resolves to the custom-topup Price — validated server-side against its custom_unit_amount [min, max] range and charged via a dynamic Stripe Checkout `price_data` line item. Ignored for a fixed pack."},"success_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success Url","description":"Override the default `${FRONTEND_URL}/billing/success` URL."},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Url","description":"Override the default `${FRONTEND_URL}/billing/cancel` URL."}},"type":"object","required":["price_id"],"title":"CheckoutRequest"},"CheckoutResponse":{"properties":{"session_id":{"type":"string","title":"Session Id"},"checkout_url":{"type":"string","title":"Checkout Url"},"price_id":{"type":"string","title":"Price Id"},"tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tokens","description":"Projected token grant: `token_grant` for a fixed pack, or `round(amount_minor * tokens_per_major_unit / 100)` for a custom top-up. Always populated — the amount is chosen IN-APP and known at session-create time."},"price_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Cents","description":"Charged amount in minor units: the fixed pack's `unit_amount`, or the app-collected `amount_minor` for a custom top-up. Always populated."}},"type":"object","required":["session_id","checkout_url","price_id"],"title":"CheckoutResponse"},"CheckoutSessionRequest":{"properties":{"plan_id":{"type":"string","title":"Plan Id"},"billing_interval":{"type":"string","title":"Billing Interval","default":"monthly"},"licences":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Licences","default":1}},"type":"object","required":["plan_id"],"title":"CheckoutSessionRequest"},"CheckoutSessionResponse":{"properties":{"url":{"type":"string","title":"Url"},"session_id":{"type":"string","title":"Session Id"}},"type":"object","required":["url","session_id"],"title":"CheckoutSessionResponse"},"CompressFromExternalIdRequest":{"properties":{"asset_type_slug":{"type":"string","title":"Asset Type Slug","description":"Slug of the asset type to create when no existing asset is found (e.g. 'exhibition_element'). Must match a registered AssetType slug."},"external_id":{"type":"string","title":"External Id","description":"Opaque external identifier (e.g. 'vortic:artwork:123'). Used to look up an existing asset before creating one. Stored in ``asset.meta['external_id']``. This endpoint never parses the value — module-specific grammar is the module's concern."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Human-readable name for the new asset. Defaults to the ``external_id`` value when omitted."},"module":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Module","description":"Asset-type-specific knobs for the module's declared external_glb_compression_flow (e.g. Vortic's source_media_id / force). Validated against the module manifest's external_glb_compression_params_schema at request time."},"gltfpack":{"anyOf":[{"$ref":"#/components/schemas/GlbCompressionParams"},{"type":"null"}],"description":"Optional per-job gltfpack overrides using the exact feature-055 knob vocabulary. Unset knobs fall back to the wrapper's compression-only baseline (simplify_ratio=0, texture_mode='none'). source_media_uuid is rejected — the wrapper always resolves its own compression source."}},"additionalProperties":false,"type":"object","required":["asset_type_slug","external_id"],"title":"CompressFromExternalIdRequest"},"CompressFromExternalIdResponse":{"properties":{"asset_uuid":{"type":"string","title":"Asset Uuid"},"job_uuid":{"type":"string","title":"Job Uuid"},"flow_run_id":{"type":"string","title":"Flow Run Id"}},"type":"object","required":["asset_uuid","job_uuid","flow_run_id"],"title":"CompressFromExternalIdResponse"},"CreateAssetVersionRequest":{"properties":{"asset_uuid":{"type":"string","title":"Asset Uuid"},"user_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Uuid"}},"type":"object","required":["asset_uuid"],"title":"CreateAssetVersionRequest"},"CreateJobRequest":{"properties":{"job_type":{"$ref":"#/components/schemas/JobType"},"schema_version":{"type":"integer","title":"Schema Version","description":"Decorative field stored on every job row. See JobInputBase.schema_version for the bump contract.","default":1},"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/ModelTarget"}],"title":"Target","discriminator":{"propertyName":"target_type","mapping":{"asset":"#/components/schemas/AssetTarget","model":"#/components/schemas/ModelTarget"}}},"params":{"oneOf":[{"$ref":"#/components/schemas/RenderParams"},{"$ref":"#/components/schemas/FormatConversionParams"},{"$ref":"#/components/schemas/AIGenerationParams"},{"$ref":"#/components/schemas/BuildFromExternalIdParams"},{"$ref":"#/components/schemas/RenderLatestParams"},{"$ref":"#/components/schemas/ThumbnailGenerationParams"},{"$ref":"#/components/schemas/BatchRenderPostProcessParams"},{"$ref":"#/components/schemas/GlbCompressionParams"},{"$ref":"#/components/schemas/ExternalGlbCompressionParams"}],"title":"Params","discriminator":{"propertyName":"params_type","mapping":{"ai_generation":"#/components/schemas/AIGenerationParams","batch_render_post_process":"#/components/schemas/BatchRenderPostProcessParams","build_from_external_id":"#/components/schemas/BuildFromExternalIdParams","external_glb_compression":"#/components/schemas/ExternalGlbCompressionParams","format_conversion":"#/components/schemas/FormatConversionParams","glb_compression":"#/components/schemas/GlbCompressionParams","render":"#/components/schemas/RenderParams","render_latest":"#/components/schemas/RenderLatestParams","thumbnail_generation":"#/components/schemas/ThumbnailGenerationParams"}}},"metadata":{"type":"object","title":"Metadata","description":"Client-owned annotations stored under meta['client']. Never drives execution. Recognised keys: source, client_request_id, label, note."},"parent_job_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Job Uuid","description":"UUID of a failed parent job to resume from. Currently honoured for format_conversion retries only."}},"additionalProperties":false,"type":"object","required":["job_type","target","params"],"title":"CreateJobRequest","description":"POST /jobs request body — uniform envelope for all job types.\n\nShape::\n\n    {\n        \"job_type\": \"render\" | \"format_conversion\" | \"ai_generation\",\n        \"schema_version\": 1,           # decorative; see JobInputBase.schema_version\n        \"target\": {                    # AssetTarget or ModelTarget\n            \"target_type\": \"asset\",\n            \"asset_uuid\": \"<uuid>\",\n            \"asset_version_uuid\": null\n        },\n        \"params\": {                    # RenderParams | FormatConversionParams | AIGenerationParams\n            \"params_type\": \"render\",\n            \"camera_position\": [...],\n            ...\n        },\n        \"metadata\": {                  # optional client annotations\n            \"source\": \"render_panel\"\n        },\n        \"parent_job_uuid\": null        # retry control; format_conversion only today\n    }\n\n``metadata`` holds client-owned annotations that the worker **must never\nbranch on**.  They are stored under ``meta[\"client\"]`` in the ``Job.meta``\nJSONB column to keep client and server-owned keys separate.  Recognised\nkeys: ``source`` (analytics surface tag), ``client_request_id`` (caller\ndedup), ``label``/``note`` (human annotations).\n\nValidation: ``job_type`` must match ``params.params_type``.  A render job\nmust have an ``AssetTarget``; an AI job must have a ``ModelTarget``."},"CustomTopupDescriptor":{"properties":{"price_id":{"type":"string","title":"Price Id"},"currency":{"type":"string","title":"Currency"},"min_minor":{"type":"integer","title":"Min Minor"},"max_minor":{"type":"integer","title":"Max Minor"},"tokens_per_major_unit":{"type":"integer","title":"Tokens Per Major Unit"}},"type":"object","required":["price_id","currency","min_minor","max_minor","tokens_per_major_unit"],"title":"CustomTopupDescriptor","description":"Descriptor for the tenant's currency-resolved custom-topup\n(``custom_unit_amount``) Price — mirrors\n``app.services.token_pack_catalog.CustomTopupInfo``. The client uses\n``min_minor``/``max_minor``/``tokens_per_major_unit`` to render a\nclient-side projected-grant preview; the actual amount is entered on\nStripe's hosted Checkout page."},"DeleteLogoResponse":{"properties":{"success":{"type":"boolean","title":"Success"}},"type":"object","required":["success"],"title":"DeleteLogoResponse"},"DeleteRenderSetResponse":{"properties":{"deleted":{"type":"integer","title":"Deleted"},"render_group_uuid":{"type":"string","title":"Render Group Uuid"}},"type":"object","required":["deleted","render_group_uuid"],"title":"DeleteRenderSetResponse","description":"Response body for ``DELETE /assets/{asset_id}/render-set/{render_group_uuid}``\n— bulk-deletes every media row sharing one render group, including the\nhidden ``render_intermediate`` rows the gallery never displays.\n``deleted=0`` (not a 404) when the set is already gone."},"DevCompleteCheckoutRequest":{"properties":{"session_id":{"type":"string","minLength":1,"title":"Session Id"},"price_id":{"type":"string","minLength":1,"title":"Price Id"},"amount_minor":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Amount Minor","description":"Dev-only: the amount (minor units) to simulate for a custom-topup Price purchase. Ignored for a fixed pack."}},"type":"object","required":["session_id","price_id"],"title":"DevCompleteCheckoutRequest","description":"Body for the dev-only mock-checkout completion endpoint.\n\nMirrors what a real Stripe webhook would tell us (session id + the\npackage we sold). Only honoured when `STRIPE_API_BASE` is set, i.e.\nwe're explicitly running against stripe-mock.\n\n``amount_minor`` is dev-only: the real flow collects the custom top-up\namount IN-APP at `POST /checkout` time (not on a Stripe-hosted\n`custom_unit_amount` collection page), but stripe-mock never fires a\nreal `checkout.session.completed` webhook — so this field lets the dev\nmock-checkout flow resupply the same amount that was already chosen and\nvalidated at session-create time. Ignored for a fixed-pack `price_id`\n(the grant comes from `token_grant` as before); required (bounded by\nthe custom Price's `custom_unit_amount` min/max, mirroring\n`POST /checkout`'s own validation) when `price_id` resolves to the\ncustom-topup Price."},"DevGrantSubscriptionRequest":{"properties":{"allotment":{"type":"integer","exclusiveMinimum":0.0,"title":"Allotment","description":"Token grant amount"},"subscription_id":{"type":"string","title":"Subscription Id","description":"Synthetic Stripe subscription id for the idempotency key","default":"sub_devmock_001"},"period_days":{"type":"integer","maximum":366.0,"minimum":1.0,"title":"Period Days","description":"How many days from now the period ends","default":30}},"type":"object","required":["allotment"],"title":"DevGrantSubscriptionRequest","description":"Body for the dev-only subscription-grant shortcut.\n\nSeeds a subscription bucket reset without real Stripe / Test Clocks.\nOnly honoured when ``STRIPE_API_BASE`` is set."},"DuplicateAssetNameError":{"properties":{"code":{"type":"string","enum":["duplicate_asset_name"],"const":"duplicate_asset_name","title":"Code","default":"duplicate_asset_name"},"message":{"type":"string","title":"Message"},"existing":{"items":{"$ref":"#/components/schemas/ExistingAssetBrief"},"type":"array","title":"Existing"}},"type":"object","required":["message","existing"],"title":"DuplicateAssetNameError","description":"409 response body when POST /assets detects a duplicate name."},"EstimateRequest":{"properties":{"provider_id":{"type":"string","maxLength":32,"minLength":1,"title":"Provider Id"},"model_id":{"type":"string","maxLength":64,"minLength":1,"title":"Model Id"},"units_billed":{"type":"number","exclusiveMinimum":0.0,"title":"Units Billed","description":"Number of priced units (seconds, images, 1k-token blocks, or calls) depending on the model's pricing unit."}},"type":"object","required":["provider_id","model_id","units_billed"],"title":"EstimateRequest"},"EstimateResponse":{"properties":{"provider_id":{"type":"string","title":"Provider Id"},"model_id":{"type":"string","title":"Model Id"},"unit":{"type":"string","title":"Unit"},"units_billed":{"type":"number","title":"Units Billed"},"tokens":{"type":"integer","title":"Tokens"},"usd_equivalent":{"type":"string","title":"Usd Equivalent"},"pricing_uuid":{"type":"string","title":"Pricing Uuid"}},"type":"object","required":["provider_id","model_id","unit","units_billed","tokens","usd_equivalent","pricing_uuid"],"title":"EstimateResponse"},"ExistingAssetBrief":{"properties":{"uuid":{"type":"string","title":"Uuid"},"name":{"type":"string","title":"Name"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"}},"type":"object","required":["uuid","name","tags","created_at"],"title":"ExistingAssetBrief","description":"Minimal asset projection returned by the duplicate-name check."},"ExternalGlbCompressionParams":{"properties":{"params_type":{"type":"string","enum":["external_glb_compression"],"const":"external_glb_compression","title":"Params Type","default":"external_glb_compression"},"module":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Module","description":"Asset-type-specific knobs for the module's declared external_glb_compression_flow (e.g. Vortic's source_media_id / force). Validated against the module manifest's external_glb_compression_params_schema at request time."},"gltfpack":{"anyOf":[{"$ref":"#/components/schemas/GlbCompressionParams"},{"type":"null"}],"description":"Optional per-job gltfpack overrides using the same knob vocabulary as the standalone compression job (nested reuse — zero edits to GlbCompressionParams). Unset knobs fall back to the wrapper's compression-only baseline (simplify_ratio=0, texture_mode='none', keep_vertex_attributes=True, texcoord_format='float'), never to the standalone job's own DEFAULTS. source_media_uuid is rejected — the wrapper always resolves its own compression source."}},"additionalProperties":false,"type":"object","title":"ExternalGlbCompressionParams","description":"Execution parameters for an external_glb_compression job.\n\nGeneric module-abstracted envelope, mirroring\n``BatchRenderPostProcessParams``'s ``module`` bag: ``module`` carries\nasset-type-specific knobs (e.g. Vortic's ``source_media_id`` / ``force``)\nvalidated at request time against the module manifest's\n``external_glb_compression_params_schema`` (``extension_schema_for`` /\n``validate_extension_params``). This layer carries NO vendor-specific\nidentifiers — it doesn't know what ``module`` contains, only that some\nmodule declared a schema for it.\n\n``gltfpack`` is an optional **nested** ``GlbCompressionParams`` — the\nstandalone compression job's closed vocabulary, reused verbatim (the\nnested model's class body is never edited). ``source_media_uuid`` on\nthe nested model is rejected outright: the wrapper always resolves its\nown compression source, and a caller-supplied pin would silently\ncompress the wrong file.\n\n``to_flow_params`` merges a compression-only baseline\n(``simplify_ratio: 0``, ``texture_mode: \"none\"`` — \"just compression,\nno optimisation\" — plus ``keep_vertex_attributes: True`` and\n``texcoord_format: \"float\"``, needed for Vortic's gltfpack\n``-kv -kn -km`` and ``-vtf``; ``-kn``/``-km`` are already on via the\nstandalone job's worker-side ``DEFAULTS``) underneath any\ncaller-supplied ``gltfpack`` fields, so overriding a single knob never\nresurrects those ``DEFAULTS`` for the others."},"ExtraUsageUpdateRequest":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","description":"Turn Extra Usage on or off (master toggle) — gates buying more addon tokens and freezes spending the existing addon_balance while off."},"monthly_spend_limit_minor":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Monthly Spend Limit Minor","description":"New per-tenant monthly addon-spend ceiling, in the tenant's resolved billing-currency minor units. Bounded to [0, ADDON_SPEND_LIMIT_MAX_MINOR]."}},"additionalProperties":false,"type":"object","title":"ExtraUsageUpdateRequest","description":"Body for PATCH /api/tokens/extra-usage.\n\n``extra=\"forbid\"`` matches the other wallet-mutation DTOs in this module\n(``AutoTopupUpdateRequest``) — an unknown field fails loudly with a 422\ninstead of being silently dropped. Both fields are optional; a field left\n``None`` leaves the corresponding wallet column unchanged."},"FeedbackResponse":{"properties":{"uuid":{"type":"string","title":"Uuid"},"message":{"type":"string","title":"Message"},"route":{"type":"string","title":"Route"},"user_uuid":{"type":"string","title":"User Uuid"}},"type":"object","required":["uuid","message","route","user_uuid"],"title":"FeedbackResponse"},"FeedbackSubmitRequest":{"properties":{"message":{"type":"string","maxLength":5000,"minLength":1,"title":"Message"},"route":{"type":"string","minLength":1,"title":"Route"}},"type":"object","required":["message","route"],"title":"FeedbackSubmitRequest"},"FeedbackWithUserDTO":{"properties":{"uuid":{"type":"string","title":"Uuid"},"message":{"type":"string","title":"Message"},"route":{"type":"string","title":"Route"},"user_email":{"type":"string","title":"User Email"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["uuid","message","route","user_email","created_at"],"title":"FeedbackWithUserDTO"},"FlowEventPayload":{"properties":{"flow_run_id":{"type":"string","title":"Flow Run Id"},"event":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"flow_run_name":{"type":"string","title":"Flow Run Name","default":""},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"state_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Message"},"job_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Uuid"}},"type":"object","required":["flow_run_id"],"title":"FlowEventPayload","description":"Payload sent by the Prefect flow-events automation on any state change."},"FlowEventResponse":{"properties":{"published":{"type":"boolean","title":"Published"},"flow_run_id":{"type":"string","title":"Flow Run Id"}},"type":"object","required":["published","flow_run_id"],"title":"FlowEventResponse"},"FlowRunTerminalPayload":{"properties":{"job_uuid":{"type":"string","title":"Job Uuid"},"state":{"type":"string","title":"State"},"state_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Message"},"flow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flow Run Id"},"tokens_actual":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Tokens Actual"}},"type":"object","required":["job_uuid","state"],"title":"FlowRunTerminalPayload","description":"Payload sent by the Prefect billing automation on terminal flow run."},"FlowRunTerminalResponse":{"properties":{"status":{"type":"string","title":"Status"},"job_uuid":{"type":"string","title":"Job Uuid"},"action":{"type":"string","title":"Action"}},"type":"object","required":["status","job_uuid","action"],"title":"FlowRunTerminalResponse"},"ForceResolveJobResponse":{"properties":{"flow_run_id":{"type":"string","title":"Flow Run Id"},"outcome":{"type":"string","enum":["resolved"],"const":"resolved","title":"Outcome"},"state_type":{"type":"string","title":"State Type"}},"additionalProperties":false,"type":"object","required":["flow_run_id","outcome","state_type"],"title":"ForceResolveJobResponse","description":"``POST /super-admin/job-runs/{flow_run_id}/force-resolve`` ``200``\nresponse body."},"FormatConversionParams":{"properties":{"params_type":{"type":"string","enum":["format_conversion"],"const":"format_conversion","title":"Params Type","default":"format_conversion"},"input_format":{"type":"string","title":"Input Format","description":"Source format: fbx, obj, dae, usdz, glb, blend"},"workflow_actions":{"items":{"type":"string"},"type":"array","title":"Workflow Actions","description":"Post-conversion actions: thumbnail, compression. Currently a no-op on the flow side — format_converter_flow decides its thumbnail sub-step (skip vs. single-shot PNG) from the asset's existing media, and gltfpack compression is unconditional. Retained for envelope backward-compatibility."},"module":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Module","description":"Asset-type-specific format-conversion knobs. No module declares one yet; reserved for future module-manifest extension."}},"additionalProperties":false,"type":"object","required":["input_format"],"title":"FormatConversionParams","description":"Execution parameters for a format_conversion job.\n\n``module`` is an optional asset-type-specific bag for future\nmodule-declared format-conversion knobs.  No module declares one yet;\nit is silently dropped from the flow params (the flow has no ``module``\nparameter)."},"GenerateGlbResponse":{"properties":{"job_uuid":{"type":"string","title":"Job Uuid"},"flow_run_id":{"type":"string","title":"Flow Run Id"}},"type":"object","required":["job_uuid","flow_run_id"],"title":"GenerateGlbResponse"},"GenerateThumbnailResponse":{"properties":{"job_uuid":{"type":"string","title":"Job Uuid"},"flow_run_id":{"type":"string","title":"Flow Run Id"}},"type":"object","required":["job_uuid","flow_run_id"],"title":"GenerateThumbnailResponse"},"GitHubCallbackRequest":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"GitHubCallbackRequest"},"GlbCompressionParams":{"properties":{"params_type":{"type":"string","enum":["glb_compression"],"const":"glb_compression","title":"Params Type","default":"glb_compression"},"source_media_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Media Uuid","description":"Explicit pin of the source GLB Media row. When omitted, the flow resolves the source by precedence: asset-owned file_glb, then version-owned optimised_glb, then version-owned file_raw (format=glb)."},"compression":{"anyOf":[{"type":"string","enum":["none","basic","high","zlib"]},{"type":"null"}],"title":"Compression","description":"gltfpack Meshopt compression level (-c/-cc/-cz). 'none' is the viewer-compatibility escape hatch for loaders that don't support Meshopt. Default when unset: 'high'."},"simplify_ratio":{"anyOf":[{"type":"number","exclusiveMaximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Simplify Ratio","description":"gltfpack -si simplification ratio. Unset defaults to 0.5 (the previous Stage 3b production behaviour, -si 0.5 -slb); pass 0 to disable simplification."},"simplify_error":{"anyOf":[{"type":"number","maximum":1.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Simplify Error","description":"gltfpack -se error threshold. Requires simplify_ratio to be set and strictly in (0, 1)."},"lock_borders":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Lock Borders","description":"gltfpack -slb — lock border vertices during simplification."},"texture_mode":{"anyOf":[{"type":"string","enum":["none","etc1s","uastc","webp"]},{"type":"null"}],"title":"Texture Mode","description":"gltfpack texture re-encoding mode (-tc/-tu/-tw). 'none' is the viewer-compatibility escape hatch for loaders that don't support the re-encoded formats. Default when unset: 'etc1s'."},"texture_quality":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Texture Quality","description":"gltfpack -tq texture quality (1-10). Requires texture_mode set and not 'none'."},"texture_scale":{"anyOf":[{"type":"number","maximum":1.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Texture Scale","description":"gltfpack -ts texture downscale factor. Requires texture_mode set and not 'none'."},"texture_limit":{"anyOf":[{"type":"integer","maximum":16384.0,"minimum":0.0},{"type":"null"}],"title":"Texture Limit","description":"gltfpack -tl texture size limit in pixels. Requires texture_mode set and not 'none'."},"position_format":{"anyOf":[{"type":"string","enum":["int","normalized","float"]},{"type":"null"}],"title":"Position Format","description":"gltfpack vertex position encoding (-vpi/-vpn/-vpf)."},"texcoord_format":{"anyOf":[{"type":"string","enum":["quantized","float"]},{"type":"null"}],"title":"Texcoord Format","description":"gltfpack texture-coordinate encoding: 'float' emits -vtf; 'quantized' is gltfpack's default and emits no flag."},"position_bits":{"anyOf":[{"type":"integer","maximum":16.0,"minimum":1.0},{"type":"null"}],"title":"Position Bits","description":"gltfpack -vp position bit count."},"texcoord_bits":{"anyOf":[{"type":"integer","maximum":16.0,"minimum":1.0},{"type":"null"}],"title":"Texcoord Bits","description":"gltfpack -vt texture-coordinate bit count."},"normal_bits":{"anyOf":[{"type":"integer","maximum":16.0,"minimum":1.0},{"type":"null"}],"title":"Normal Bits","description":"gltfpack -vn normal bit count."},"keep_vertex_attributes":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Keep Vertex Attributes","description":"gltfpack -kv — keep source vertex attributes even if unused."},"keep_named_nodes":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Keep Named Nodes","description":"gltfpack -kn — keep named nodes."},"keep_named_materials":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Keep Named Materials","description":"gltfpack -km — keep named materials."},"keep_extras":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Keep Extras","description":"gltfpack -ke — keep extras."}},"additionalProperties":false,"type":"object","title":"GlbCompressionParams","description":"Execution parameters for a standalone glb_compression job.\n\nPromotes gltfpack compression out of Stage 3b of the format-converter\ninto a first-class, parameterised job. Every knob is optional; the bare\n``{\"params_type\": \"glb_compression\"}`` form\nreproduces today's Stage 3b production settings exactly\n(``compression=\"high\"``, ``texture_mode=\"etc1s\"``,\n``position_format=\"float\"``, ``lock_borders=True``,\n``keep_named_nodes/materials/extras=True``, and — via\n``flows._core.gltfpack_options.DEFAULTS`` — ``simplify_ratio=0.5``, the\nproduction ``-si 0.5 -slb`` simplification; pass ``simplify_ratio=0``\nto disable it).\n\n``compression: \"none\"`` and ``texture_mode: \"none\"`` are the\nviewer-compatibility escape hatches — they disable gltfpack's Meshopt\ncompression / texture re-encoding respectively for loaders that don't\nsupport them.\n\nThe 15 knob field names below are character-identical to\n``flows._core.gltfpack_options.GltfpackOptions``'s dataclass field\nnames — ``to_flow_params`` passes them through verbatim inside an\nopaque ``options`` dict, since ``flows/`` cannot import ``app/``."},"GoogleLoginRequest":{"properties":{"id_token":{"type":"string","title":"Id Token"}},"type":"object","required":["id_token"],"title":"GoogleLoginRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HookOutcomeRequest":{"properties":{"meta_merge":{"anyOf":[{"$ref":"#/components/schemas/MetaMerge"},{"type":"null"}],"description":"Keys to merge into AssetVersion.meta (additive; never overwrites). view_options is validated; other keys are passed through unchanged."},"validation_passed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Validation Passed","description":"hook (a) outcome; None means leave unchanged"},"validation_report_md":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validation Report Md","description":"Markdown report body from hook (a)"},"hook_reports_patch":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Hook Reports Patch","description":"Keys to merge into FormatConversionJob.hook_reports"},"job_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Uuid","description":"FormatConversionJob UUID — required when hook_reports_patch is set"}},"type":"object","title":"HookOutcomeRequest","description":"Written by the framework after hook (a) completes.\n\nAll fields are optional so the endpoint can update only the relevant subset.\nmeta_merge: keys to merge into AssetVersion.meta (JSONB merge, not overwrite).\n  Only the ``view_options`` key is validated; other keys are passed through.\nvalidation_passed: None means \"no hook ran\" (leave column as is).\nvalidation_report_md: markdown report body.\nhook_reports_patch: dict to merge into FormatConversionJob.hook_reports."},"InstallPricing":{"properties":{"unit":{"type":"string","minLength":1,"title":"Unit"},"base_cost_usd":{"type":"number","title":"Base Cost Usd"},"markup_pct":{"type":"number","title":"Markup Pct","default":0.0}},"type":"object","required":["unit","base_cost_usd"],"title":"InstallPricing"},"InstallRegistryRequest":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"status":{"type":"string","enum":["active","preview","disabled","deprecated"],"title":"Status","default":"active"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"display_name_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name Override"},"billing_meter_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Meter Override"},"pricing":{"$ref":"#/components/schemas/InstallPricing"}},"type":"object","required":["workflow_id","pricing"],"title":"InstallRegistryRequest"},"InviteRequestCreate":{"properties":{"full_name":{"type":"string","maxLength":50,"minLength":1,"title":"Full Name"},"email":{"type":"string","format":"email","title":"Email"},"company":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Company"},"use_case":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Use Case"}},"type":"object","required":["full_name","email"],"title":"InviteRequestCreate"},"InviteRequestDTO":{"properties":{"uuid":{"type":"string","title":"Uuid"},"full_name":{"type":"string","title":"Full Name"},"email":{"type":"string","title":"Email"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"use_case":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Case"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approved At"},"rejected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Rejected At"},"activated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Activated At"}},"type":"object","required":["uuid","full_name","email","company","use_case","status","created_at","approved_at","rejected_at","activated_at"],"title":"InviteRequestDTO"},"InviteRequestSubmitResponse":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"InviteRequestSubmitResponse"},"InviteUserRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"type":"string","title":"Role"}},"type":"object","required":["email","role"],"title":"InviteUserRequest"},"InviteUserResponse":{"properties":{"uuid":{"type":"string","title":"Uuid"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"}},"type":"object","required":["uuid","email","role","status"],"title":"InviteUserResponse"},"InvoicePeriodListItem":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"},"is_current":{"type":"boolean","title":"Is Current"},"has_subscription_invoice":{"type":"boolean","title":"Has Subscription Invoice","description":"Whether a closed, paid Stripe subscription invoice matches this period. Always False for the current (in-progress) period."}},"type":"object","required":["key","label","start","end","is_current","has_subscription_invoice"],"title":"InvoicePeriodListItem","description":"One selectable billing period, as listed by `GET /invoices/periods`.\n\nDrives the frontend period selector."},"InvoicePeriodResponse":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"},"is_current":{"type":"boolean","title":"Is Current"},"basis":{"type":"string","enum":["subscription_anchor","calendar"],"title":"Basis"}},"type":"object","required":["key","label","start","end","is_current","basis"],"title":"InvoicePeriodResponse"},"InvoiceTotalsResponse":{"properties":{"money_charged_minor":{"type":"integer","title":"Money Charged Minor","description":"Subscription charge + token_purchases_total (money only), excluding any subscription charge with not_yet_billed=True — an unbilled estimate is never counted as money charged. Usage is reported in tokens, never imputed as an additional charge."}},"type":"object","required":["money_charged_minor"],"title":"InvoiceTotalsResponse"},"JobBucket":{"type":"string","enum":["pending","running","completed","failed"],"title":"JobBucket","description":"Closed enum of exactly the four display buckets. A new Prefect\nstate type must be explicitly triaged into one of these by a person\n(``prefect_run_states.bucket_for_state_type`` raises otherwise) — there\nis deliberately no fifth value and no catch-all."},"JobCreateResponse":{"properties":{"job_uuid":{"type":"string","title":"Job Uuid"},"flow_run_id":{"type":"string","title":"Flow Run Id"}},"type":"object","required":["job_uuid","flow_run_id"],"title":"JobCreateResponse","description":"Response from POST /jobs — ledger-based job creation.\n\n``create_job`` no longer INSERTs a ``Job`` row.  The job's identity\nlives in the token ledger (``reference_id=job_uuid``) and in the\nPrefect run (``idempotency_key=job_uuid``, tag ``job:<uuid>``).\n\nThe UI subscribes to Supabase ``flow_events`` using ``flow_run_id``;\n``job_uuid`` is the durable billing correlation key."},"JobPriceItem":{"properties":{"job_type":{"type":"string","title":"Job Type"},"render_type":{"type":"string","title":"Render Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"module_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module Slug"},"tokens":{"type":"integer","title":"Tokens"},"priced":{"type":"boolean","title":"Priced"}},"type":"object","required":["job_type","render_type","tokens","priced"],"title":"JobPriceItem","description":"One priceable job/render key, resolved to its effective token cost\nfor the calling tenant.\n\nDeliberately carries no ``source`` or ``pricing_uuid`` field: a tenant\nmust never be able to tell whether their price came from the global\nbaseline or a negotiated override, since that is commercial information\nabout other tenants as much as about them. ``priced=False`` (with\n``tokens=0``) means no price row exists anywhere for the key — the job\nis free by fall-through, not by an explicit decision; ``priced=True,\ntokens=0`` means a price row exists and is explicitly free. Both render\nas \"Free\" to the tenant."},"JobPricingCatalogEntry":{"properties":{"job_type":{"type":"string","title":"Job Type"},"render_type":{"type":"string","title":"Render Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"module_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module Slug"},"asset_type_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type Slug"},"tokens":{"type":"integer","title":"Tokens"},"priced":{"type":"boolean","title":"Priced"},"is_active":{"type":"boolean","title":"Is Active"},"known_to_registry":{"type":"boolean","title":"Known To Registry"}},"type":"object","required":["job_type","render_type","tokens","priced","is_active","known_to_registry"],"title":"JobPricingCatalogEntry","description":"One priceable `(job_type, render_type)` key, annotated with its\ncurrent global price.\n\n`priced=False, tokens=0` means no global row exists for this key (it is\nsilently free today); `priced=True, tokens=0` means a global row exists\nand is explicitly free — the two must never collapse into the same\nshape. `known_to_registry=False` means the key's `render_type` is not\n(or no longer) declared by any module in the registry — shown, not\nhidden, since module manifests are hot-swappable and a price may\nlegitimately precede or outlive a module shipping."},"JobPricingRow":{"properties":{"uuid":{"type":"string","title":"Uuid"},"job_type":{"type":"string","title":"Job Type"},"render_type":{"type":"string","title":"Render Type"},"tokens":{"type":"integer","title":"Tokens"},"is_active":{"type":"boolean","title":"Is Active"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"updated_by_user_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By User Uuid"}},"type":"object","required":["uuid","job_type","render_type","tokens","is_active","notes","created_at","updated_at","updated_by_user_uuid"],"title":"JobPricingRow","description":"One row of the global `job_pricing` table."},"JobPricingUpsertRequest":{"properties":{"job_type":{"type":"string","title":"Job Type"},"render_type":{"type":"string","title":"Render Type","default":""},"tokens":{"type":"integer","minimum":0.0,"title":"Tokens"},"is_active":{"type":"boolean","title":"Is Active","default":true},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["job_type","tokens"],"title":"JobPricingUpsertRequest","description":"Body for `PUT /super-admin/job-pricing` — upsert-by-key.\n\nThe key (`job_type`, `render_type`) travels in the body, not the path,\nso the `''` blanket render type never needs an empty path segment."},"JobRunChildrenPage":{"properties":{"results":{"items":{"$ref":"#/components/schemas/JobRunSummary"},"type":"array","title":"Results"}},"additionalProperties":false,"type":"object","required":["results"],"title":"JobRunChildrenPage","description":"``GET /jobs/{flow_run_id}/children`` response envelope — direct\nchildren only, one level."},"JobRunDetail":{"properties":{"flow_run_id":{"type":"string","title":"Flow Run Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"job_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Uuid"},"job_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type"},"deployment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Name"},"flow_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flow Name"},"bucket":{"$ref":"#/components/schemas/JobBucket"},"state_type":{"type":"string","title":"State Type"},"state_name":{"type":"string","title":"State Name"},"is_late":{"type":"boolean","title":"Is Late"},"is_retrying":{"type":"boolean","title":"Is Retrying"},"is_cancelling":{"type":"boolean","title":"Is Cancelling"},"is_cancellable":{"type":"boolean","title":"Is Cancellable"},"state_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Message"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"expected_start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Start Time"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Time"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"asset_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Uuid"},"asset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Name"},"render_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Render Type"},"parameters_summary":{"type":"object","title":"Parameters Summary"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"work_pool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Work Pool Name"},"work_queue_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Work Queue Name"},"run_count":{"type":"integer","title":"Run Count","default":0},"estimated_run_time_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Run Time Seconds"},"child_count":{"type":"integer","title":"Child Count","default":0},"prefect_ui_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefect Ui Url"},"held_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Held Amount"},"promised_billing":{"type":"string","enum":["free","full"],"title":"Promised Billing","default":"free"}},"additionalProperties":false,"type":"object","required":["flow_run_id","bucket","state_type","state_name","is_late","is_retrying","is_cancelling","is_cancellable"],"title":"JobRunDetail","description":"``GET /jobs/{flow_run_id}`` response — summary fields plus detail-only\nones and the cancel-info block."},"JobRunNode":{"properties":{"flow_run_id":{"type":"string","title":"Flow Run Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"job_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Uuid"},"job_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type"},"deployment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Name"},"flow_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flow Name"},"bucket":{"$ref":"#/components/schemas/JobBucket"},"state_type":{"type":"string","title":"State Type"},"state_name":{"type":"string","title":"State Name"},"is_late":{"type":"boolean","title":"Is Late"},"is_retrying":{"type":"boolean","title":"Is Retrying"},"is_cancelling":{"type":"boolean","title":"Is Cancelling"},"is_cancellable":{"type":"boolean","title":"Is Cancellable"},"state_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Message"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"expected_start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Start Time"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Time"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"asset_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Uuid"},"asset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Name"},"render_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Render Type"},"parameters_summary":{"type":"object","title":"Parameters Summary"},"parent_flow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Flow Run Id"},"depth":{"type":"integer","title":"Depth"},"provenance":{"anyOf":[{"$ref":"#/components/schemas/WorkerProvenance"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["flow_run_id","bucket","state_type","state_name","is_late","is_retrying","is_cancelling","is_cancellable","depth"],"title":"JobRunNode","description":"One row of ``GET /jobs/{flow_run_id}/tree`` — a ``JobRunSummary``\nplus the tree-walk fields the unified viewer needs: which run is its\nparent, how deep it sits, and its resolved machine provenance.\n\n``parent_flow_run_id`` is the tree walk's RESOLVED parent edge, not\nPrefect's own raw ``parent_flow_run_id`` field — for a tag-only\n(``as_subflow=False``) child, Prefect's own field is ``None`` but this\none still carries the real parent id, discovered via the ``parent:<id>``\ntag channel instead. It is ``None`` ONLY for the root\n(``nodes[0]``)."},"JobRunSummary":{"properties":{"flow_run_id":{"type":"string","title":"Flow Run Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"job_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Uuid"},"job_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type"},"deployment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Name"},"flow_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flow Name"},"bucket":{"$ref":"#/components/schemas/JobBucket"},"state_type":{"type":"string","title":"State Type"},"state_name":{"type":"string","title":"State Name"},"is_late":{"type":"boolean","title":"Is Late"},"is_retrying":{"type":"boolean","title":"Is Retrying"},"is_cancelling":{"type":"boolean","title":"Is Cancelling"},"is_cancellable":{"type":"boolean","title":"Is Cancellable"},"state_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Message"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"expected_start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Start Time"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Time"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"asset_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Uuid"},"asset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Name"},"render_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Render Type"},"parameters_summary":{"type":"object","title":"Parameters Summary"}},"additionalProperties":false,"type":"object","required":["flow_run_id","bucket","state_type","state_name","is_late","is_retrying","is_cancelling","is_cancellable"],"title":"JobRunSummary","description":"One row of ``GET /jobs`` / ``GET /jobs/{id}/children``."},"JobRunTree":{"properties":{"root_flow_run_id":{"type":"string","title":"Root Flow Run Id"},"nodes":{"items":{"$ref":"#/components/schemas/JobRunNode"},"type":"array","title":"Nodes"},"truncated":{"type":"boolean","title":"Truncated"}},"additionalProperties":false,"type":"object","required":["root_flow_run_id","nodes","truncated"],"title":"JobRunTree","description":"``GET /jobs/{flow_run_id}/tree`` response envelope."},"JobType":{"type":"string","enum":["format_conversion","render","ai_generation","build_from_external_id","render_latest","thumbnail_generation","batch_render_post_process","glb_compression","external_glb_compression"],"title":"JobType"},"LedgerEntryResponse":{"properties":{"uuid":{"type":"string","title":"Uuid"},"entry_type":{"type":"string","title":"Entry Type"},"amount":{"type":"integer","title":"Amount"},"balance_after":{"type":"integer","title":"Balance After"},"held_after":{"type":"integer","title":"Held After"},"reference_type":{"type":"string","title":"Reference Type"},"reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Id"},"idempotency_key":{"type":"string","title":"Idempotency Key"},"user_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Uuid"},"meta":{"type":"object","title":"Meta"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["uuid","entry_type","amount","balance_after","held_after","reference_type","reference_id","idempotency_key","user_uuid","meta","created_at"],"title":"LedgerEntryResponse"},"LedgerListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LedgerEntryResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"LedgerListResponse"},"LogEntry":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"level":{"type":"integer","title":"Level"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"flow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flow Run Id"},"message":{"type":"string","title":"Message"},"task_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Run Id"},"task_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Name"}},"type":"object","required":["timestamp","level","message"],"title":"LogEntry","description":"One row of ``GET /jobs/{flow_run_id}/logs``. ``extra=\"ignore\"``\ntolerates raw Prefect log fields this DTO does not surface.\n\n``flow_run_id`` is ``None`` in per-run mode (redundant there — the\ncaller already knows which run it asked for) and populated in\n``descendants=true`` mode, where a merged-subtree row needs to say\nwhich run emitted it."},"LogPage":{"properties":{"results":{"items":{"$ref":"#/components/schemas/LogEntry"},"type":"array","title":"Results"},"has_more":{"type":"boolean","title":"Has More"},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},"additionalProperties":false,"type":"object","required":["results","has_more"],"title":"LogPage","description":"``GET /jobs/{flow_run_id}/logs`` response envelope."},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"LoginResponse":{"properties":{"email":{"type":"string","title":"Email"},"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type"},"is_verified":{"type":"boolean","title":"Is Verified","default":true}},"type":"object","required":["email","access_token","token_type"],"title":"LoginResponse"},"LogoutResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"LogoutResponse"},"ManifestEntry":{"properties":{"asset_id":{"type":"string","title":"Asset Id"},"name":{"type":"string","title":"Name"},"visibility":{"type":"string","enum":["private","tenant","public"],"title":"Visibility"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"latest_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Version Number"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"asset_type_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type Uuid"},"asset_type_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type Slug"},"asset_type_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type Display Name"},"module_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module Slug"}},"type":"object","required":["asset_id","name","visibility","tags","updated_at"],"title":"ManifestEntry","description":"Slim per-asset row inside ``ManifestResponse.items``.\n\nDesigned to stay under ~250 bytes per entry for efficient periodic sync.\nEach entry is identity + tags + thumbnail URL + version count — no full\nsigned-URL envelope, no datablock details.\n\n``thumbnail_url`` is the raw presigned URL string (not the full\n``SignedUrlEnvelope``) to keep entries compact.  The URL is omitted\n(``None``) when the asset's latest version has no thumbnail media.\n\n# TODO: the plugin caches the manifest for hours, but signed URLs\n# generated here will have expired by then. For now, the plugin must\n# re-fetch the manifest or fetch a fresh URL on demand.\n\nThe four asset-type fields are ``None`` for standard assets\n(``Asset.asset_type_uuid IS NULL``).  They are populated via an eager-loaded\nJOIN to ``AssetType`` + ``Module`` by the handler."},"ManifestResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ManifestEntry"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"}},"type":"object","required":["items","generated_at"],"title":"ManifestResponse","description":"Response for ``GET /v1/asset-library/manifest``.\n\n``next_cursor`` is ``None`` when the current page is the last page.\n``generated_at`` is the server's UTC clock at response time — the plugin\nuses it to detect server-side time drift."},"MediaCreateRequest":{"properties":{"role":{"$ref":"#/components/schemas/MediaRole","description":"Type of media file"},"format":{"type":"string","minLength":1,"title":"Format","description":"File format (e.g., glb, usdz, png)"},"path":{"type":"string","minLength":1,"title":"Path","description":"S3/MinIO object key from upload URL response"},"mime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime","description":"MIME type"},"filesize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Filesize","description":"File size in bytes"},"sha256":{"anyOf":[{"type":"string","pattern":"^[a-fA-F0-9]{64}$"},{"type":"null"}],"title":"Sha256","description":"SHA256 hash"},"meta":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Meta","description":"Additional metadata"},"workflow_actions":{"items":{"$ref":"#/components/schemas/WorkflowAction"},"type":"array","title":"Workflow Actions","description":"Workflow actions to trigger"},"asset_version_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Version Uuid","description":"When set, the Media row is owned by this AssetVersion (asset_version_uuid FK set, asset_uuid=NULL). Used by the format-converter flow for version-owned derived media (file_blend, thumbnail, optimised_glb, etc.)."},"external_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"External Id","description":"Optional external/CMS id (e.g. an InResi CMS floor-plan id) to stamp onto asset.meta['external_id'] before ingest is enqueued. Mirrors AssetCreateRequest.external_id and is applied via the same fresh-dict apply_external_id helper, so a request that omits it behaves exactly as before."}},"type":"object","required":["role","format","path"],"title":"MediaCreateRequest"},"MediaMetaUpdateRequest":{"properties":{"meta":{"type":"object","title":"Meta","description":"Shallow meta merge. Only 'projection' ('equirectangular' or null, to clear it) is accepted for this endpoint."}},"additionalProperties":false,"type":"object","required":["meta"],"title":"MediaMetaUpdateRequest","description":"Request body for ``PATCH /assets/{asset_id}/media/{media_id}`` — the\n\"View as 360\" toggle's persistence PATCH.\n\nA shallow ``meta`` merge scoped to an explicit allow-list of keys:\n``projection``, whose only valid values are the literal string\n``'equirectangular'`` (marks the media as a 360/panoramic image) or\n``None`` (clears it, reverting to a plain 2D image). Any other key, or a\nvalue that doesn't match its key's allowed shape, is rejected with a 422."},"MediaResponse":{"properties":{"uuid":{"type":"string","title":"Uuid"},"role":{"$ref":"#/components/schemas/MediaRole"},"format":{"type":"string","title":"Format"},"path":{"type":"string","title":"Path"},"url":{"type":"string","title":"Url"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"},"mime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime"},"filesize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Filesize"},"sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sha256"},"meta":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Meta"},"asset_version_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Version Uuid"},"asset_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Asset Version Number"},"source_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Version Number"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["uuid","role","format","path","url","created_at","updated_at"],"title":"MediaResponse"},"MediaRole":{"type":"string","enum":["file","file_raw","file_encrypted","compressed_glb","file_glb","file_usdz","file_fbx","file_obj","file_dae","file_blend","optimised_glb","thumbnail","thumbnail_png","render","video_generated","image_generated","auto_render","upload","render_intermediate"],"title":"MediaRole","description":"Media roles for asset media files. Canonical source of truth."},"MemberAccessRequest":{"properties":{"user_uuid":{"type":"string","title":"User Uuid"}},"type":"object","required":["user_uuid"],"title":"MemberAccessRequest"},"MetaMerge":{"properties":{"view_options":{"anyOf":[{"items":{"$ref":"#/components/schemas/ViewOption"},"type":"array"},{"type":"null"}],"title":"View Options","description":"Validated shape for meta.view_options"}},"additionalProperties":true,"type":"object","title":"MetaMerge","description":"Typed wrapper for the meta_merge dict in HookOutcomeRequest.\n\nOnly ``view_options`` is constrained; all other keys are passed through\nunchanged via ``extra=\"allow\"`` — ``meta`` is opaque except for that one\nkey."},"ModelTarget":{"properties":{"target_type":{"type":"string","enum":["model"],"const":"model","title":"Target Type","default":"model"},"model_uuid":{"type":"string","title":"Model Uuid","description":"UUID of an active AIModel"}},"additionalProperties":false,"type":"object","required":["model_uuid"],"title":"ModelTarget","description":"Target for ai_generation jobs — identifies the AI model."},"ModuleSummaryDTO":{"properties":{"uuid":{"type":"string","title":"Uuid"},"slug":{"type":"string","title":"Slug"},"display_name":{"type":"string","title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"asset_types":{"items":{"$ref":"#/components/schemas/AssetTypeSummaryDTO"},"type":"array","title":"Asset Types"},"options_schema":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Options Schema"}},"type":"object","required":["uuid","slug","display_name","description","asset_types"],"title":"ModuleSummaryDTO"},"OrgTagCreateRequest":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"OrgTagCreateRequest","description":"Body for POST /tags/org."},"OrgTagListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OrgTagResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"OrgTagListResponse","description":"Envelope for GET /tags/org."},"OrgTagResponse":{"properties":{"uuid":{"type":"string","title":"Uuid"},"name":{"type":"string","title":"Name"},"sort_order":{"type":"integer","title":"Sort Order"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["uuid","name","sort_order","created_at"],"title":"OrgTagResponse","description":"A single org (curated) tag row."},"OrgTagUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","title":"OrgTagUpdateRequest","description":"Body for PATCH /tags/org/{uuid}.\n\nBoth fields are optional; at least one must be supplied for a meaningful\nrequest (the handler accepts either/both and updates only the fields\npresent in the payload)."},"PortalSessionResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"PortalSessionResponse"},"ProviderRegistryEntry":{"properties":{"slug":{"type":"string","title":"Slug"},"display_name":{"type":"string","title":"Display Name"},"available":{"type":"boolean","title":"Available"},"installed_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Installed Uuid"}},"type":"object","required":["slug","display_name","available","installed_uuid"],"title":"ProviderRegistryEntry"},"PublicAssetResponse":{"properties":{"uuid":{"type":"string","title":"Uuid"},"name":{"type":"string","title":"Name"},"media":{"items":{"$ref":"#/components/schemas/PublicMediaResponse"},"type":"array","title":"Media"},"can_edit":{"type":"boolean","title":"Can Edit","default":false},"can_delete":{"type":"boolean","title":"Can Delete","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["uuid","name","media","created_at"],"title":"PublicAssetResponse"},"PublicMediaResponse":{"properties":{"role":{"type":"string","title":"Role"},"format":{"type":"string","title":"Format"},"url":{"type":"string","title":"Url"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"mime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime"}},"type":"object","required":["role","format","url","mime"],"title":"PublicMediaResponse"},"PublicUploadCompleteRequest":{"properties":{"asset_version_uuid":{"type":"string","title":"Asset Version Uuid"}},"type":"object","required":["asset_version_uuid"],"title":"PublicUploadCompleteRequest"},"PublicUploadCompleteResponse":{"properties":{"asset_uuid":{"type":"string","title":"Asset Uuid"},"asset_version_uuid":{"type":"string","title":"Asset Version Uuid"},"sha256":{"type":"string","title":"Sha256"},"filesize":{"type":"integer","title":"Filesize"},"status":{"type":"string","title":"Status"}},"type":"object","required":["asset_uuid","asset_version_uuid","sha256","filesize","status"],"title":"PublicUploadCompleteResponse"},"PublicUploadResponse":{"properties":{"asset_uuid":{"type":"string","title":"Asset Uuid"},"upload_url":{"type":"string","title":"Upload Url"},"object_key":{"type":"string","title":"Object Key"},"public_url":{"type":"string","title":"Public Url"},"user_created":{"type":"boolean","title":"User Created"},"verification_sent":{"type":"boolean","title":"Verification Sent"},"asset_version_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Version Uuid"}},"type":"object","required":["asset_uuid","upload_url","object_key","public_url","user_created","verification_sent"],"title":"PublicUploadResponse"},"ReconcileGrantsResponse":{"properties":{"tenant_uuid":{"type":"string","title":"Tenant Uuid"},"invoices_examined":{"type":"integer","title":"Invoices Examined"},"already_granted":{"type":"integer","title":"Already Granted"},"granted":{"type":"integer","title":"Granted"},"skipped":{"items":{"type":"string"},"type":"array","title":"Skipped"}},"type":"object","required":["tenant_uuid","invoices_examined","already_granted","granted","skipped"],"title":"ReconcileGrantsResponse"},"RefreshResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type"}},"type":"object","required":["access_token","token_type"],"title":"RefreshResponse"},"RegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"tenant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Name"}},"type":"object","required":["email","password"],"title":"RegisterRequest"},"RemoveMemberRequest":{"properties":{"user_uuid":{"type":"string","title":"User Uuid"}},"type":"object","required":["user_uuid"],"title":"RemoveMemberRequest"},"RenderActivityJob":{"properties":{"job_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Uuid"},"flow_run_id":{"type":"string","title":"Flow Run Id"},"job_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type"},"render_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Render Type"},"bucket":{"$ref":"#/components/schemas/JobBucket"},"state_type":{"type":"string","title":"State Type"},"state_name":{"type":"string","title":"State Name"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time"}},"additionalProperties":false,"type":"object","required":["flow_run_id","bucket","state_type","state_name"],"title":"RenderActivityJob","description":"One in-flight (pending/running) render run for the queried asset."},"RenderActivityResponse":{"properties":{"asset_uuid":{"type":"string","title":"Asset Uuid"},"external_id":{"type":"string","title":"External Id"},"active":{"type":"boolean","title":"Active"},"jobs":{"items":{"$ref":"#/components/schemas/RenderActivityJob"},"type":"array","title":"Jobs"}},"additionalProperties":false,"type":"object","required":["asset_uuid","external_id","active"],"title":"RenderActivityResponse","description":"Response body for ``GET /assets/render-activity``."},"RenderLatestParams":{"properties":{"params_type":{"type":"string","enum":["render_latest"],"const":"render_latest","title":"Params Type","default":"render_latest"},"external_id":{"type":"string","title":"External Id","description":"Composite external id of the asset (e.g. '{uuid}|{sceneId}')."},"asset_type_slug":{"type":"string","title":"Asset Type Slug","description":"Asset type slug used if the asset was just created."},"camera_position":{"items":{"type":"number"},"type":"array","maxItems":3,"minItems":3,"title":"Camera Position"},"camera_rotation":{"items":{"type":"number"},"type":"array","maxItems":3,"minItems":3,"title":"Camera Rotation"},"resolution_x":{"type":"integer","maximum":7680.0,"minimum":64.0,"title":"Resolution X","default":1920},"resolution_y":{"type":"integer","maximum":4320.0,"minimum":64.0,"title":"Resolution Y","default":1080},"samples":{"type":"integer","maximum":4096.0,"minimum":1.0,"title":"Samples","default":64},"module":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Module","description":"Asset-type-specific render knobs (e.g. InResi camera_name, furniture_style_id). Validated against the module manifest's custom_render_params_schema at request time."},"user_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Uuid","description":"UUID of the user who triggered the render-latest job (optional)."}},"additionalProperties":false,"type":"object","required":["external_id","asset_type_slug","camera_position","camera_rotation"],"title":"RenderLatestParams","description":"Execution parameters for a render_latest job.\n\nMirrors ``RenderParams`` exactly in its render fields, plus ``external_id``\nand ``asset_type_slug`` carried for the combined flow's build subflow call\n(self-describing logs; the subflow reads ``external_id`` from\n``asset.meta`` so these are not strictly required by the subflow).\n\n``build_flow_run_id`` is intentionally absent: the build runs as an\n**in-process subflow** of the combined flow — there is no separate build\nrun to await by id.\n\n``module`` is aliased to ``module_params`` in ``to_flow_params`` (same\nconvention as ``RenderParams``) so the combined flow receives the same key\nthe render flow expects."},"RenderLatestRequest":{"properties":{"external_id":{"type":"string","title":"External Id","description":"Composite external identifier (e.g. '{exhibitionUUID}|{sceneId}'). Used to look up an existing asset before creating one.  Stored in ``asset.meta['external_id']``."},"asset_type_slug":{"type":"string","title":"Asset Type Slug","description":"Slug of the asset type to create when no existing asset is found (e.g. 'whole_exhibition').  Must match a registered AssetType slug."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Human-readable name for the new asset.  Defaults to the ``external_id`` value when omitted."},"camera_position":{"items":{"type":"number"},"type":"array","maxItems":3,"minItems":3,"title":"Camera Position"},"camera_rotation":{"items":{"type":"number"},"type":"array","maxItems":3,"minItems":3,"title":"Camera Rotation"},"resolution_x":{"type":"integer","maximum":7680.0,"minimum":64.0,"title":"Resolution X","default":1920},"resolution_y":{"type":"integer","maximum":4320.0,"minimum":64.0,"title":"Resolution Y","default":1080},"samples":{"type":"integer","maximum":4096.0,"minimum":1.0,"title":"Samples","default":64},"module":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Module","description":"Asset-type-specific render knobs (e.g. InResi camera_name, furniture_style_id). Validated against the module manifest's custom_render_params_schema at request time."}},"additionalProperties":false,"type":"object","required":["external_id","asset_type_slug","camera_position","camera_rotation"],"title":"RenderLatestRequest","description":"Request body for ``POST /assets/render-latest``.\n\nRender-param fields are identical in shape and bounds to ``RenderParams``\nso a client can carry the same params it would send to ``POST /jobs``.\n``extra=\"forbid\"`` rejects unknown fields (422)."},"RenderLatestResponse":{"properties":{"asset_uuid":{"type":"string","title":"Asset Uuid"},"render_job_uuid":{"type":"string","title":"Render Job Uuid"},"render_flow_run_id":{"type":"string","title":"Render Flow Run Id"}},"type":"object","required":["asset_uuid","render_job_uuid","render_flow_run_id"],"title":"RenderLatestResponse","description":"Response body for ``POST /assets/render-latest`` (202 Accepted).\n\n``render_flow_run_id`` is the sole client tracking handle — the id of\nthe ``waiter-pool`` combined ``render_latest`` run that spans the\nbuild (in-process subflow) → render lifecycle and terminates with\n``Completed(message={media:[…]})``.\n\n``build_job_uuid`` / ``build_flow_run_id`` fields from an earlier design\nare absent: there is no separate build job in this combined-flow design."},"RenderParams":{"properties":{"params_type":{"type":"string","enum":["render"],"const":"render","title":"Params Type","default":"render"},"camera_position":{"items":{"type":"number"},"type":"array","maxItems":3,"minItems":3,"title":"Camera Position"},"camera_rotation":{"items":{"type":"number"},"type":"array","maxItems":3,"minItems":3,"title":"Camera Rotation"},"resolution_x":{"type":"integer","maximum":7680.0,"minimum":64.0,"title":"Resolution X","default":1920},"resolution_y":{"type":"integer","maximum":4320.0,"minimum":64.0,"title":"Resolution Y","default":1080},"samples":{"type":"integer","maximum":4096.0,"minimum":1.0,"title":"Samples","default":64},"module":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Module","description":"Asset-type-specific render knobs (e.g. InResi camera_name, furniture_style_id). Validated against the module manifest's custom_render_params_schema at request time."}},"additionalProperties":false,"type":"object","required":["camera_position","camera_rotation"],"title":"RenderParams","description":"Execution parameters for a render job.\n\n``module`` carries asset-type-specific knobs (e.g. InResi's\n``camera_name``, ``furniture_style_id``) validated at request time against\nthe module manifest's ``custom_render_params_schema``.  The flow receives\nthis as ``module_params`` (aliased below in ``_RENDER_FLOW_PARAM_ALIASES``)."},"RenderSettingsResponse":{"properties":{"settings":{"type":"object","title":"Settings"},"overridden_keys":{"items":{"type":"string"},"type":"array","title":"Overridden Keys"}},"type":"object","required":["settings","overridden_keys"],"title":"RenderSettingsResponse","description":"Resolved effective render settings for a module plus which keys are\ncurrently tenant-overridden.\n\n``settings`` is the merged (sparse-overrides-over-defaults) result — what\nthe backend actually injects into a render job at submit time. It is\n``dict[str, Any]`` rather than a typed model — the concrete\n``TenantRenderSettings`` subclass is module-declared and resolved\nthrough the registry at runtime, so it is not importable by ``app/`` as a\nstatic type. Populated via the resolved model's\n``.model_dump()``; the JSON body shape is unchanged for InResi — the only\nloss is field-level detail in the OpenAPI schema.\n\n``overridden_keys`` lets the admin form / read-only popup distinguish an\nexplicit tenant override from a value that merely resolved to the code\ndefault."},"ResendVerificationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ResendVerificationRequest"},"ResendVerificationResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"ResendVerificationResponse"},"ResetPasswordConfirmRequest":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordConfirmRequest"},"ResetPasswordRequestRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ResetPasswordRequestRequest"},"ResetPasswordResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"ResetPasswordResponse"},"ResolveLatestResponse":{"properties":{"asset_uuid":{"type":"string","title":"Asset Uuid"},"latest_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Version"}},"type":"object","required":["asset_uuid"],"title":"ResolveLatestResponse","description":"Response for ``GET /v1/asset-library/assets/{asset_id}/resolve-latest``.\n\n``latest_version`` is ``None`` when the asset exists but has no published\nversions yet."},"RunPage":{"properties":{"results":{"items":{"$ref":"#/components/schemas/JobRunSummary"},"type":"array","title":"Results"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"window":{"$ref":"#/components/schemas/RunWindow"},"asset_filter":{"anyOf":[{"$ref":"#/components/schemas/AssetFilterEcho"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["results","limit","offset","window"],"title":"RunPage","description":"``GET /jobs`` response envelope."},"RunWindow":{"properties":{"since":{"type":"string","format":"date-time","title":"Since"},"until":{"type":"string","format":"date-time","title":"Until"}},"type":"object","required":["since","until"],"title":"RunWindow","description":"The resolved ``[since, until)`` window echoed back on every list page\nso a client can freeze the top of the result set across subsequent page\nrequests."},"SetLogoRequest":{"properties":{"object_key":{"type":"string","title":"Object Key"},"content_type":{"type":"string","title":"Content Type"}},"type":"object","required":["object_key","content_type"],"title":"SetLogoRequest"},"SetLogoResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"logo_media_uuid":{"type":"string","title":"Logo Media Uuid"}},"type":"object","required":["success","logo_media_uuid"],"title":"SetLogoResponse"},"SetPasswordRequest":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"SetPasswordRequest"},"SignedUrlEnvelope":{"properties":{"url":{"type":"string","title":"Url"},"sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sha256"},"filesize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Filesize"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"etag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Etag"}},"type":"object","required":["url","expires_at"],"title":"SignedUrlEnvelope","description":"Signed S3/MinIO URL with verification metadata.\n\nEmbedded in detail, download, and preview responses so the plugin can\nverify the download regardless of S3 ETag quirks (multipart upload ETags\ndiffer from content SHA-256)."},"StorageUsageResponse":{"properties":{"bytes_used":{"type":"integer","title":"Bytes Used"},"gb_used":{"type":"number","title":"Gb Used"},"gb_included":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gb Included"}},"type":"object","required":["bytes_used","gb_used"],"title":"StorageUsageResponse"},"SubscriptionChargeResponse":{"properties":{"plan_name":{"type":"string","title":"Plan Name"},"status":{"type":"string","title":"Status"},"amount_minor":{"type":"integer","title":"Amount Minor"},"currency":{"type":"string","title":"Currency"},"stripe_invoice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Invoice Id"},"invoice_pdf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Pdf Url"},"not_yet_billed":{"type":"boolean","title":"Not Yet Billed","description":"True only when no paid Stripe invoice covers this period yet, in which case amount_minor is a live plan-price estimate. False whenever a paid invoice was matched — including the current period, when Stripe has already billed it in advance."}},"type":"object","required":["plan_name","status","amount_minor","currency","stripe_invoice_id","invoice_pdf_url","not_yet_billed"],"title":"SubscriptionChargeResponse"},"SubscriptionInfoDTO":{"properties":{"uuid":{"type":"string","title":"Uuid"},"status":{"$ref":"#/components/schemas/SubscriptionStatus"},"plan_type":{"type":"string","title":"Plan Type"},"current_period_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["uuid","status","plan_type","current_period_start","current_period_end","cancel_at_period_end","created_at"],"title":"SubscriptionInfoDTO"},"SubscriptionPlanResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"price_monthly":{"type":"integer","title":"Price Monthly"},"price_annual":{"type":"integer","title":"Price Annual"},"currency":{"type":"string","title":"Currency"},"features":{"items":{"type":"string"},"type":"array","title":"Features"},"is_active":{"type":"boolean","title":"Is Active"},"monthly_token_grant":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Monthly Token Grant"},"seats_per_licence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seats Per Licence"},"storage_gb_per_licence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Storage Gb Per Licence"}},"type":"object","required":["id","name","description","price_monthly","price_annual","currency","features","is_active"],"title":"SubscriptionPlanResponse"},"SubscriptionResponse":{"properties":{"id":{"type":"string","title":"Id"},"plan_id":{"type":"string","title":"Plan Id"},"status":{"type":"string","title":"Status"},"current_period_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Period End"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End"},"payment_method_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"},"is_upgrade":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Upgrade"},"change_effective_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Effective Date"}},"type":"object","required":["id","plan_id","status","current_period_start","current_period_end","cancel_at_period_end"],"title":"SubscriptionResponse"},"SubscriptionStatus":{"type":"string","enum":["active","inactive","past_due","canceled","trialing","unpaid"],"title":"SubscriptionStatus"},"SuggestedBilling":{"properties":{"unit":{"type":"string","title":"Unit"},"meter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meter"}},"type":"object","required":["unit","meter"],"title":"SuggestedBilling"},"SuperAdminJobRunDetail":{"properties":{"flow_run_id":{"type":"string","title":"Flow Run Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"job_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Uuid"},"job_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type"},"deployment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Name"},"flow_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flow Name"},"bucket":{"$ref":"#/components/schemas/JobBucket"},"state_type":{"type":"string","title":"State Type"},"state_name":{"type":"string","title":"State Name"},"is_late":{"type":"boolean","title":"Is Late"},"is_retrying":{"type":"boolean","title":"Is Retrying"},"is_cancelling":{"type":"boolean","title":"Is Cancelling"},"is_cancellable":{"type":"boolean","title":"Is Cancellable"},"state_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Message"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"expected_start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Start Time"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Time"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"asset_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Uuid"},"asset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Name"},"render_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Render Type"},"parameters_summary":{"type":"object","title":"Parameters Summary"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"work_pool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Work Pool Name"},"work_queue_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Work Queue Name"},"run_count":{"type":"integer","title":"Run Count","default":0},"estimated_run_time_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Run Time Seconds"},"child_count":{"type":"integer","title":"Child Count","default":0},"prefect_ui_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefect Ui Url"},"held_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Held Amount"},"promised_billing":{"type":"string","enum":["free","full"],"title":"Promised Billing","default":"free"},"tenant_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Uuid"}},"additionalProperties":false,"type":"object","required":["flow_run_id","bucket","state_type","state_name","is_late","is_retrying","is_cancelling","is_cancellable"],"title":"SuperAdminJobRunDetail","description":"``GET /super-admin/job-runs/{id}`` response — same extension.\n``prefect_ui_url`` is populated on THIS DTO only; the base\n``JobRunDetail.prefect_ui_url`` stays ``None`` on the tenant route."},"SuperAdminJobRunSummary":{"properties":{"flow_run_id":{"type":"string","title":"Flow Run Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"job_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Uuid"},"job_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type"},"deployment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Name"},"flow_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flow Name"},"bucket":{"$ref":"#/components/schemas/JobBucket"},"state_type":{"type":"string","title":"State Type"},"state_name":{"type":"string","title":"State Name"},"is_late":{"type":"boolean","title":"Is Late"},"is_retrying":{"type":"boolean","title":"Is Retrying"},"is_cancelling":{"type":"boolean","title":"Is Cancelling"},"is_cancellable":{"type":"boolean","title":"Is Cancellable"},"state_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Message"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"expected_start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Start Time"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Time"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"asset_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Uuid"},"asset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Name"},"render_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Render Type"},"parameters_summary":{"type":"object","title":"Parameters Summary"},"tenant_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Uuid"}},"additionalProperties":false,"type":"object","required":["flow_run_id","bucket","state_type","state_name","is_late","is_retrying","is_cancelling","is_cancellable"],"title":"SuperAdminJobRunSummary","description":"``GET /super-admin/job-runs`` row — adds ``tenant_uuid``, parsed from\nthe run's ``tenant:`` tag; ``None`` for unattributed runs."},"SuperAdminRunPage":{"properties":{"results":{"items":{"$ref":"#/components/schemas/SuperAdminJobRunSummary"},"type":"array","title":"Results"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"window":{"$ref":"#/components/schemas/RunWindow"}},"additionalProperties":false,"type":"object","required":["results","limit","offset","window"],"title":"SuperAdminRunPage","description":"``GET /super-admin/job-runs`` response envelope.\n\nDeliberately does NOT carry an ``asset_filter`` echo — there is no\nsuper-admin filter chip; that field is tenant-route-only."},"SystemAPIKeyCreateRequest":{"properties":{"user_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Uuid","description":"Optional UUID of the user who owns this system key"},"tenant_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Uuid","description":"Optional UUID of the tenant this key is scoped to"},"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Friendly name for the system API key"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes","description":"List of permission scopes","default":["system:*"]},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"Optional expiration date"}},"type":"object","required":["name"],"title":"SystemAPIKeyCreateRequest"},"SystemAPIKeyCreateResponse":{"properties":{"uuid":{"type":"string","title":"Uuid"},"user_uuid":{"type":"string","title":"User Uuid"},"tenant_uuid":{"type":"string","title":"Tenant Uuid"},"name":{"type":"string","title":"Name"},"api_key":{"type":"string","title":"Api Key"},"key_prefix":{"type":"string","title":"Key Prefix"},"key_type":{"type":"string","title":"Key Type"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["uuid","user_uuid","tenant_uuid","name","api_key","key_prefix","key_type","scopes","expires_at","created_at"],"title":"SystemAPIKeyCreateResponse"},"SystemAPIKeyListResponse":{"properties":{"api_keys":{"items":{"$ref":"#/components/schemas/SystemAPIKeyResponse"},"type":"array","title":"Api Keys"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["api_keys","total"],"title":"SystemAPIKeyListResponse"},"SystemAPIKeyResponse":{"properties":{"uuid":{"type":"string","title":"Uuid"},"user_uuid":{"type":"string","title":"User Uuid"},"tenant_uuid":{"type":"string","title":"Tenant Uuid"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"key_type":{"type":"string","title":"Key Type"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"usage_count":{"type":"integer","title":"Usage Count"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["uuid","user_uuid","tenant_uuid","name","key_prefix","key_type","scopes","last_used_at","usage_count","expires_at","is_active","created_at","updated_at"],"title":"SystemAPIKeyResponse"},"TagAutocompleteResponse":{"properties":{"tags":{"items":{"$ref":"#/components/schemas/TagResponse"},"type":"array","title":"Tags"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["tags","total"],"title":"TagAutocompleteResponse"},"TagResponse":{"properties":{"name":{"type":"string","title":"Name"},"usage_count":{"type":"integer","title":"Usage Count"},"last_used":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used"}},"type":"object","required":["name","usage_count"],"title":"TagResponse"},"TenantCreateRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"TenantCreateRequest"},"TenantDetailsDTO":{"properties":{"uuid":{"type":"string","title":"Uuid"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"currency":{"type":"string","title":"Currency"},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"users":{"items":{"$ref":"#/components/schemas/UserInTenantDTO"},"type":"array","title":"Users"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionInfoDTO"},{"type":"null"}]}},"type":"object","required":["uuid","name","description","currency","stripe_customer_id","created_at","users","subscription"],"title":"TenantDetailsDTO"},"TenantEffectiveJobPricingRow":{"properties":{"job_type":{"type":"string","title":"Job Type"},"render_type":{"type":"string","title":"Render Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"module_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module Slug"},"asset_type_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type Slug"},"tokens":{"type":"integer","title":"Tokens"},"priced":{"type":"boolean","title":"Priced"},"source":{"type":"string","enum":["global","tenant override","not priced"],"title":"Source"},"known_to_registry":{"type":"boolean","title":"Known To Registry"},"pricing_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pricing Uuid"},"matched_render_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Render Type"}},"type":"object","required":["job_type","render_type","tokens","priced","source","known_to_registry"],"title":"TenantEffectiveJobPricingRow","description":"One catalog key's resolved price for one tenant.\n\n`source` names the layer that actually won, and `tokens` /\n`pricing_uuid` / `matched_render_type` are always the resolver's own\nnumbers — this DTO reports the resolver's answer, it never re-derives\none. `matched_render_type` differs from `render_type` exactly in the\nblanket-shadowing case: resolving a named render (`render_type=\"360\"`)\nagainst a tenant's blanket override (`render_type=\"\"`) reports\n`matched_render_type=\"\"`, making the shadowing visible instead of\nimplied."},"TenantJobPricingRow":{"properties":{"uuid":{"type":"string","title":"Uuid"},"tenant_uuid":{"type":"string","title":"Tenant Uuid"},"job_type":{"type":"string","title":"Job Type"},"render_type":{"type":"string","title":"Render Type"},"tokens":{"type":"integer","title":"Tokens"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"updated_by_user_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By User Uuid"}},"type":"object","required":["uuid","tenant_uuid","job_type","render_type","tokens","notes","created_at","updated_at","updated_by_user_uuid"],"title":"TenantJobPricingRow","description":"One row of the `tenant_job_pricing` table for one tenant."},"TenantJobPricingUpsertRequest":{"properties":{"job_type":{"type":"string","title":"Job Type"},"render_type":{"type":"string","title":"Render Type","default":""},"tokens":{"type":"integer","minimum":0.0,"title":"Tokens"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["job_type","tokens"],"title":"TenantJobPricingUpsertRequest","description":"Body for `PUT /super-admin/tenants/{tenant_uuid}/job-pricing` —\nupsert-by-key, same shape rule as `JobPricingUpsertRequest`."},"TenantLogoDTO":{"properties":{"uuid":{"type":"string","title":"Uuid"},"url":{"type":"string","title":"Url"},"path":{"type":"string","title":"Path"}},"type":"object","required":["uuid","url","path"],"title":"TenantLogoDTO"},"TenantMemberDTO":{"properties":{"user_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Uuid"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"},"joined_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Joined At"},"invited_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Invited At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"invitation_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invitation Uuid"},"is_expired":{"type":"boolean","title":"Is Expired","default":false}},"type":"object","required":["email","role","status"],"title":"TenantMemberDTO"},"TenantModuleStatusDTO":{"properties":{"module_uuid":{"type":"string","title":"Module Uuid"},"module_slug":{"type":"string","title":"Module Slug"},"module_display_name":{"type":"string","title":"Module Display Name"},"enabled":{"type":"boolean","title":"Enabled"},"config":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Config"},"enabled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enabled At"},"enabled_by_user_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enabled By User Uuid"}},"type":"object","required":["module_uuid","module_slug","module_display_name","enabled","config","enabled_at","enabled_by_user_uuid"],"title":"TenantModuleStatusDTO","description":"Status of one module for a given tenant.\n\nEvery discovered module appears in the list regardless of whether the\ntenant has an active ``TenantModule`` row — this lets the UI render a\nfull toggle grid."},"TenantModuleUpdateRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"config":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Config"}},"type":"object","required":["enabled"],"title":"TenantModuleUpdateRequest"},"TenantPatchRequest":{"properties":{"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id"}},"type":"object","title":"TenantPatchRequest","description":"Omitting `stripe_customer_id` is distinct from sending an explicit null.\n\nOmitted means \"leave it alone\"; null (or an empty string) means unlink.\nThe caller's intent is read from `model_fields_set`, not from the value."},"TenantPatchResponse":{"properties":{"tenant":{"$ref":"#/components/schemas/TenantDetailsDTO"},"currency_changed_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency Changed From"},"currency_changed_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency Changed To"}},"type":"object","required":["tenant"],"title":"TenantPatchResponse"},"TenantResponse":{"properties":{"uuid":{"type":"string","title":"Uuid"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"logo_media_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Media Uuid"}},"type":"object","required":["uuid","name","description"],"title":"TenantResponse"},"TenantUpdateDTO":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"currency":{"anyOf":[{"type":"string","enum":["usd","gbp"]},{"type":"null"}],"title":"Currency"}},"type":"object","required":["name","description"],"title":"TenantUpdateDTO"},"TenantWithMetricsDTO":{"properties":{"uuid":{"type":"string","title":"Uuid"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"user_count":{"type":"integer","title":"User Count"},"subscription_status":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionStatus"},{"type":"null"}]},"subscription_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Plan"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["uuid","name","description","user_count","subscription_status","subscription_plan","created_at"],"title":"TenantWithMetricsDTO"},"TenantWithRoleDTO":{"properties":{"uuid":{"type":"string","title":"Uuid"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"currency":{"type":"string","title":"Currency"},"logo":{"anyOf":[{"$ref":"#/components/schemas/TenantLogoDTO"},{"type":"null"}]},"user_role":{"type":"string","title":"User Role"}},"type":"object","required":["uuid","name","description","currency","user_role"],"title":"TenantWithRoleDTO"},"ThresholdsUpdateRequest":{"properties":{"low_balance_threshold":{"type":"integer","minimum":0.0,"title":"Low Balance Threshold"},"critical_threshold":{"type":"integer","minimum":0.0,"title":"Critical Threshold"}},"type":"object","required":["low_balance_threshold","critical_threshold"],"title":"ThresholdsUpdateRequest"},"ThumbnailGenerationParams":{"properties":{"params_type":{"type":"string","enum":["thumbnail_generation"],"const":"thumbnail_generation","title":"Params Type","default":"thumbnail_generation"},"shot":{"type":"string","enum":["single","turntable"],"title":"Shot","description":"'single' renders exactly one still frame and uploads only thumbnail_png (no WebM, no turntable loop). 'turntable' (default) is the existing 6-frame animated WebM + PNG path.","default":"turntable"}},"additionalProperties":false,"type":"object","title":"ThumbnailGenerationParams","description":"Execution parameters for a thumbnail_generation job.\n\n``shot`` discriminates between the single-shot PNG action (Generate 2D\nThumbnail — ``shot='single'``) and the pre-existing animated\nturntable path, which is still dispatched as a fire-and-forget sub-flow\nof the format converter and omits ``shot_mode`` entirely (defaulting to\n``'turntable'`` on the flow side)."},"TokenPackageListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TokenPackageResponse"},"type":"array","title":"Items"},"custom_topup":{"anyOf":[{"$ref":"#/components/schemas/CustomTopupDescriptor"},{"type":"null"}],"description":"The tenant's currency-resolved custom-topup Price descriptor, or None if no custom-topup Price is configured for their billing currency."}},"type":"object","required":["items"],"title":"TokenPackageListResponse"},"TokenPackageResponse":{"properties":{"price_id":{"type":"string","title":"Price Id"},"name":{"type":"string","title":"Name"},"tokens":{"type":"integer","title":"Tokens"},"price_cents":{"type":"integer","title":"Price Cents"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["price_id","name","tokens","price_cents","currency"],"title":"TokenPackageResponse","description":"A single fixed-amount token pack, currency-resolved to the tenant's\nStripe billing country.\n\n``bonus_pct``/``price_usd`` are retired — they conflated the pack's\ncurrency-resolved price with a USD-only baseline. Grants are flat, read\nstraight from Stripe's ``token_grant`` metadata."},"TokenPurchaseResponse":{"properties":{"purchased_at":{"type":"string","format":"date-time","title":"Purchased At"},"tokens":{"type":"integer","title":"Tokens"},"amount_minor":{"type":"integer","title":"Amount Minor"},"currency":{"type":"string","title":"Currency"},"pack_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pack Name"},"is_custom":{"type":"boolean","title":"Is Custom"},"payment_intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Intent","description":"Stripe PaymentIntent id, carried through for a future receipt deep-link — data only, no UI requirement today."}},"type":"object","required":["purchased_at","tokens","amount_minor","currency","pack_name","is_custom"],"title":"TokenPurchaseResponse"},"TokenPurchasesTotalResponse":{"properties":{"tokens":{"type":"integer","title":"Tokens"},"amount_minor":{"type":"integer","title":"Amount Minor"}},"type":"object","required":["tokens","amount_minor"],"title":"TokenPurchasesTotalResponse"},"UpdatePasswordRequest":{"properties":{"old_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Old Password","description":"Current password (required if user has password)"},"new_password":{"type":"string","minLength":8,"title":"New Password","description":"New password (minimum 8 characters)"}},"type":"object","required":["new_password"],"title":"UpdatePasswordRequest"},"UpdatePasswordResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"UpdatePasswordResponse"},"UpdateProfileRequest":{"properties":{"name":{"type":"string","maxLength":80,"title":"Name","description":"Display name"}},"type":"object","required":["name"],"title":"UpdateProfileRequest"},"UsageBreakdownResponse":{"properties":{"total_tokens_spent":{"type":"integer","title":"Total Tokens Spent"},"by_model":{"items":{"$ref":"#/components/schemas/UsageByModelResponse"},"type":"array","title":"By Model"},"by_task":{"items":{"$ref":"#/components/schemas/UsageByTaskResponse"},"type":"array","title":"By Task"}},"type":"object","required":["total_tokens_spent","by_model","by_task"],"title":"UsageBreakdownResponse"},"UsageByModel":{"properties":{"provider_id":{"type":"string","title":"Provider Id"},"model_id":{"type":"string","title":"Model Id"},"tokens_spent":{"type":"integer","title":"Tokens Spent"},"call_count":{"type":"integer","title":"Call Count"}},"type":"object","required":["provider_id","model_id","tokens_spent","call_count"],"title":"UsageByModel"},"UsageByModelResponse":{"properties":{"provider_id":{"type":"string","title":"Provider Id"},"provider_name":{"type":"string","title":"Provider Name"},"model_id":{"type":"string","title":"Model Id"},"model_name":{"type":"string","title":"Model Name"},"job_type":{"type":"string","title":"Job Type"},"tokens_spent":{"type":"integer","title":"Tokens Spent"},"call_count":{"type":"integer","title":"Call Count"}},"type":"object","required":["provider_id","provider_name","model_id","model_name","job_type","tokens_spent","call_count"],"title":"UsageByModelResponse"},"UsageByTaskResponse":{"properties":{"job_type":{"type":"string","title":"Job Type"},"tokens_spent":{"type":"integer","title":"Tokens Spent"},"call_count":{"type":"integer","title":"Call Count"}},"type":"object","required":["job_type","tokens_spent","call_count"],"title":"UsageByTaskResponse"},"UsageSummaryResponse":{"properties":{"range_start":{"type":"string","format":"date-time","title":"Range Start"},"range_end":{"type":"string","format":"date-time","title":"Range End"},"total_tokens_spent":{"type":"integer","title":"Total Tokens Spent"},"total_tokens_purchased":{"type":"integer","title":"Total Tokens Purchased"},"total_holds_outstanding":{"type":"integer","title":"Total Holds Outstanding"},"by_model":{"items":{"$ref":"#/components/schemas/UsageByModel"},"type":"array","title":"By Model"}},"type":"object","required":["range_start","range_end","total_tokens_spent","total_tokens_purchased","total_holds_outstanding","by_model"],"title":"UsageSummaryResponse"},"UserDTO":{"properties":{"uuid":{"type":"string","title":"Uuid"},"email":{"type":"string","title":"Email"},"is_verified":{"type":"boolean","title":"Is Verified"},"is_super_admin":{"type":"boolean","title":"Is Super Admin"},"tenant_count":{"type":"integer","title":"Tenant Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["uuid","email","is_verified","is_super_admin","tenant_count","created_at"],"title":"UserDTO"},"UserInTenantDTO":{"properties":{"user_uuid":{"type":"string","title":"User Uuid"},"email":{"type":"string","title":"Email"},"role":{"$ref":"#/components/schemas/UserRole"},"joined_at":{"type":"string","format":"date-time","title":"Joined At"},"is_verified":{"type":"boolean","title":"Is Verified"}},"type":"object","required":["user_uuid","email","role","joined_at","is_verified"],"title":"UserInTenantDTO"},"UserInfoResponse":{"properties":{"uuid":{"type":"string","title":"Uuid"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_verified":{"type":"boolean","title":"Is Verified"},"has_password":{"type":"boolean","title":"Has Password"}},"type":"object","required":["uuid","email","is_verified","has_password"],"title":"UserInfoResponse"},"UserPatchRequest":{"properties":{"is_verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Verified"},"is_super_admin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Super Admin"}},"type":"object","title":"UserPatchRequest"},"UserRole":{"type":"string","enum":["admin","member"],"title":"UserRole"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VersionSummary":{"properties":{"version":{"type":"integer","title":"Version"},"status":{"type":"string","enum":["published","withdrawn","hashing","hash_failed"],"title":"Status"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"published_by_user_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published By User Uuid"},"sha256":{"type":"string","title":"Sha256"},"filesize":{"type":"integer","title":"Filesize"},"poly_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Poly Count"},"dimensions":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Dimensions"}},"type":"object","required":["version","status","sha256","filesize"],"title":"VersionSummary","description":"Slim per-version row used inside ``AssetDetailResponse.versions``.\n\nNewest-first ordering is enforced by the endpoint, not the model."},"ViewOption":{"properties":{"id":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[a-z0-9_-]+$","title":"Id","description":"Short identifier (1–64 chars, ^[a-z0-9_-]+$)"},"label":{"type":"string","maxLength":120,"minLength":1,"title":"Label","description":"Human-readable display string (1–120 chars)"},"object_names":{"items":{"type":"string"},"type":"array","title":"Object Names","description":"GLB node names to show/hide together.  An empty list is allowed and is the right shape for variants that represent a 'nothing shown' state (e.g. InResi's ``id:1:unfurnished`` floorplan variant) — when picked, other variants in the same group are hidden which yields the intended empty render."},"group":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Group","description":"Optional group key.  Options sharing a group are mutually exclusive (radio-style selection in the UI).  When None, the option is independent (checkbox-style)."},"default":{"type":"boolean","title":"Default","description":"Within a group, marks the initial selection.  Ignored for options with group=None.","default":false}},"type":"object","required":["id","label","object_names"],"title":"ViewOption","description":"One entry in meta.view_options — a named visibility toggle.\n\n- id: short identifier used as the React key and for toggle state keying.\n- label: human-readable display string rendered in the toggle UI.\n- object_names: names of the GLB scene-graph nodes whose visibility is\n  bound to this toggle.  Must be non-empty.\n- group: when set, this option is one of several mutually-exclusive\n  variants in the named group — the frontend renders the group as radio\n  buttons and selecting one hides the others.  When None (the default),\n  this option is independent — rendered as a checkbox, toggled on/off\n  without affecting others.\n- default: when this option belongs to a group, indicates the initial\n  selection (exactly one variant per group should be marked default;\n  first option wins if none are).  Ignored for ungrouped options."},"VorticNotifyRequest":{"properties":{"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id","description":"Vortic artwork id or room id (positive integer)."},"type":{"type":"string","enum":["artwork","room"],"title":"Type","description":"Entity type — exactly 'artwork' or 'room' (case-sensitive)."},"gltfpack":{"anyOf":[{"$ref":"#/components/schemas/GlbCompressionParams"},{"type":"null"}],"description":"Optional per-job gltfpack overrides (same knob vocabulary as the standalone GLB compression job), baseline-merged over the compression-only default. Key knobs: texture_mode ('etc1s'/'uastc' = KTX2), texture_quality, texture_scale, texture_limit, simplify_ratio, compression ('none' = meshopt escape hatch). source_media_uuid is rejected."}},"additionalProperties":false,"type":"object","required":["id","type"],"title":"VorticNotifyRequest","description":"The confirmed lean Vortic notify packet plus optional per-job\ngltfpack overrides.\n\nThere is no ``bundleType``/``mediaId``/``organisationId`` in the real\npacket."},"VorticNotifyResponse":{"properties":{"asset_uuid":{"type":"string","title":"Asset Uuid"},"job_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Uuid"},"flow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flow Run Id"},"skipped":{"type":"boolean","title":"Skipped","description":"True when a concurrent active job already existed for this asset and the run was swallowed rather than enqueued again — job_uuid/flow_run_id are None in that case.","default":false}},"type":"object","required":["asset_uuid","job_uuid","flow_run_id"],"title":"VorticNotifyResponse"},"WalletResponse":{"properties":{"uuid":{"type":"string","title":"Uuid"},"tenant_uuid":{"type":"string","title":"Tenant Uuid"},"subscription_balance":{"type":"integer","title":"Subscription Balance"},"addon_balance":{"type":"integer","title":"Addon Balance"},"subscription_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Subscription Period End"},"held":{"type":"integer","title":"Held"},"spendable":{"type":"integer","title":"Spendable","description":"Combined tokens available for new holds = subscription_balance + addon_balance (held excluded)."},"lifetime_purchased":{"type":"integer","title":"Lifetime Purchased"},"lifetime_spent":{"type":"integer","title":"Lifetime Spent"},"low_balance_threshold":{"type":"integer","title":"Low Balance Threshold"},"critical_threshold":{"type":"integer","title":"Critical Threshold"},"extra_usage_enabled":{"type":"boolean","title":"Extra Usage Enabled","description":"Master toggle: gates buying more addon tokens AND freezes spending the existing addon_balance while off."},"monthly_spend_limit_minor":{"type":"integer","title":"Monthly Spend Limit Minor","description":"Per-tenant ceiling on real-money addon spend within the current subscription period, in billing_currency minor units."},"addon_spend_this_period_minor":{"type":"integer","title":"Addon Spend This Period Minor","description":"Money spent buying addon tokens so far this period, in billing_currency minor units — the same value the spend-limit guards enforce against."},"spend_limit_remaining_minor":{"type":"integer","title":"Spend Limit Remaining Minor","description":"max(0, monthly_spend_limit_minor - addon_spend_this_period_minor)."},"subscription_period_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Subscription Period Start","description":"Anchor for the addon-spend aggregation period; None when the tenant has no active/ever subscription (rolling 30-day window used instead)."},"billing_currency":{"type":"string","title":"Billing Currency","description":"Tenant's resolved Stripe billing currency ('gbp' or 'usd') — drives which symbol the UI renders and how every *_minor field here is interpreted."},"auto_topup":{"$ref":"#/components/schemas/AutoTopupConfig"},"version":{"type":"integer","title":"Version"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["uuid","tenant_uuid","subscription_balance","addon_balance","subscription_period_end","held","spendable","lifetime_purchased","lifetime_spent","low_balance_threshold","critical_threshold","extra_usage_enabled","monthly_spend_limit_minor","addon_spend_this_period_minor","spend_limit_remaining_minor","billing_currency","auto_topup","version","updated_at"],"title":"WalletResponse"},"WebhookEventLogDetail":{"properties":{"uuid":{"type":"string","title":"Uuid"},"stripe_event_id":{"type":"string","title":"Stripe Event Id"},"event_type":{"type":"string","title":"Event Type"},"processed":{"type":"boolean","title":"Processed"},"processed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Processed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"outcome":{"type":"string","enum":["succeeded","retrying","gave_up"],"title":"Outcome"},"payload":{"type":"object","title":"Payload"},"attempt_number":{"type":"integer","title":"Attempt Number"},"attempt_count":{"type":"integer","title":"Attempt Count"},"dedupe_confirmed":{"type":"boolean","title":"Dedupe Confirmed"}},"type":"object","required":["uuid","stripe_event_id","event_type","processed","processed_at","created_at","error","outcome","payload","attempt_number","attempt_count","dedupe_confirmed"],"title":"WebhookEventLogDetail"},"WebhookEventLogPage":{"properties":{"results":{"items":{"$ref":"#/components/schemas/WebhookEventLogSummary"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["results","total","limit","offset"],"title":"WebhookEventLogPage"},"WebhookEventLogSummary":{"properties":{"uuid":{"type":"string","title":"Uuid"},"stripe_event_id":{"type":"string","title":"Stripe Event Id"},"event_type":{"type":"string","title":"Event Type"},"processed":{"type":"boolean","title":"Processed"},"processed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Processed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"has_error":{"type":"boolean","title":"Has Error"},"error_excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Excerpt"},"outcome":{"type":"string","enum":["succeeded","retrying","gave_up"],"title":"Outcome"},"attempt_number":{"type":"integer","title":"Attempt Number"},"attempt_count":{"type":"integer","title":"Attempt Count"},"dedupe_confirmed":{"type":"boolean","title":"Dedupe Confirmed"}},"type":"object","required":["uuid","stripe_event_id","event_type","processed","processed_at","created_at","has_error","error_excerpt","outcome","attempt_number","attempt_count","dedupe_confirmed"],"title":"WebhookEventLogSummary"},"WhoAmIResponse":{"properties":{"user_uuid":{"type":"string","title":"User Uuid"},"user_email":{"type":"string","title":"User Email"},"tenant_uuid":{"type":"string","title":"Tenant Uuid"},"api_key_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key Uuid"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"auth_method":{"type":"string","enum":["api_key","jwt"],"title":"Auth Method"},"server_version":{"type":"string","title":"Server Version"}},"type":"object","required":["user_uuid","user_email","tenant_uuid","scopes","auth_method","server_version"],"title":"WhoAmIResponse","description":"Response for ``GET /v1/asset-library/whoami``."},"WorkerProvenance":{"properties":{"machine":{"type":"string","title":"Machine"},"label_unset":{"type":"boolean","title":"Label Unset","default":false},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip"},"cpu":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cpu"},"cores":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cores"},"cores_host":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cores Host"},"ram_gib":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ram Gib"},"ram_limit_gib":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ram Limit Gib"},"cpu_quota_cores":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpu Quota Cores"},"gpu":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu"},"vram_mib":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Vram Mib"},"driver":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Driver"},"gpu_scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu Scope"},"gpu_devices":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gpu Devices"}},"additionalProperties":false,"type":"object","required":["machine"],"title":"WorkerProvenance","description":"One run's resolved D1 machine identity plus hardware facts.\n\n``machine``/``label_unset`` come from line 1 alone, so a pre-Part-B run\n(or one whose line-2 payload failed to parse, FR-B7) still yields a\nfully populated chip with every hardware field ``None``. Field names\nand types are a one-to-one lift of D1's JSON keys — no renaming layer."},"WorkflowAction":{"type":"string","enum":["thumbnail","compression"],"title":"WorkflowAction","description":"Workflow actions that can be triggered after format conversion. Canonical source of truth."},"WorkflowRegistryEntry":{"properties":{"id":{"type":"string","title":"Id"},"provider":{"type":"string","title":"Provider"},"model":{"type":"string","title":"Model"},"wire_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wire Model"},"modality":{"type":"string","title":"Modality"},"kind":{"type":"string","title":"Kind"},"display_name":{"type":"string","title":"Display Name"},"inputs":{"type":"object","title":"Inputs"},"parameters":{"type":"object","title":"Parameters"},"outputs":{"type":"object","title":"Outputs"},"meta":{"type":"object","title":"Meta"},"pricing_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pricing Hint"},"docs_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docs Url"},"pricing_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pricing Url"},"installed_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Installed Uuid"},"suggested":{"$ref":"#/components/schemas/SuggestedBilling"}},"type":"object","required":["id","provider","model","wire_model","modality","kind","display_name","inputs","parameters","outputs","meta","pricing_hint","docs_url","pricing_url","installed_uuid","suggested"],"title":"WorkflowRegistryEntry"},"_LinkedAssetsRequest":{"properties":{"linked_asset_uuids":{"items":{"type":"string"},"type":"array","title":"Linked Asset Uuids"},"linked_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/_LinkedRef"},"type":"array"},{"type":"null"}],"title":"Linked Refs"}},"type":"object","required":["linked_asset_uuids"],"title":"_LinkedAssetsRequest"},"_LinkedRef":{"properties":{"asset_id":{"type":"string","title":"Asset Id"},"lib_name":{"type":"string","title":"Lib Name"},"version_spec":{"type":"string","title":"Version Spec"},"anchor_kind":{"type":"string","title":"Anchor Kind"}},"type":"object","required":["asset_id","lib_name","version_spec","anchor_kind"],"title":"_LinkedRef","description":"One entry in ``Asset.meta.linked_refs`` — a per-anchor cross-asset reference.\n\nWritten by hook (d) from ``scan_repo_anchors`` rows.\n``resolved_version``/``sha256`` are deliberately NOT captured here — they\ngo stale under ``version_spec=\"latest\"``; consumers re-resolve at\nconsume time."},"app__api__asset_library__dtos__PaginatedAssetsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AssetSummaryResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"skip":{"type":"integer","title":"Skip"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["items","total","skip","limit"],"title":"PaginatedAssetsResponse","description":"Paginated envelope returned by ``GET /v1/asset-library/assets``.\n\nMatches the shape the plugin's ``list_assets()`` expects:\n``body.get(\"items\", [])`` and ``body.get(\"total\", ...)``."},"app__api__assets__dtos__PaginatedAssetsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AssetResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"skip":{"type":"integer","title":"Skip"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["items","total","skip","limit"],"title":"PaginatedAssetsResponse"},"app__api__assets__dtos__UploadUrlRequest":{"properties":{"filename":{"type":"string","minLength":1,"title":"Filename"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"role":{"$ref":"#/components/schemas/MediaRole","description":"Type of media file"}},"type":"object","required":["filename","role"],"title":"UploadUrlRequest"},"app__api__assets__dtos__UploadUrlResponse":{"properties":{"upload_url":{"type":"string","title":"Upload Url"},"object_key":{"type":"string","title":"Object Key"},"expires_in":{"type":"integer","title":"Expires In"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"}},"type":"object","required":["upload_url","object_key","expires_in"],"title":"UploadUrlResponse"},"app__api__billing__dtos__InvoiceResponse":{"properties":{"period":{"$ref":"#/components/schemas/InvoicePeriodResponse"},"currency":{"type":"string","title":"Currency","description":"Tenant's current billing currency — authoritative for display even if individual line items carry a different historical charge_currency."},"subscription":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionChargeResponse"},{"type":"null"}]},"token_purchases":{"items":{"$ref":"#/components/schemas/TokenPurchaseResponse"},"type":"array","title":"Token Purchases"},"token_purchases_total":{"$ref":"#/components/schemas/TokenPurchasesTotalResponse"},"usage":{"$ref":"#/components/schemas/UsageBreakdownResponse"},"totals":{"$ref":"#/components/schemas/InvoiceTotalsResponse"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"}},"type":"object","required":["period","currency","subscription","token_purchases","token_purchases_total","usage","totals","generated_at"],"title":"InvoiceResponse"},"app__api__payments__invoices__shared_dtos__InvoiceResponse":{"properties":{"id":{"type":"string","title":"Id"},"stripe_invoice_id":{"type":"string","title":"Stripe Invoice Id"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","title":"Created At"},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number"}},"type":"object","required":["id","stripe_invoice_id","amount","currency","status","created_at"],"title":"InvoiceResponse"},"app__api__tenants__logo__upload_logo__UploadUrlRequest":{"properties":{"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"}},"type":"object","required":["filename","content_type"],"title":"UploadUrlRequest"},"app__api__tenants__logo__upload_logo__UploadUrlResponse":{"properties":{"upload_url":{"type":"string","title":"Upload Url"},"object_key":{"type":"string","title":"Object Key"}},"type":"object","required":["upload_url","object_key"],"title":"UploadUrlResponse"}},"securitySchemes":{"Bearer":{"type":"http","description":"Enter your JWT token (without 'Bearer' prefix)","scheme":"bearer"}}}}