# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class ImageAnalyzeResponse(UniversalBaseModel):
    """
    Response schema for image analysis.
    """

    success: bool = pydantic.Field()
    """
    Whether the analysis was successful
    """

    extracted_data: typing.Dict[str, typing.Any] = pydantic.Field()
    """
    Extracted structured data matching the provided schema
    """

    confidence: float = pydantic.Field()
    """
    Confidence score for extraction quality (0-100)
    """

    cost_chf: float = pydantic.Field()
    """
    Estimated cost in CHF for this analysis
    """

    model_used: str = pydantic.Field()
    """
    Model used for analysis
    """

    provider: str = pydantic.Field()
    """
    Provider that processed the request
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
