@@ -28,6 +28,7 @@ export class Predictions extends APIResource {
2828 * - Image reframing (reframe)
2929 * - Image to video (image-to-video)
3030 * - Image editing (edit)
31+ * - Product packshot (packshot)
3132 *
3233 * All requests use the versioned format with model_name and inputs structure.
3334 *
@@ -332,7 +333,8 @@ export type PredictionRunParams =
332333 | PredictionRunParams . BackgroundChangeRequest
333334 | PredictionRunParams . BackgroundRemoveRequest
334335 | PredictionRunParams . ImageToVideoRequest
335- | PredictionRunParams . EditRequest ;
336+ | PredictionRunParams . EditRequest
337+ | PredictionRunParams . PackshotRequest ;
336338
337339export declare namespace PredictionRunParams {
338340 export interface TryOnMaxRequest {
@@ -384,9 +386,7 @@ export declare namespace PredictionRunParams {
384386 generation_mode ?: 'balanced' | 'quality' ;
385387
386388 /**
387- * Number of images to generate in a single run. Image generation has a random
388- * element in it, so trying multiple images at once increases the chances of
389- * getting a good result.
389+ * Number of images to generate per request (1-4).
390390 */
391391 num_images ?: number ;
392392
@@ -512,9 +512,7 @@ export declare namespace PredictionRunParams {
512512 moderation_level ?: 'conservative' | 'permissive' | 'none' ;
513513
514514 /**
515- * Number of images to generate in a single run. Image generation has a random
516- * element in it, so trying multiple images at once increases the chances of
517- * getting a good result.
515+ * Number of images to generate per request (1-4).
518516 */
519517 num_samples ?: number ;
520518
@@ -591,7 +589,7 @@ export declare namespace PredictionRunParams {
591589 *
592590 * **Default:** product_image's aspect ratio (standard mode only)
593591 */
594- aspect_ratio ?: '1:1' | '2 :3' | '3:4 ' | '4:5 ' | '5:4' | '4:3 ' | '3:2 ' | '16:9' | '9:16' ;
592+ aspect_ratio ?: '21:9' | ' 1:1' | '4 :3' | '3:2 ' | '2:3 ' | '5:4' | '4:5 ' | '3:4 ' | '16:9' | '9:16' ;
595593
596594 /**
597595 * Sets the generation quality level. 'quality' produces the most detailed and
@@ -692,12 +690,12 @@ export declare namespace PredictionRunParams {
692690 face_image : string ;
693691
694692 /**
695- * Desired aspect ratio for the output image. Only vertical ratios are supported.
696- * Images will always be extended downward to fit the aspect ratio .
693+ * Desired aspect ratio for the output image. Vertical ratios (e.g. `2:3`, `3:4`,
694+ * `9:16`) produce the most natural upper-body portraits .
697695 *
698696 * **Default:** `2:3`
699697 */
700- aspect_ratio ?: '1:1' | '4:5 ' | '3:4 ' | '2:3' | '9:16' ;
698+ aspect_ratio ?: '21:9' | ' 1:1' | '4:3 ' | '3:2 ' | '2:3' | '5:4' | '4:5' | '3:4' | '16:9 ' | '9:16' ;
701699
702700 /**
703701 * Sets the generation quality level. 'quality' produces the most detailed and
@@ -795,6 +793,7 @@ export declare namespace PredictionRunParams {
795793 *
796794 * | Aspect Ratio | Resolution | Use Case |
797795 * | ------------ | ----------- | ----------------------------- |
796+ * | 21:9 | 1568 × 672 | Ultra-wide cinematic |
798797 * | 1:1 | 1024 × 1024 | Square format, social media |
799798 * | 2:3 | 832 × 1248 | Portrait, fashion photography |
800799 * | 3:4 | 880 × 1176 | Standard portrait |
@@ -805,7 +804,7 @@ export declare namespace PredictionRunParams {
805804 * | 16:9 | 1360 × 768 | Widescreen, banners |
806805 * | 9:16 | 760 × 1360 | Vertical video format |
807806 */
808- aspect_ratio ?: '1:1' | '2 :3' | '3:4 ' | '4:5 ' | '5:4' | '4:3 ' | '3:2 ' | '16:9' | '9:16' ;
807+ aspect_ratio ?: '21:9' | ' 1:1' | '4 :3' | '3:2 ' | '2:3 ' | '5:4' | '4:5 ' | '3:4 ' | '16:9' | '9:16' ;
809808
810809 /**
811810 * Optional face reference image to guide facial features in the generated model.
@@ -1062,9 +1061,7 @@ export declare namespace PredictionRunParams {
10621061 generation_mode ?: 'fast' | 'balanced' | 'quality' ;
10631062
10641063 /**
1065- * Number of images to generate in a single run. Image generation has a random
1066- * element in it, so trying multiple images at once increases the chances of
1067- * getting a good result.
1064+ * Number of images to generate per request (1-4).
10681065 */
10691066 num_images ?: number ;
10701067
@@ -1353,9 +1350,96 @@ export declare namespace PredictionRunParams {
13531350 mask ?: string ;
13541351
13551352 /**
1356- * Number of images to generate in a single run. Image generation has a random
1357- * element in it, so trying multiple images at once increases the chances of
1358- * getting a good result.
1353+ * Number of images to generate per request (1-4).
1354+ */
1355+ num_images ?: number ;
1356+
1357+ /**
1358+ * Specifies the desired output image format.
1359+ *
1360+ * - `png`: Delivers the highest quality image, ideal for use cases such as content
1361+ * creation where quality is paramount.
1362+ * - `jpeg`: Provides a faster response with a slightly compressed image, more
1363+ * suitable for real-time applications.
1364+ */
1365+ output_format ?: 'png' | 'jpeg' ;
1366+
1367+ /**
1368+ * Resolution setting for the output image.
1369+ */
1370+ resolution ?: '1k' | '2k' | '4k' ;
1371+
1372+ /**
1373+ * When set to `true`, the API will return the generated image as a base64-encoded
1374+ * string instead of a CDN URL. The base64 string will be prefixed according to the
1375+ * `output_format` (e.g., `data:image/png;base64,...` or
1376+ * `data:image/jpeg;base64,...`). This option offers enhanced privacy as
1377+ * user-generated outputs are not stored on our servers when `return_base64` is
1378+ * enabled.
1379+ */
1380+ return_base64 ?: boolean ;
1381+
1382+ /**
1383+ * Sets random operations to a fixed state. Use the same seed to reproduce results
1384+ * with the same inputs, or different seed to force different results.
1385+ */
1386+ seed ?: number ;
1387+ }
1388+ }
1389+
1390+ export interface PackshotRequest {
1391+ /**
1392+ * Body param
1393+ */
1394+ inputs : PackshotRequest . Inputs ;
1395+
1396+ /**
1397+ * Body param: Turns a product photo into a clean commercial packshot. Optionally
1398+ * accepts a style reference image to guide staging, background, and lighting.
1399+ */
1400+ model_name : 'packshot' ;
1401+
1402+ /**
1403+ * Query param: Optional webhook URL to receive completion notifications
1404+ */
1405+ webhook_url ?: string ;
1406+ }
1407+
1408+ export namespace PackshotRequest {
1409+ export interface Inputs {
1410+ /**
1411+ * Source product image to convert into a commercial packshot. The AI generates a
1412+ * clean studio-style presentation while preserving product identity and detail.
1413+ *
1414+ * Base64 images must include the proper prefix (e.g.,
1415+ * `data:image/jpg;base64,<YOUR_BASE64>`)
1416+ */
1417+ product_image : string ;
1418+
1419+ /**
1420+ * Optional aspect ratio for the output image.
1421+ */
1422+ aspect_ratio ?: '21:9' | '1:1' | '4:3' | '3:2' | '2:3' | '5:4' | '4:5' | '3:4' | '16:9' | '9:16' ;
1423+
1424+ /**
1425+ * Sets the generation quality level. 'quality' produces the most detailed and
1426+ * realistic output but takes longer to process and costs more credits. 'fast'
1427+ * prioritizes speed and lower cost.
1428+ */
1429+ generation_mode ?: 'fast' | 'balanced' | 'quality' ;
1430+
1431+ /**
1432+ * Optional URL or base64 of a style reference image guiding the packshot
1433+ * presentation (staging, background, lighting). The reference influences styling
1434+ * without overriding the product itself.
1435+ *
1436+ * Base64 images must include the proper prefix (e.g.,
1437+ * `data:image/jpg;base64,<YOUR_BASE64>`)
1438+ */
1439+ image_context ?: string ;
1440+
1441+ /**
1442+ * Number of images to generate per request (1-4).
13591443 */
13601444 num_images ?: number ;
13611445
@@ -1369,6 +1453,15 @@ export declare namespace PredictionRunParams {
13691453 */
13701454 output_format ?: 'png' | 'jpeg' ;
13711455
1456+ /**
1457+ * Optional natural-language description of the desired packshot styling. If empty,
1458+ * the model picks a sensible commercial default for the detected product.
1459+ *
1460+ * **Examples:** "clean white background flat-lay", "soft studio lighting on a
1461+ * beige pedestal", "isolated on a marble surface"
1462+ */
1463+ prompt ?: string ;
1464+
13721465 /**
13731466 * Resolution setting for the output image.
13741467 */
0 commit comments