module pixeltable.functions.reve
Pixeltable UDFs that wrap Reve image generation API. In order to use them, the API key must be specified either withREVE_API_KEY environment variable,
or as api_key in the reve section of the Pixeltable config file.
udf create()
Signature
<frame>0</frame>, <frame>1</frame>, etc. tags to refer to the reference images.
This UDF wraps the https://api.reve.com/v2/image/create endpoint. For more information, refer to the official
API documentation.
Parameters:
prompt(pxt.String): prompt describing the desired imagereferences(pxt.Json[(Image): optional list of reference images to guide the modelaspect_ratio(Any): desired image aspect ratio, e.g. ‘3:2’, ‘16:9’, ‘1:1’, etc.postprocessing(Any): optional list of postprocessing operations to apply to the generated image e.g.[{'process': 'effect', 'effect_name': 'low_light'}].version(Any): specific model version to use. Latest if not specified.model_kwargs(Any): additional keyword arguments to pass to the Reve API.
ImageResponse: A dictionary containing the generated image ('image'key) and layout metadata ('layout'key) returned by the Reve API.