# AI Product Photo Generator (`akash9078/ai-product-photo-generator`) Actor

Transform product images into professional advertising creatives using Kie.ai's GPT Image-2 API

- **URL**: https://apify.com/akash9078/ai-product-photo-generator.md
- **Developed by:** [Akash Kumar Naik](https://apify.com/akash9078) (community)
- **Categories:** AI, E-commerce, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.00005 / actor start

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## AI Product Photo Generator

<meta name="description" content="Transform product images into professional advertising visuals with AI. Generate e-commerce photos, social media ads, lifestyle shots using GPT Image-2. $0.03 per generation.">
<meta name="keywords" content="AI product photo generator, product photo to ad, AI image generator, product photography AI, e-commerce photo generator, social media ad generator, AI lifestyle photo, AI product visualization, advertising photo generator, GPT Image-2, product to ad AI, commercial photography AI, Kie.ai image generator">

<link rel="canonical" href="https://apify.com/ai-product-photo-generator">

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "SoftwareApplication",
  "name": "AI Product Photo Generator",
  "description": "Transform product images into professional advertising visuals using AI-powered GPT Image-2 technology.",
  "url": "https://apify.com/ai-product-photo-generator",
  "applicationCategory": "MarketingSoftware",
  "operatingSystem": "Cloud",
  "offers": {
    "@type": "Offer",
    "price": "0.03",
    "priceCurrency": "USD",
    "description": "$0.03 per successful product photo generation"
  },
  "provider": {
    "@type": "Organization",
    "name": "Apify"
  }
}
</script>

## AI Product Photo Generator

**Transform product images into professional advertising visuals with AI.**

Convert ordinary product photos into stunning lifestyle advertising shots, e-commerce visuals, and social media content using advanced AI. Simply upload a product image URL, customize your prompt, and receive professionally styled photos ready for marketing campaigns.

### What does this tool do?

This AI-powered tool transforms product images into professional advertising visuals. Perfect for e-commerce sellers, digital marketers, and brands that need high-quality product photos without expensive photography studios.

**Key capabilities:**
- Transform product photos into lifestyle advertising shots with AI models
- Generate multiple visual variations from a single product image
- Support for all major image sources: URLs, Google Drive, Dropbox, OneDrive, SharePoint
- Multiple aspect ratios: 1:1, 5:4, 9:16, 21:9, 16:9, 4:3, 3:2, 4:5, 3:4, 2:3
- Automatic storage in Apify cloud - images never expire

### Why use the AI Product Photo Generator?

**Business applications:**
- Create professional e-commerce product photos without photography equipment
- Generate social media ads for Instagram, TikTok, and Pinterest
- Produce A/B testing variations for marketing campaigns
- Scale product photography for large catalogs
- Create lifestyle lifestyle shots featuring models and environments

**Platform benefits:**
Built on Apify's cloud infrastructure with monitoring, API access, scheduling, and integrations. No servers to manage or infrastructure to maintain.

### How to generate product photos

1. Provide a public URL of your product image
2. Enter a transformation prompt describing your desired output
3. Select an aspect ratio for the generated visuals
4. Run the tool and receive AI-generated product photos

Generation typically takes 30-90 seconds depending on queue. Maximum wait time is 24 minutes.

### How much does it cost?

**$0.04 per successful photo generation**

Pay-per-event pricing means you only pay for completed generations. No subscription required. Apify provides 5 seconds of free compute per run.

This tool requires a paid Apify plan due to AI model API costs.

[Upgrade to paid plan](https://apify.com/pricing)

### Input

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `productImageUrl` | string | Yes | Public URL of product image (JPEG, PNG, WebP) |
| `prompt` | string | Yes | Transformation description (max 20,000 characters) |
| `aspectRatio` | string | No | Output ratio: `auto`, `1:1`, `5:4`, `9:16`, `21:9`, `16:9`, `4:3`, `3:2`, `4:5`, `3:4`, `2:3` |

#### Example Input

```json
{
  "productImageUrl": "https://drive.google.com/file/d/1S5sCnyVmnRHxk/view",
  "prompt": "Professional product photography with young female model wearing the product, 9:16 vertical aspect ratio, soft studio lighting, minimalist aesthetic, natural landscape background",
  "aspectRatio": "9:16"
}
````

### Output

Each run produces dataset items with the following structure:

```json
{
  "taskId": "230ea2c4df0b05f891eac757fae9ddf0",
  "productImageUrl": "https://example.com/product.jpg",
  "prompt": "Professional product photography...",
  "kieUrl": "https://tempfile.aiquickdraw.com/na2/230ea2c4df0b05f891eac757fae9ddf01943608.png"
}
```

Download generated images from Apify key-value store with keys `image_0.png`, `image_1.png`, etc.

### Supported image sources

| Source | URL format |
|--------|------------|
| Direct URLs | `https://example.com/image.jpg` |
| Google Drive | `https://drive.google.com/file/d/...` |
| Dropbox | `https://www.dropbox.com/s/...` |
| OneDrive | `https://1drv.ms/i/s!...` |
| SharePoint | `https://contoso.sharepoint.com/...` |

### Technical specifications

| Specification | Value |
|---------------|-------|
| AI Model | GPT Image-2 Image-to-Image |
| Runtime | Node.js 18 |
| Memory | 256 MB |
| Timeout | 3600 seconds |
| Polling | 8-second intervals, 180 max iterations |
| Pricing | Pay-per-event: $0.03 per generation |

### FAQ

**What image formats are supported?**
JPEG, PNG, WebP from direct URLs or cloud storage (Google Drive, Dropbox, OneDrive, SharePoint).

**How long does generation take?**
Typically 30-90 seconds depending on queue. Maximum wait time is 24 minutes.

**Can I use this with a free Apify plan?**
No, this tool requires a paid Apify plan due to AI model API costs.

**What aspect ratios are available?**
Auto, 1:1 (square), 5:4, 9:16 (vertical/story), 21:9 (ultrawide), 16:9 (landscape), 4:3, 3:2, 4:5, 3:4, 2:3.

**Where are generated images stored?**
In Apify key-value store as permanent files with keys `image_0.png`, `image_1.png`, etc. They won't expire like temporary AI service URLs.

**How does pay-per-event pricing work?**
You pay $0.03 only for successful generations. No charge for failed runs or timeouts.

**What prompt should I use?**
Use descriptive prompts mentioning style, lighting, mood, and any models or environments you want. The AI transforms your product image according to your description.

### Related

- [GPT Image-2 API](https://kie.ai/gpt-image-2) — AI image-to-image model documentation
- [Apify Platform](https://apify.com) — Web automation and integration platform
- [Pay-Per-Event Documentation](https://docs.apify.com/platform/actors/publishing/monetize/pay-per-event) — Apify pricing guide

### Legal disclaimer

This tool transforms images through the Kie.ai API. Users must ensure they have rights to transform and use product images for commercial purposes. Personal data protection regulations apply when processing images containing individuals.

### License

MIT

# Actor input Schema

## `productImageUrl` (type: `string`):

Public URL of the product image to transform. Supported: direct URLs, Google Drive, Dropbox, OneDrive, SharePoint. Formats: JPEG, PNG, WebP

## `prompt` (type: `string`):

Text description of how to transform the product image. Include style, mood, and advertising message. Max 20,000 characters.

## `aspectRatio` (type: `string`):

Aspect ratio for the generated ad creative

## Actor input object example

```json
{
  "productImageUrl": "https://drive.google.com/file/d/1S5sCnyVmnRHxk233EfZ6byjClr8pxaUU/view?usp=drive_link",
  "prompt": "Professional product photography of a young white female model wearing/holding the provided [PRODUCT], 9:16 vertical Pinterest aspect ratio, front-facing portrait with direct confident eye contact, natural soft studio lighting with large softbox and fill reflector, high-resolution 8K commercial quality, minimalist aesthetic with product clearly showcased as hero element, choose from backgrounds: prefer natural landscape.",
  "aspectRatio": "auto"
}
```

# Actor output Schema

## `results` (type: `string`):

JSON array containing the full generation result including success status, task metadata, and generated image information. Each item represents one ad creative generation run.

## `generatedImages` (type: `string`):

Downloaded ad creative images stored in the Apify key-value store. Images are stored with keys 'image\_0.png', 'image\_1.png', etc. These images are permanently stored and won't expire like Kie.ai URLs.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "productImageUrl": "https://drive.google.com/file/d/1S5sCnyVmnRHxk233EfZ6byjClr8pxaUU/view?usp=drive_link",
    "prompt": "Professional product photography of a young white female model wearing/holding the provided [PRODUCT], 9:16 vertical Pinterest aspect ratio, front-facing portrait with direct confident eye contact, natural soft studio lighting with large softbox and fill reflector, high-resolution 8K commercial quality, minimalist aesthetic with product clearly showcased as hero element, choose from backgrounds: prefer natural landscape.",
    "aspectRatio": "auto"
};

// Run the Actor and wait for it to finish
const run = await client.actor("akash9078/ai-product-photo-generator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "productImageUrl": "https://drive.google.com/file/d/1S5sCnyVmnRHxk233EfZ6byjClr8pxaUU/view?usp=drive_link",
    "prompt": "Professional product photography of a young white female model wearing/holding the provided [PRODUCT], 9:16 vertical Pinterest aspect ratio, front-facing portrait with direct confident eye contact, natural soft studio lighting with large softbox and fill reflector, high-resolution 8K commercial quality, minimalist aesthetic with product clearly showcased as hero element, choose from backgrounds: prefer natural landscape.",
    "aspectRatio": "auto",
}

# Run the Actor and wait for it to finish
run = client.actor("akash9078/ai-product-photo-generator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "productImageUrl": "https://drive.google.com/file/d/1S5sCnyVmnRHxk233EfZ6byjClr8pxaUU/view?usp=drive_link",
  "prompt": "Professional product photography of a young white female model wearing/holding the provided [PRODUCT], 9:16 vertical Pinterest aspect ratio, front-facing portrait with direct confident eye contact, natural soft studio lighting with large softbox and fill reflector, high-resolution 8K commercial quality, minimalist aesthetic with product clearly showcased as hero element, choose from backgrounds: prefer natural landscape.",
  "aspectRatio": "auto"
}' |
apify call akash9078/ai-product-photo-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=akash9078/ai-product-photo-generator",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "AI Product Photo Generator",
        "description": "Transform product images into professional advertising creatives using Kie.ai's GPT Image-2 API",
        "version": "1.0",
        "x-build-id": "Bh83mt31Y2PO6M48n"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/akash9078~ai-product-photo-generator/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-akash9078-ai-product-photo-generator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/akash9078~ai-product-photo-generator/runs": {
            "post": {
                "operationId": "runs-sync-akash9078-ai-product-photo-generator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/akash9078~ai-product-photo-generator/run-sync": {
            "post": {
                "operationId": "run-sync-akash9078-ai-product-photo-generator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "productImageUrl",
                    "prompt"
                ],
                "properties": {
                    "productImageUrl": {
                        "title": "Product Image URL",
                        "type": "string",
                        "description": "Public URL of the product image to transform. Supported: direct URLs, Google Drive, Dropbox, OneDrive, SharePoint. Formats: JPEG, PNG, WebP"
                    },
                    "prompt": {
                        "title": "Ad Creative Prompt",
                        "type": "string",
                        "description": "Text description of how to transform the product image. Include style, mood, and advertising message. Max 20,000 characters.",
                        "default": "Professional product photography of a young white female model wearing/holding the provided [PRODUCT], 9:16 vertical Pinterest aspect ratio, front-facing portrait with direct confident eye contact, natural soft studio lighting with large softbox and fill reflector, high-resolution 8K commercial quality, minimalist aesthetic with product clearly showcased as hero element, choose from backgrounds: prefer natural landscape."
                    },
                    "aspectRatio": {
                        "title": "Image Aspect Ratio",
                        "enum": [
                            "auto",
                            "1:1",
                            "5:4",
                            "9:16",
                            "21:9",
                            "16:9",
                            "4:3",
                            "3:2",
                            "4:5",
                            "3:4",
                            "2:3"
                        ],
                        "type": "string",
                        "description": "Aspect ratio for the generated ad creative",
                        "default": "auto"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
