Skip to main content

diffusion(text, callback=None)

Create a new text-to-image generation task.
Parameters:
  • text (str): Text prompt (1-8192 characters)
  • callback (str, optional): Webhook URL
Returns: TaskResponse with job_id and status

variation(job_id, image_no, type, remix_prompt=None, callback=None)

Create variations of a generated image.
Parameters:
  • job_id (str): Original image task ID
  • image_no (int): Image index (0-3)
  • type (int): Variation intensity (0=Subtle, 1=Strong)
  • remix_prompt (str, optional): Additional guidance
  • callback (str, optional): Webhook URL

upscale(job_id, image_no, type, callback=None)

Upscale a generated image.
Parameters:
  • job_id (str): Original image task ID
  • image_no (int): Image index (0-3)
  • type (int): Upscaling type (0=Subtle, 1=Creative)
  • callback (str, optional): Webhook URL

reroll(job_id, callback=None)

Regenerate with the same prompt.
Parameters:
  • job_id (str): Original image task ID
  • callback (str, optional): Webhook URL

blend(img_urls, aspect_ratio, callback=None)

Blend 2-5 images together.
Parameters:
  • img_urls (list): List of 2-5 image URLs
  • aspect_ratio (str): Image ratio (“2:3”, “1:1”, or “3:2”)
  • callback (str, optional): Webhook URL

describe(img_url, callback=None)

Generate text descriptions from an image.
Parameters:
  • img_url (str): URL of image to describe
  • callback (str, optional): Webhook URL

shorten(prompt, callback=None)

Optimize and shorten a prompt.
Parameters:
  • prompt (str): Prompt text to optimize
  • callback (str, optional): Webhook URL

pan(job_id, image_no, direction, scale, remix_prompt=None, callback=None)

Extend image in a specific direction.
Parameters:
  • job_id (str): Original image task ID
  • image_no (int): Image index (0-3)
  • direction (int): Direction to pan (0=Down, 1=Right, 2=Up, 3=Left)
  • scale (float): Expansion scale (1.1-3.0)
  • remix_prompt (str, optional): Additional guidance
  • callback (str, optional): Webhook URL

outpaint(job_id, image_no, scale, remix_prompt=None, callback=None)

Expand image in all directions.
Parameters:
  • job_id (str): Original image task ID
  • image_no (int): Image index (0-3)
  • scale (float): Expansion scale (1.1-2.0)
  • remix_prompt (str, optional): Additional guidance
  • callback (str, optional): Webhook URL

inpaint(job_id, image_no, mask, remix_prompt=None, callback=None)

Edit specific regions using a mask.
Parameters:
  • job_id (str): Original image task ID
  • image_no (int): Image index (0-3)
  • mask (bytes): Binary mask data (PNG format)
  • remix_prompt (str, optional): Description of edits
  • callback (str, optional): Webhook URL

remix(job_id, image_no, remix_prompt, mode=None, callback=None)

Transform image with a new prompt.
Parameters:
  • job_id (str): Original image task ID
  • image_no (int): Image index (0-3)
  • remix_prompt (str): New prompt for transformation
  • mode (int, optional): Remix strength (0=Strong, 1=Subtle)
  • callback (str, optional): Webhook URL

edit(job_id, image_no, canvas, img_pos, remix_prompt, mask=None, callback=None)

Edit with canvas positioning.
Parameters:
  • job_id (str): Original image task ID
  • image_no (int): Image index (0-3)
  • canvas (Canvas): Canvas dimensions (width, height)
  • img_pos (CanvasImg): Image positioning on canvas
  • remix_prompt (str): Description of edits
  • mask (Mask, optional): Mask with polygon areas
  • callback (str, optional): Webhook URL

upload_paint(img_url, canvas, img_pos, remix_prompt, mask, callback=None)

Advanced painting on uploaded images.
Parameters:
  • img_url (str): URL of image to paint on
  • canvas (Canvas): Canvas dimensions (width, height)
  • img_pos (CanvasImg): Image positioning on canvas
  • remix_prompt (str): Description of effects
  • mask (Mask): Mask with URL
  • callback (str, optional): Webhook URL

retexture(img_url, remix_prompt, callback=None)

Change textures and surfaces.
Parameters:
  • img_url (str): URL of image to retexture
  • remix_prompt (str): Texture description
  • callback (str, optional): Webhook URL

remove_background(img_url, callback=None)

Remove the background from an image.
Parameters:
  • img_url (str): URL of image to process
  • callback (str, optional): Webhook URL

enhance(job_id, image_no, callback=None)

Enhance image quality (draft to high-res).
Parameters:
  • job_id (str): Original image task ID
  • image_no (int): Image index (0-3)
  • callback (str, optional): Webhook URL

Next Steps