# File generated from our OpenAPI spec by Castiron. See CONTRIBUTING.md for details.

from typing import Optional

from .._models import BaseModel

__all__ = ["Image"]


class Image(BaseModel):
    """Represents the content or the URL of an image generated by the OpenAI API."""

    b64_json: Optional[str] = None
    """The base64-encoded JSON of the generated image.

    Returned by default for GPT image models, or when `response_format` is set to
    `b64_json` for models that support that parameter.
    """

    revised_prompt: Optional[str] = None
    """
    The revised prompt used to generate the image, for models that support prompt
    revision. Not returned by GPT image models.
    """

    url: Optional[str] = None
    """
    The URL of the generated image when `response_format` is set to `url` for models
    that support that parameter. Unsupported for GPT image models.
    """
