SmartGen

SmartGen for Image Generation (Experimental)

Experimental Feature SmartGen is currently in beta. API endpoints and behaviors may evolve as improvements are introduced.


Overview SmartGen offers a high level interface for generating images with advanced prompt engineering and precise control over image dimensions and style. It supports both FLUX and Stable Diffusion models.


Basic Example

tsCopy codeimport Cinna from 'cinna';

const cinna = new Cinna({
  apiKey: process.env['CINNA_API_KEY']
});

const response = await cinna.smartgen.generateImage({
  description: "A futuristic cyberpunk portrait of a young woman",
  image_model: "FLUX.1-dev",
  stylization_level: 3,
  detail_level: 4,
  color_level: 5,
  lighting_level: 2
});

Parameters and Controls SmartGen accepts the following input parameters:


Two Step Generation

You can decouple image creation into two steps for greater control:

Response Format (if param_only is true)


One Step Generation

For direct image creation:


Demonstration The following example illustrates the change in color intensity from monochrome to highly vibrant using color_level from 1 to 5:

Example 1: “A futuristic cyberpunk portrait of a young woman”

Example 2: “Hot air balloons in the sky”.

Last updated