Infinite Garden Background Generation API (1.0.0)

Download OpenAPI specification:Download

API for generating a scene around a product photo using a reference image.

This API allows you to:

  • Create scene generation jobs
  • Check job status
  • Cancel running jobs

Authentication is done via an API key that must be included in the header of all requests.

Create a new scene generation job

Creates a new job to generate a scene around your product photo

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
ref_image
required
string

Reference image showing desired scene style (base64 data URL or HTTP URL)

asset_image
required
string

Product photo to place in the scene (base64 data URL or HTTP URL)

prompt
string

Text description of desired scene. If not provided, we will automatically generate a suitable prompt for the image.

width
integer
Default: 1024
Enum: 512 768 1024 1536

Width of output image in pixels. Defaults to 1024.

height
integer
Default: 1024
Enum: 512 768 1024 1536

Height of output image in pixels. Defaults to 1024.

Responses

Request samples

Content type
application/json
{
  • "ref_image": "data:image/jpeg;base64,/9j/4AAQSkZJRg...",
  • "prompt": "A modern minimalist living room",
  • "asset_image": "data:image/jpeg;base64,/9j/4AAQSkZJRg...",
  • "width": 1024,
  • "height": 1024
}

Response samples

Content type
application/json
{
  • "jobId": "job123",
  • "success": true,
  • "message": "Job created successfully"
}

Get job status

Check the status of a scene generation job

Authorizations:
ApiKeyAuth
path Parameters
jobId
required
string
Example: job123

ID of the job to check

Responses

Response samples

Content type
application/json
{
  • "message": "Job completed",
  • "image_data_url": "data:image/jpeg;base64,/9j/4AAQSkZJRg...",
  • "status": "Succeeded"
}

Cancel job

Attempt to cancel a running job. Cancellation will not necessarily succeed.

Authorizations:
ApiKeyAuth
path Parameters
jobId
required
string
Example: job123

ID of the job to cancel

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Job cancelled"
}