{
  "prompt": "A photorealistic smart thermostat with a touch screen interface, modern design",
  "nbr_images": 3,
  "folder_path": "projects/thermostats"
}
{
  "status": "COMPLETED",
  "generated_images": [
    "https://api.productflo.io/global/projects/thermostats/image_1.png",
    "https://api.productflo.io/global/projects/thermostats/image_2.png",
    "https://api.productflo.io/global/projects/thermostats/image_3.png"
  ],
  "error_message": null,
  "created_at": "2023-05-01T12:34:56.789Z"
}

AI Image Generation

ProductFlo provides powerful AI image generation capabilities through various models and providers. These endpoints allow you to generate, manipulate, and analyze images using state-of-the-art AI models.

Image Generation Models

Generates high-quality images from text descriptions using OpenAI’s DALL-E 3 model.

Generate Images with DALL-E

POST /image-generation-openai

Generate images using OpenAI’s DALL-E 3 model

Generates one or more images from a text prompt using OpenAI’s DALL-E 3 model.

Request

curl -X POST https://api.productflo.io/image-generation-openai \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "prompt": "A photorealistic smart thermostat with a touch screen interface, modern design",
    "nbr_images": 3,
    "folder_path": "projects/thermostats"
  }'

Request Body

prompt
string
required

The text description of the image to generate

nbr_images
integer
default:1

Number of images to generate (1-4)

folder_path
string

Optional folder path where generated images will be saved

Response

status
string

Status of the operation (COMPLETED, PROCESSING, ERROR)

generated_images
array

Array of URLs to the generated images

error_message
string

Error message if generation failed

created_at
string

Timestamp of when the images were generated

{
  "prompt": "A photorealistic smart thermostat with a touch screen interface, modern design",
  "nbr_images": 3,
  "folder_path": "projects/thermostats"
}
{
  "status": "COMPLETED",
  "generated_images": [
    "https://api.productflo.io/global/projects/thermostats/image_1.png",
    "https://api.productflo.io/global/projects/thermostats/image_2.png",
    "https://api.productflo.io/global/projects/thermostats/image_3.png"
  ],
  "error_message": null,
  "created_at": "2023-05-01T12:34:56.789Z"
}

Generate Images with Stability AI

POST /image-generation-stability

Generate images using Stability AI models

Generates detailed images with fine-grained control using Stability AI’s diffusion models.

Request

curl -X POST https://api.productflo.io/image-generation-stability \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "prompt": "Photo of a modern electric vehicle charging station, photorealistic, high detail",
    "negative_prompt": "blurry, low quality, distortion, text, watermark",
    "nbr_images": 2,
    "folder_path": "projects/charging-stations"
  }'

Request Body

prompt
string
required

The text description of the image to generate

negative_prompt
string

Elements to avoid in the generated image

nbr_images
integer
default:1

Number of images to generate (1-4)

folder_path
string

Optional folder path where generated images will be saved

Response

Same structure as the OpenAI endpoint response.

Generate Product Photos

POST /image-generation-product-photo

Generate professional product photos

Generates realistic product photos using specialized models from Replicate.

Request

curl -X POST https://api.productflo.io/image-generation-product-photo \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "prompt": "A sleek smartwatch with heart rate monitor and fitness tracking",
    "negative_prompt": "blurry, low quality, people, hands",
    "reference_image": "https://example.com/reference_watch.jpg",
    "nbr_images": 3,
    "folder_path": "projects/smartwatch"
  }'

Request Body

prompt
string
required

The text description of the product to generate

negative_prompt
string

Elements to avoid in the generated image

reference_image
string

Optional URL to a reference image for image-to-image generation

nbr_images
integer
default:1

Number of images to generate (1-4)

folder_path
string

Optional folder path where generated images will be saved

Response

Same structure as the OpenAI endpoint response.

Generate Product Mockups

POST /image-generation-product-mockups

Generate product mockups in various contexts

Generates product mockups showing your product in realistic environments and contexts.

Request Body

prompt
string
required

The text description of the product mockup to generate

negative_prompt
string

Elements to avoid in the generated mockup

reference_image
string

Optional URL to a reference image of the product

nbr_images
integer
default:1

Number of images to generate (1-4)

folder_path
string

Optional folder path where generated images will be saved

Image Analysis with Vision API

POST /image-analysis

Analyze images using AI vision capabilities

Analyzes images using OpenAI’s Vision API to extract information, measurements, and insights.

Request

curl -X POST https://api.productflo.io/image-analysis \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "prompt": "Analyze this circuit board and identify all components",
    "reference_image": "https://example.com/circuit_board.jpg"
  }'

Request Body

prompt
string
required

The question or instruction for analyzing the image

reference_image
string
required

URL to the image to be analyzed

Response

status
string

Status of the operation (COMPLETED, PROCESSING, ERROR)

analysis
string

Detailed analysis of the image based on the prompt

error_message
string

Error message if analysis failed

created_at
string

Timestamp of when the analysis was performed

Recraft Image Processing

ProductFlo integrates with Recraft AI for specialized image processing tasks.

Vectorize Image

POST /recraft-vectorize

Convert raster images to vector graphics

Converts raster images to scalable vector graphics (SVG) format.

Request Body

prompt
string

Optional text description to guide the vectorization

reference_image
string
required

URL to the image to be vectorized

Remove Background

POST /recraft-remove-background

Remove backgrounds from images

Automatically removes the background from an image, producing a transparent PNG.

Request Body

reference_image
string
required

URL to the image to process

Upscale Image

POST /recraft-upscale

Enhance image resolution

Upscales an image to higher resolution while preserving quality.

Request Body

image_path
string
required

Path to the source image

scale_factor
integer
default:2

Upscaling factor (1-4)

mode
string
default:"clarity"

Upscaling mode (clarity or generative)

Custom AI Styles

Create Custom Style

POST /recraft-create-style

Create a custom image generation style

Creates a custom style from reference images that can be used for future generations.

Request Body

name
string
required

Name for the custom style

reference_images
array
required

List of paths to reference images

description
string

Optional style description

List Styles

GET /recraft-list-styles

List available custom styles

Returns a list of all available custom styles.

Get Style

GET /recraft-get-style/{style_id}

Get details of a specific custom style

Returns details about a specific custom style.