"""图片生成服务层公共 API。"""

from lib.image_backends.base import (
    ImageBackend,
    ImageCapability,
    ImageCapabilityError,
    ImageGenerationRequest,
    ImageGenerationResult,
    ReferenceImage,
)
from lib.image_backends.registry import create_backend, get_registered_backends, register_backend

__all__ = [
    "ImageBackend",
    "ImageCapability",
    "ImageCapabilityError",
    "ImageGenerationRequest",
    "ImageGenerationResult",
    "ReferenceImage",
    "create_backend",
    "get_registered_backends",
    "register_backend",
]
# Backend auto-registration
from lib.image_backends.gemini import GeminiImageBackend
from lib.providers import PROVIDER_ARK, PROVIDER_ARK_AGENT_PLAN, PROVIDER_GEMINI

register_backend(PROVIDER_GEMINI, GeminiImageBackend)

from lib.image_backends.ark import ArkImageBackend

register_backend(PROVIDER_ARK, ArkImageBackend)
register_backend(PROVIDER_ARK_AGENT_PLAN, ArkImageBackend)

from lib.image_backends.grok import GrokImageBackend
from lib.providers import PROVIDER_GROK

register_backend(PROVIDER_GROK, GrokImageBackend)

from lib.image_backends.openai import OpenAIImageBackend
from lib.providers import PROVIDER_OPENAI

register_backend(PROVIDER_OPENAI, OpenAIImageBackend)

from lib.image_backends.vidu import ViduImageBackend
from lib.providers import PROVIDER_VIDU

register_backend(PROVIDER_VIDU, ViduImageBackend)
