name:str=Field(...,description='Name of the color palette',examples=['PASTEL'])
classMagicPrompt2(str,Enum):
ON='ON'
OFF='OFF'
classStyleType1(str,Enum):
AUTO='AUTO'
GENERAL='GENERAL'
REALISTIC='REALISTIC'
DESIGN='DESIGN'
FICTION='FICTION'
classRenderingSpeed(str,Enum):
DEFAULT='DEFAULT'
TURBO='TURBO'
QUALITY='QUALITY'
classIdeogramV3EditRequest(BaseModel):
color_palette:Optional[IdeogramColorPalette]=None
image:Optional[StrictBytes]=Field(
None,
description='The image being edited (max size 10MB); only JPEG, WebP and PNG formats are supported at this time.',
)
magic_prompt:Optional[str]=Field(
None,
description='Determine if MagicPrompt should be used in generating the request or not.',
)
mask:Optional[StrictBytes]=Field(
None,
description='A black and white image of the same size as the image being edited (max size 10MB). Black regions in the mask should match up with the regions of the image that you would like to edit; only JPEG, WebP and PNG formats are supported at this time.',
)
num_images:Optional[int]=Field(
None,description='The number of images to generate.'
)
prompt:str=Field(
...,description='The prompt used to describe the edited result.'
)
rendering_speed:RenderingSpeed
seed:Optional[int]=Field(
None,description='Random seed. Set for reproducible generation.'
)
style_codes:Optional[List[StyleCode]]=Field(
None,
description='A list of 8 character hexadecimal codes representing the style of the image. Cannot be used in conjunction with style_reference_images or style_type.',
description='A set of images to use as style references (maximum total size 10MB across all style references). The images should be in JPEG, PNG or WebP format.',
description='Generations with character reference are subject to the character reference pricing. A set of images to use as character references (maximum total size 10MB across all character references), currently only supports 1 character reference image. The images should be in JPEG, PNG or WebP format.'
description='Optional masks for character reference images. When provided, must match the number of character_reference_images. Each mask should be a grayscale image of the same dimensions as the corresponding character reference image. The images should be in JPEG, PNG or WebP format.'
)
classIdeogramV3Request(BaseModel):
aspect_ratio:Optional[str]=Field(
None,description='Aspect ratio in format WxH',examples=['1x3']
)
color_palette:Optional[ColorPalette]=None
magic_prompt:Optional[MagicPrompt2]=Field(
None,description='Whether to enable magic prompt enhancement'
)
negative_prompt:Optional[str]=Field(
None,description='Text prompt specifying what to avoid in the generation'
)
num_images:Optional[int]=Field(
None,description='Number of images to generate',ge=1
)
prompt:str=Field(...,description='The text prompt for image generation')
rendering_speed:RenderingSpeed
resolution:Optional[str]=Field(
None,description='Image resolution in format WxH',examples=['1280x800']
)
seed:Optional[int]=Field(
None,description='Seed value for reproducible generation'
)
style_codes:Optional[List[StyleCode]]=Field(
None,description='Array of style codes in hexadecimal format'
)
style_reference_images:Optional[List[str]]=Field(
None,description='Array of reference image URLs or identifiers'
description='Generations with character reference are subject to the character reference pricing. A set of images to use as character references (maximum total size 10MB across all character references), currently only supports 1 character reference image. The images should be in JPEG, PNG or WebP format.'
description='Optional masks for character reference images. When provided, must match the number of character_reference_images. Each mask should be a grayscale image of the same dimensions as the corresponding character reference image. The images should be in JPEG, PNG or WebP format.'