Ensure API changes maintain backward compatibility to avoid breaking existing clients and workflows. When adding new functionality, use optional parameters with sensible defaults rather than required parameters. When versioning APIs, follow the /api/v2/resource pattern and maintain deprecated endpoints during transition periods to allow clients time to migrate.

Key practices:

Example of backward-compatible parameter addition:

def INPUT_TYPES(s):
    return {
        "required": {
            "images": ("IMAGE", ),
            "filename_prefix": ("STRING", {"default": "ComfyUI"})
        },
        "optional": {
            "disable_metadata": ("BOOLEAN", {"default": False})  # New parameter as optional
        }
    }

This approach prevents breaking existing API workflows while enabling new functionality for clients that choose to adopt it.