Emilia AI Studio β€” API Reference

Generate AI product, food, jewelry, clothing, furniture and cosmetics images programmatically.

Base URL: https://ai.emilia.digital/wp-json/emai/v1

Authentication

All API requests must include your personal API key as a Bearer token in the Authorization header. Generate or rotate your key under My Account β†’ Integrations.

Authorization: Bearer YOUR_API_KEY
Keep it secret. Each render call deducts credits from your account. Never embed the key in client-side code β€” proxy it through your own server.

POST /ai-image-render

POST https://ai.emilia.digital/wp-json/emai/v1/ai-image-render

Generates a single AI image from a source product photo.

Headers

HeaderValue
AuthorizationrequiredBearer YOUR_API_KEY
Content-Typerequiredapplication/json

Body parameters

FieldTypeDescription
image_data_urlrequired* string Source image as a base64 data URL (data:image/jpeg;base64,...) or a publicly reachable HTTPS URL. *Either this or image_id must be provided.
image_idoptional integer WordPress media library attachment ID (only useful if you uploaded the source via WP).
moderequired string Product category. See Modes. Example: product, jewelry, food.
presetrequired* string Style ID for the chosen mode. See Styles per mode. *Required unless using presenter_id or custom_prompt.
presenter_idoptional integer ID of a presenter (model/character) to feature. Get the list via POST /get-plugin-config.
custom_promptoptional string Free-form text prompt β€” overrides preset styling.
aspectoptional string Output aspect ratio. Defaults to 1:1. See Aspect ratios.
resolutionoptional string Output resolution. Defaults to 1K. Affects credit cost β€” see Resolutions.
additional_imagesoptional string[] Up to ~3 extra reference images (data URLs or HTTPS URLs) β€” e.g. brand logo, color reference, secondary product.
replacement_imageoptional string Background image (data URL or HTTPS URL) used by area-replacement styles.
helper fieldsoptional various Per-style fine-tuning fields β€” see Style helpers.

Modes (categories)

Each mode unlocks a different set of styles and helper fields.

IDTitleUse case
product General Studio and lifestyle renders for most products.
jewelry Jewelry Luxury commercial shots for fine jewelry.
clothing Clothing E-commerce and editorial photography for apparel.
food Food & Drinks Delicious food and drink photography.
furniture Furniture Professional room scenes and studio shots for furniture.
cosmetics Beauty & Cosmetics High-end editorial and studio photography for skincare, makeup, and fragrances.

Styles per mode

Pass the style ID via the preset field. Styles are derived from the helper configuration β€” each style ID below is valid for the indicated mode.

General (product)

with_presenter scene pure_white studio_gradient color_backdrop

System presets for this mode

IDTitleDescription
pure_white Clean Packshot Clean, minimalist background for product focus.
studio_gradient Studio Surface Premium studio shot on marble, wood, concrete, and more.
editorial_close_up_product Editorial Close-Up Artistic close-up shots highlighting product details.
scene By Location Place your product in a real-life scene.
with_presenter With Presenter Show your product with a presenter (AI model or real person).
reference By Reference Generate the product image based on a reference image.

Food & Drinks (food)

top_view side_view action_image lifestyle hands_touch macro_texture

System presets for this mode

IDTitleDescription
side_view Side View Side angle to highlight layers and height.
top_view Top View Overhead shot showing the entire dish.
lifestyle Lifestyle Dish styled naturally with subtle props on the table.
hands_touch Hands and Touch Show interaction with the dish via hands or utensils.
macro_texture Macro Texture Close-up of textures, layers, and details.
reference_food By Reference Generate the dish image based on a reference image.

Jewelry (jewelry)

studio_packshot macro_detail styled_still_life on_model collection_showcase lifestyle_jewelry

System presets for this mode

IDTitleDescription
studio_packshot Studio Packshot Flawless e-commerce shot on a clean studio background.
styled_still_life Styled Still Life Editorial shot with luxury props like fabric, stone, or florals.
collection_showcase Collection Artful composition of multiple pieces for high-impact ads.
on_model On Body Shows the jewelry on the relevant body part to demonstrate scale and fit.
lifestyle_jewelry Lifestyle Scene Show the jewelry in a real-world, aspirational setting.
reference_jewelry By Reference Generate a jewelry image based on a reference style or photo.

Clothing (clothing)

editorial_close_up ecommerce_packshot artistic_flat_lay studio_model lifestyle_scene reference_clothing

System presets for this mode

IDTitleDescription
ecommerce_packshot Packshot Clean, standardized shot for product catalogs.
editorial_close_up Macro Detail Extreme close-up highlighting texture, logo, or key garment details.
artistic_flat_lay Artistic Flat Lay Creative top-down shot for lookbooks and social media.
studio_model Studio Model Classic lookbook shot with a model in a studio.
lifestyle_scene Lifestyle Scene Show the product in a real-world, aspirational setting.
reference_clothing By Reference Generate an apparel image based on a reference photo.

Furniture (furniture)

furniture_packshot minimalist_space cozy_vignette furniture_with_model material_detail

System presets for this mode

IDTitleDescription
furniture_packshot Studio Packshot Clean white background for e-commerce catalogs.
minimalist_space Minimalist Room Airy, uncluttered space to highlight the furniture.
cozy_vignette Styled Living Space Styled room with decor and soft lighting.
material_detail Material Detail Macro shot emphasizing textures and material finishes.
furniture_with_model With Presenter Furniture with a presenter for scale and context.
reference_furniture By Reference Room aesthetics based on an inspiration photo.

Beauty & Cosmetics (cosmetics)

cosmetics_packshot earthy_minimalism texture_swatch minimalist_vanity cosmetics_with_model

System presets for this mode

IDTitleDescription
cosmetics_packshot Studio Packshot Clean white or solid color background for e-commerce.
earthy_minimalism Natural Elements Luxurious setup with raw stone, plaster, or water ripples.
texture_swatch Texture Swatch Artistic macro shot showing formula texture alongside packaging.
minimalist_vanity Clean Vanity High-end bathroom or spa setting with warm, soft lighting.
cosmetics_with_model With Presenter Presenter with glowing skin holding or applying the product.
reference_cosmetics By Reference Aesthetic, lighting, and mood based on an inspiration photo.

Aspect ratios

Pass via the aspect field. Default: 1:1.

ValueUse case
1:1Square
4:5Social post
9:16Social story
16:9Widescreen
3:4Traditional
3:2Standard
4:3Classic
21:9Ultrawide

Resolutions & credit cost

Pass via the resolution field. Default: 1K.

ValuePixels (longest side)Credits per render
512 512px 2
1K 1024px 3
2K 2048px 4
4K 4096px 6

Style helpers (per-style options)

Each style accepts an additional set of fine-tuning fields. Add these as top-level keys in the request body. Helpers not in the chosen style's list are ignored.

General (product)

FieldTypeDefaultApplies to stylesOptions
presenter_interaction
Interaction
select holding with_presenter
holding Holding the Product
auto Auto
using Using the Product
hand_closeup Hands Close-Up
show_scale Show Scale
unboxing Unboxing
gifting Gifting / Presenting
commercial_scene Commercial Scene (No Holding)
editorial_story Editorial Story
lifestyle_context Lifestyle Context (Nearby)
presenter_shot
Shot Type
select full_body with_presenter
hands_only Hands Only
tabletop Tabletop + Hands
close_up Close-Up
half_body Half Body
full_body Full Body
bg_scene
Location
select living_room scene with_presenter
living_room Living Room
kitchen Kitchen
bedroom Bedroom
bathroom Bathroom
home_office Home Office
dining_room Dining Room
hallway_entryway Hallway/Entryway
retail_store Retail Store
cafe_restaurant Cafe/Restaurant
art_gallery Art Gallery
workshop_studio_creative Creative Workshop/Studio
gym_fitness_center Gym/Fitness Center
spa_wellness_center Spa/Wellness Center
library_bookstore Library/Bookstore
warehouse_industrial Warehouse/Industrial Space
garden_backyard Garden/Backyard
park_green_space Park/Green Space
beach_waterfront Beach/Waterfront
forest_woods Forest/Woods
mountain_wilderness Mountain/Wilderness
city_street_urban City Street/Urban
outdoor_cafe_terrace Outdoor Cafe/Terrace
residential_balcony_terrace Residential Balcony/Terrace
plain_seamless_background Plain Seamless Background
abstract_geometric_space Abstract Geometric Space
scene_style
Environment Style
select minimalist_modern scene with_presenter
minimalist_modern Minimalist Modern
contemporary_clean Contemporary Clean
scandinavian Scandinavian
japandi Japandi
mid_century_modern Mid-Century Modern
vintage_classic Vintage Classic
art_deco Art Deco
retro_80s Retro 80s
retro_90s Retro 90s
rustic_farmhouse Rustic Farmhouse
eco_natural_organic Eco/Natural/Organic
mediterranean_warm Mediterranean Warm
coastal_nautical Coastal/Nautical
tropical_resort Tropical Resort
zen_wabi_sabi Zen / Wabi-Sabi
industrial_loft Industrial Loft
urban_street_gritty Urban Street / Gritty
studio_high_key Studio High-Key
studio_low_key Studio Low-Key
monochrome_high_contrast Monochrome / High Contrast
pastel_soft Pastel / Soft
dark_moody Dark and Moody
high_tech_sleek High-Tech Sleek
futuristic_sci_fi Futuristic / Sci-Fi
pop_art_color Pop Art / Color Pop
shadow
Surface
select soft pure_white
soft Soft Shadow
none None
reflection Reflection
product_surface
Surface
select gradient studio_gradient
gradient Gradient (Classic)
seamless_paper Seamless Paper
marble Marble
wood Wood
concrete Concrete
terrazzo Terrazzo
linen Linen / Fabric
dark_slate Dark Slate
acrylic Acrylic / Glass
sand Sand
bg_color
Background
color #ffffff color_backdrop pure_white studio_gradient Hex color, e.g. #FFFFFF
product_width_cm
Width (cm)
number β€” scene with_presenter free text
product_height_cm
Height (cm)
number β€” scene with_presenter free text
product_depth_cm
Depth (cm)
number β€” scene with_presenter free text

Food & Drinks (food)

FieldTypeDefaultApplies to stylesOptions
food_background
Background
select marble top_view side_view action_image lifestyle hands_touch macro_texture
clean Clean
marble Marble
wood Wood
concrete Concrete
textured_paper Textured Paper
food_style
Style
select realistic top_view side_view action_image lifestyle hands_touch macro_texture
realistic Realistic
color_pop Color Pop
food_surface
Vessel
select keep_original_vessel top_view side_view action_image lifestyle hands_touch macro_texture
round_plate Round Plate
square_plate Rectangle Plate
bowl Bowl
metal_plate Metal Plate
board_slate Board / Slate
wooden_board Wooden Board
fabric_napkin Fabric / Napkin
keep_original_vessel Same as Original Image
no_surface None
food_color
Color
color #000000 top_view side_view action_image lifestyle hands_touch macro_texture Hex color, e.g. #FFFFFF

Jewelry (jewelry)

FieldTypeDefaultApplies to stylesOptions
jewelry_bg_color
Background
color #ffffff studio_packshot Hex color, e.g. #FFFFFF
jewelry_composition_style
Composition
select standing studio_packshot
centered Centered
standing Standing / Upright
flat_lay Flat Lay (Top-Down)
angled Angled View
jewelry_shadow_style
Shadow
select soft studio_packshot
soft Soft Shadow
reflection Reflection
none None (Floating)
jewelry_focus_point
Focus Point
select center_gemstone macro_detail
center_gemstone Center Gemstone
metal_details Metal Details
full_clarity Full Clarity (Sharp)
jewelry_macro_background
Background
select out_of_focus_gradient macro_detail
out_of_focus_gradient Out of Focus Gradient
subtle_texture Subtle Texture
jewelry_scene_elements
Scene Elements
select luxe_fabric styled_still_life
luxe_fabric Luxe Fabric (Silk/Velvet)
natural_stone Natural Stone (Marble/Slate)
organic Organic (Petal/Leaf)
jewelry_mood
Mood
select light_and_airy styled_still_life
light_and_airy Light and Airy
dark_and_moody Dark and Moody
jewelry_gender
Gender
select female on_model
female Female
male Male
jewelry_skin_tone
Skin Tone
select light on_model
light Light Tones
medium Medium Tones
deep Dark Tones
jewelry_body_part
Body Part
select auto on_model
auto Auto
hand_wrist Hand and Wrist
finger Finger
ear_lobe Ear Lobe
neck_decollete Neck and DΓ©colletΓ©
nose Nose
jewelry_model_background
Background
select studio_background on_model
studio_background Studio Background
soft_focus_environment Soft Focus Environment
jewelry_layout_style
Layout Style
select dynamic_cascade collection_showcase
dynamic_cascade Dynamic Cascade
ordered_array Ordered Array
focused_stack Focused Stack
jewelry_background_surface
Background Surface
select reflective_mirror collection_showcase
reflective_mirror Reflective Mirror
seamless_color Seamless Color
textured_material Textured Material
jewelry_theme_color
Color
color #ffffff collection_showcase styled_still_life on_model Hex color, e.g. #FFFFFF
jewelry_creative_direction
Creative Direction
select clean_editorial_portrait lifestyle_jewelry
clean_editorial_portrait Clean Editorial Portrait
dramatic_dark_portrait Dramatic Dark Portrait
color_story_portrait Color Story Portrait
getting_ready_moment Getting Ready Moment
captured_in_motion Captured in Motion
the_quiet_moment The Quiet Moment
night_out_after_dark Night Out / After Dark
silk_and_skin Silk & Skin
wet_and_fresh Wet & Fresh
sun_kissed_golden Sun-Kissed & Golden
mirror_and_reflection Mirror & Reflection
monochrome_world Monochrome World
botanical_beauty Botanical Beauty
beach_and_ocean Beach & Ocean
desert_golden_dunes Desert & Golden Dunes
city_rooftop_skyline City Rooftop / Skyline
poolside Poolside
mediterranean_terrace Mediterranean Terrace
jewelry_expression
Expression
select confident_direct lifestyle_jewelry
confident_direct Confident & Direct
soft_contemplative Soft & Contemplative
playful_expressive Playful & Expressive
jewelry_shot_type
Shot Type
select focus_on_jewelry lifestyle_jewelry
focus_on_jewelry Focus on Jewelry
wide_portrait Wide Portrait

Clothing (clothing)

FieldTypeDefaultApplies to stylesOptions
fabric_type
Fabric Type
select auto editorial_close_up
auto Auto (Detect)
cotton Cotton
linen Linen
silk Silk
wool Wool
cashmere Cashmere
denim Denim
leather Leather
synthetic_polyester Synthetic / Polyester
knit Knit
fleece Fleece
velvet Velvet
satin Satin
chiffon Chiffon
nylon Nylon
spandex_stretch Spandex / Stretch
suede Suede
corduroy Corduroy
lace Lace
garment_view
Garment View
select front ecommerce_packshot artistic_flat_lay studio_model lifestyle_scene reference_clothing
front Front View
back Back View
garment_fit
Garment Fit
select true_to_size ecommerce_packshot artistic_flat_lay studio_model lifestyle_scene reference_clothing
true_to_size True to Size (Standard)
slim_fit Slim Fit
loose_fit Oversized / Loose
relaxed_fit Relaxed Fit
display_style
Display Style
select flat_lay ecommerce_packshot
flat_lay Flat Lay
ghost_mannequin Ghost Mannequin
front_view Front View (Shoes, Hats)
surface_type
Surface
select wood artistic_flat_lay
wood Wood
marble Marble
concrete Concrete
linen_fabric Linen Fabric
seamless_paper Seamless Paper
background_type
Background
select seamless_paper studio_model
seamless_paper Seamless Paper
concrete_wall Concrete Wall
plaster_wall Plaster Wall
industrial_brick Industrial Brick
bg_color
Background
color #ffffff ecommerce_packshot studio_model artistic_flat_lay Hex color, e.g. #FFFFFF
model_shot
Model Shot
select full_body studio_model lifestyle_scene
full_body Full Body
waist_up Waist-Up
flatlay_view
View Angle
select top_down artistic_flat_lay
top_down Flat Lay (Top-Down)
front_view Front View (Shoes, Hats)
lighting_style
Lighting
select soft_studio artistic_flat_lay
soft_studio Soft Studio
natural_sunlight Natural Sunlight
dramatic_high_contrast Dramatic / High Contrast
scene_location
Scene Location
select urban_city_street lifestyle_scene
urban_city_street Urban City Street
modern_cafe Modern Cafe
rooftop_lounge Rooftop Lounge
subway_station Subway Station
park_nature Park / Nature
beach_coastal Beach / Coastal
forest_trail Forest Trail
botanical_garden Botanical Garden
minimalist_interior Minimalist Interior
art_gallery Art Gallery
library_bookstore Library / Bookstore
luxury_hotel_lobby Luxury Hotel Lobby
new_york_city New York City
los_angeles Los Angeles
san_francisco San Francisco
miami Miami
toronto Toronto
mexico_city Mexico City
buenos_aires Buenos Aires
rio_de_janeiro Rio de Janeiro
havana Havana
london London
paris Paris
rome Rome
milan Milan
barcelona Barcelona
madrid Madrid
berlin Berlin
amsterdam Amsterdam
copenhagen Copenhagen
lisbon Lisbon
vienna Vienna
prague Prague
athens Athens
dubai Dubai
doha Doha
jeddah Jeddah
istanbul Istanbul
tel_aviv Tel Aviv
jerusalem Jerusalem
cairo Cairo
marrakech Marrakech
cape_town Cape Town
nairobi Nairobi
tokyo Tokyo
seoul Seoul
shanghai Shanghai
bangkok Bangkok
singapore Singapore
sydney Sydney
santorini Santorini
amalfi_coast Amalfi Coast
time_of_day
Time of Day
select auto lifestyle_scene
auto Auto β€” Best for Scene
golden_hour Golden Hour
morning Early Morning
midday Midday Sun
blue_hour Blue Hour / Dusk
night Night
weather_condition
Weather
select clear lifestyle_scene
clear Clear
cloudy Cloudy
rainy Rainy
snowy Snowy
foggy Foggy

Furniture (furniture)

FieldTypeDefaultApplies to stylesOptions
furniture_angle
View Angle
select auto furniture_packshot
auto Auto
no_change No Change
front Front View
side Side View
isometric 3/4 Isometric View
top_down Top-Down / Birdseye
furniture_shadow
Surface
select soft furniture_packshot
soft Soft Drop Shadow (Floor)
hard Hard Studio Shadow
none None (Floating)
furniture_bg_color
Background
color #ffffff furniture_packshot Hex color, e.g. #FFFFFF
furniture_room_type
Room / Space Type
select clean_studio minimalist_space cozy_vignette furniture_with_model
clean_studio Clean Studio Space
living_room Living Room
bedroom Bedroom
dining_room Dining Room
home_office Home Office
outdoor_patio Outdoor Patio / Balcony
office_coworking Office / Coworking Space
restaurant_cafe Restaurant / Cafe
hotel_lobby Hotel Lobby / Lounge
retail_store Retail Store / Boutique
conference_room Conference Room
furniture_design_style
Interior Design Style
select auto minimalist_space cozy_vignette furniture_with_model
auto Auto
modern Modern
rustic Rustic
nordic Nordic
boho_chic Boho Chic
industrial Industrial
classic Classic
tuscan Tuscan
provence Provence
eclectic Eclectic
retro Retro
vintage Vintage
wabi_sabi Wabi Sabi
ethnic Ethnic
urban Urban
american American
japanese Japanese
minimalist Minimalist
shabby_chic Shabby Chic
moroccan Moroccan
furniture_material
Material Focus
select auto material_detail
auto Auto (Let AI Detect)
wood_grain Wood Grain
leather Leather
velvet Velvet
linen_cotton Linen / Cotton
boucle Boucle / Textured Fabric
metal_finish Metal Finish
stone_marble Stone / Marble
furniture_interaction
Model Interaction
select auto furniture_with_model
auto Auto
sitting Sitting on the furniture
standing_next Standing next to it
leaning Leaning on / Touching
lounging Lounging / Relaxed
furniture_width_cm
Width (cm)
number β€” minimalist_space cozy_vignette furniture_with_model free text
furniture_height_cm
Height (cm)
number β€” minimalist_space cozy_vignette furniture_with_model free text
furniture_depth_cm
Depth (cm)
number β€” minimalist_space cozy_vignette furniture_with_model free text

Beauty & Cosmetics (cosmetics)

FieldTypeDefaultApplies to stylesOptions
cosmetics_angle
View Angle
select auto cosmetics_packshot
auto Auto
no_change No Change
front Front View
slightly_above Slightly Above
top_down Top-Down / Flat Lay
cosmetics_shadow
Surface
select soft cosmetics_packshot
soft Soft Studio Shadow
reflection Mirror Reflection
hard_light Hard Sunlight Shadow
none None (Floating)
cosmetics_bg_color
Background
color #F5F5F0 cosmetics_packshot Hex color, e.g. #FFFFFF
cosmetics_element
Primary Element
select travertine_stone earthy_minimalism
travertine_stone Travertine Stone Slab
plaster_clay Raw Plaster & Clay
shallow_water Shallow Water Pool & Ripples
wet_stone Wet Stone & Water Drops
fine_sand Fine Sand / Earth
alabaster_marble Smooth Alabaster Marble
cosmetics_env_color
Atmosphere / Surface Color
color #E8DCC4 earthy_minimalism Hex color, e.g. #FFFFFF
cosmetics_formula
Formula Texture
select thick_cream texture_swatch
thick_cream Thick Moisturizer Cream
clear_serum Clear Serum Drop
foaming_cleanser Foaming Cleanser Bubbles
grainy_scrub Grainy Exfoliating Scrub
body_oil Golden Body Oil Splash
loose_powder Loose Mineral Powder
cosmetics_swatch_color
Background / Surface Color
color #F2EBE5 texture_swatch Hex color, e.g. #FFFFFF
cosmetics_vanity
Vanity Setup
select marble_sink minimalist_vanity
marble_sink Clean Marble Sink Edge
spa_towels Soft Spa Towels Setup
warm_wood_shelf Warm Wooden Bath Shelf
glass_shower Steamy Glass Shower Ledge
cosmetics_interaction
Model Pose
select holding_near_face cosmetics_with_model
holding_near_face Holding delicately near face
applying_to_cheek Applying texture to cheek
resting_on_collarbone Resting on collarbone/shoulder
holding_in_palm Holding cleanly in palm
cosmetics_model_scene
Background Scene
select clean_studio cosmetics_with_model
clean_studio Clean Studio Backdrop
natural_sunlight Natural Window Sunlight & Shadows
textured_plaster Textured Plaster / Earthy Wall
spa_bathroom Luxury Spa / Bathroom Setting
water_nature Soft Nature / Water Background
cosmetics_width_cm
Width (cm)
number β€” earthy_minimalism minimalist_vanity cosmetics_with_model texture_swatch free text
cosmetics_height_cm
Height (cm)
number β€” earthy_minimalism minimalist_vanity cosmetics_with_model texture_swatch free text
cosmetics_depth_cm
Depth (cm)
number β€” earthy_minimalism minimalist_vanity cosmetics_with_model texture_swatch free text

Response format

Success β€” 200 OK

{
  "ok": true,
  "data_url": "https://cdn.emilia.digital/.../generated.jpg",
  "s3": {
    "item": {
      "public_id": "abc123",
      "display_url": "https://cdn.emilia.digital/.../generated.jpg"
    }
  },
  "firstTry": false,
  "credits_available": null
}

data_url is the canonical CDN URL of your generated image β€” store this on your end.

Error

{
  "code": "no_credits",
  "message": "no_credits",
  "data": { "status": 402 }
}

Errors

StatusCodeMeaning
400 no_image No image was provided in the request.
400 bad_data_url The image_data_url is not a valid base64 image.
401 invalid_key Missing or invalid Authorization Bearer key.
402 no_credits User has no remaining credits for this resolution.
429 rate_limited Too many requests β€” slow down and retry.
429 busy Concurrency limit hit β€” retry shortly.
500 generation_failed The AI provider returned no result.
503 encode_failed The provider blocked or could not encode the result.

Full examples

cURL β€” minimal request

curl -X POST 'https://ai.emilia.digital/wp-json/emai/v1/ai-image-render' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "mode": "product",
    "preset": "pure_white",
    "aspect": "1:1",
    "resolution": "1K",
    "image_data_url": "https://example.com/my-product.jpg"
  }'

cURL β€” with helpers (jewelry on model)

curl -X POST 'https://ai.emilia.digital/wp-json/emai/v1/ai-image-render' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "mode": "jewelry",
    "preset": "on_model",
    "aspect": "4:5",
    "resolution": "2K",
    "model": "gemini",
    "image_data_url": "https://example.com/ring.jpg",
    "jewelry_gender": "female",
    "jewelry_skin_tone": "medium",
    "jewelry_body_part": "finger",
    "jewelry_model_background": "soft_focus_environment"
  }'

Node.js (fetch)

const res = await fetch('https://ai.emilia.digital/wp-json/emai/v1/ai-image-render', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.EMILIA_API_KEY}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    mode: 'food',
    preset: 'top_view',
    aspect: '1:1',
    resolution: '1K',
    image_data_url: 'https://example.com/dish.jpg',
    food_background: 'marble',
    food_style: 'realistic'
  })
});

const json = await res.json();
console.log(json.data_url);

PHP

$response = wp_remote_post('https://ai.emilia.digital/wp-json/emai/v1/ai-image-render', [
    'timeout' => 120,
    'headers' => [
        'Authorization' => 'Bearer ' . EMILIA_API_KEY,
        'Content-Type'  => 'application/json',
    ],
    'body' => wp_json_encode([
        'mode'           => 'clothing',
        'preset'         => 'studio_model',
        'aspect'         => '4:5',
        'resolution'     => '2K',
        'image_data_url' => 'https://example.com/shirt.jpg',
        'garment_view'   => 'front',
        'garment_fit'    => 'true_to_size',
        'background_type'=> 'seamless_paper',
        'bg_color'       => '#FFFFFF',
    ]),
]);

$body = json_decode(wp_remote_retrieve_body($response), true);
echo $body['data_url'];
Tip: render calls can take 15–60 seconds. Set a generous timeout (β‰₯120 s) and consider running calls async on your end.