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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel


class WorkflowRunCredits(UncheckedBaseModel):
    """
    These are usage credits for workflow runs.

    This field will not be returned for workflow runs created before October 7, 2025, or for customers on legacy billing systems.

    For more details on how credits work, see our [Credits Guide](/product/general/how-credits-work).
    """

    credits: float = pydantic.Field()
    """
    The number of credits consumed for processing in this workflow run.
    """

    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
