Supermachine icon

Supermachine

Interact with Supermachine AI Image API

Tools → Instruct Edit

AI-generated

Summary

Submit an image edit job to Supermachine using a text instruction, returning a batch ID for status polling or immediate result if polling is skipped.

Inputs

  • imageSource — Where to get the source image from; defaults to imageId if not specified.
  • imageId (required) — The ID of the image to edit; shown when imageSource is imageId.
  • imageUrl (required) — The URL of the image to edit; shown when imageSource is imageUrl.
  • instruction (required) — Text instruction describing the edit to make (e.g., 'make it sunset').
  • additionalOptions — Optional collection for folder storage and polling behavior.

Output shape

object containing batchId, success status, operation type, instruction, creditsCost, creditsRemaining, processedAt, and either immediate submitted status or completed image result.

If skipPolling is true, returns immediately with batch ID and 'submitted' status. Otherwise, polls the Supermachine API every pollingInterval seconds up to maxPollingTime seconds for completion.

Examples

Example 1: edit an image by ID with instruction and skip polling

imageSource=imageId, imageId=12345, instruction='make it sunset', skipPolling=true, pollingInterval=2, maxPollingTime=120

Example 2: edit an image by URL with full polling

imageSource=imageUrl, imageUrl='https://example.com/img.jpg', instruction='change background to blue', skipPolling=false, pollingInterval=2, maxPollingTime=120

Links

Discussion