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
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
| Header | Value |
|---|---|
Authorizationrequired | Bearer YOUR_API_KEY |
Content-Typerequired | application/json |
Body parameters
| Field | Type | Description |
|---|---|---|
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.
| ID | Title | Use 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)
System presets for this mode
| ID | Title | Description |
|---|---|---|
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)
System presets for this mode
| ID | Title | Description |
|---|---|---|
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)
System presets for this mode
| ID | Title | Description |
|---|---|---|
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)
System presets for this mode
| ID | Title | Description |
|---|---|---|
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)
System presets for this mode
| ID | Title | Description |
|---|---|---|
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)
System presets for this mode
| ID | Title | Description |
|---|---|---|
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.
| Value | Use case |
|---|---|
1:1 | Square |
4:5 | Social post |
9:16 | Social story |
16:9 | Widescreen |
3:4 | Traditional |
3:2 | Standard |
4:3 | Classic |
21:9 | Ultrawide |
Resolutions & credit cost
Pass via the resolution field. Default: 1K.
| Value | Pixels (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)
| Field | Type | Default | Applies to styles | Options | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
presenter_interactionInteraction |
select |
holding |
with_presenter |
|
||||||||||||||||||||||||||||||||||||||||||||||||||
presenter_shotShot Type |
select |
full_body |
with_presenter |
|
||||||||||||||||||||||||||||||||||||||||||||||||||
bg_sceneLocation |
select |
living_room |
scene with_presenter |
|
||||||||||||||||||||||||||||||||||||||||||||||||||
scene_styleEnvironment Style |
select |
minimalist_modern |
scene with_presenter |
|
||||||||||||||||||||||||||||||||||||||||||||||||||
shadowSurface |
select |
soft |
pure_white |
|
||||||||||||||||||||||||||||||||||||||||||||||||||
product_surfaceSurface |
select |
gradient |
studio_gradient |
|
||||||||||||||||||||||||||||||||||||||||||||||||||
bg_colorBackground |
color |
#ffffff |
color_backdrop pure_white studio_gradient |
Hex color, e.g. #FFFFFF
|
||||||||||||||||||||||||||||||||||||||||||||||||||
product_width_cmWidth (cm) |
number |
β | scene with_presenter | free text | ||||||||||||||||||||||||||||||||||||||||||||||||||
product_height_cmHeight (cm) |
number |
β | scene with_presenter | free text | ||||||||||||||||||||||||||||||||||||||||||||||||||
product_depth_cmDepth (cm) |
number |
β | scene with_presenter | free text |
Food & Drinks (food)
| Field | Type | Default | Applies to styles | Options | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
food_backgroundBackground |
select |
marble |
top_view side_view action_image lifestyle hands_touch macro_texture |
|
||||||||||||||||||
food_styleStyle |
select |
realistic |
top_view side_view action_image lifestyle hands_touch macro_texture |
|
||||||||||||||||||
food_surfaceVessel |
select |
keep_original_vessel |
top_view side_view action_image lifestyle hands_touch macro_texture |
|
||||||||||||||||||
food_colorColor |
color |
#000000 |
top_view side_view action_image lifestyle hands_touch macro_texture |
Hex color, e.g. #FFFFFF
|
Jewelry (jewelry)
| Field | Type | Default | Applies to styles | Options | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jewelry_bg_colorBackground |
color |
#ffffff |
studio_packshot |
Hex color, e.g. #FFFFFF
|
||||||||||||||||||||||||||||||||||||
jewelry_composition_styleComposition |
select |
standing |
studio_packshot |
|
||||||||||||||||||||||||||||||||||||
jewelry_shadow_styleShadow |
select |
soft |
studio_packshot |
|
||||||||||||||||||||||||||||||||||||
jewelry_focus_pointFocus Point |
select |
center_gemstone |
macro_detail |
|
||||||||||||||||||||||||||||||||||||
jewelry_macro_backgroundBackground |
select |
out_of_focus_gradient |
macro_detail |
|
||||||||||||||||||||||||||||||||||||
jewelry_scene_elementsScene Elements |
select |
luxe_fabric |
styled_still_life |
|
||||||||||||||||||||||||||||||||||||
jewelry_moodMood |
select |
light_and_airy |
styled_still_life |
|
||||||||||||||||||||||||||||||||||||
jewelry_genderGender |
select |
female |
on_model |
|
||||||||||||||||||||||||||||||||||||
jewelry_skin_toneSkin Tone |
select |
light |
on_model |
|
||||||||||||||||||||||||||||||||||||
jewelry_body_partBody Part |
select |
auto |
on_model |
|
||||||||||||||||||||||||||||||||||||
jewelry_model_backgroundBackground |
select |
studio_background |
on_model |
|
||||||||||||||||||||||||||||||||||||
jewelry_layout_styleLayout Style |
select |
dynamic_cascade |
collection_showcase |
|
||||||||||||||||||||||||||||||||||||
jewelry_background_surfaceBackground Surface |
select |
reflective_mirror |
collection_showcase |
|
||||||||||||||||||||||||||||||||||||
jewelry_theme_colorColor |
color |
#ffffff |
collection_showcase styled_still_life on_model |
Hex color, e.g. #FFFFFF
|
||||||||||||||||||||||||||||||||||||
jewelry_creative_directionCreative Direction |
select |
clean_editorial_portrait |
lifestyle_jewelry |
|
||||||||||||||||||||||||||||||||||||
jewelry_expressionExpression |
select |
confident_direct |
lifestyle_jewelry |
|
||||||||||||||||||||||||||||||||||||
jewelry_shot_typeShot Type |
select |
focus_on_jewelry |
lifestyle_jewelry |
|
Clothing (clothing)
| Field | Type | Default | Applies to styles | Options | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fabric_typeFabric Type |
select |
auto |
editorial_close_up |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
garment_viewGarment View |
select |
front |
ecommerce_packshot artistic_flat_lay studio_model lifestyle_scene reference_clothing |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
garment_fitGarment Fit |
select |
true_to_size |
ecommerce_packshot artistic_flat_lay studio_model lifestyle_scene reference_clothing |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
display_styleDisplay Style |
select |
flat_lay |
ecommerce_packshot |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
surface_typeSurface |
select |
wood |
artistic_flat_lay |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
background_typeBackground |
select |
seamless_paper |
studio_model |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bg_colorBackground |
color |
#ffffff |
ecommerce_packshot studio_model artistic_flat_lay |
Hex color, e.g. #FFFFFF
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
model_shotModel Shot |
select |
full_body |
studio_model lifestyle_scene |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
flatlay_viewView Angle |
select |
top_down |
artistic_flat_lay |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lighting_styleLighting |
select |
soft_studio |
artistic_flat_lay |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
scene_locationScene Location |
select |
urban_city_street |
lifestyle_scene |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
time_of_dayTime of Day |
select |
auto |
lifestyle_scene |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
weather_conditionWeather |
select |
clear |
lifestyle_scene |
|
Furniture (furniture)
| Field | Type | Default | Applies to styles | Options | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
furniture_angleView Angle |
select |
auto |
furniture_packshot |
|
||||||||||||||||||||||||||||||||||||||||
furniture_shadowSurface |
select |
soft |
furniture_packshot |
|
||||||||||||||||||||||||||||||||||||||||
furniture_bg_colorBackground |
color |
#ffffff |
furniture_packshot |
Hex color, e.g. #FFFFFF
|
||||||||||||||||||||||||||||||||||||||||
furniture_room_typeRoom / Space Type |
select |
clean_studio |
minimalist_space cozy_vignette furniture_with_model |
|
||||||||||||||||||||||||||||||||||||||||
furniture_design_styleInterior Design Style |
select |
auto |
minimalist_space cozy_vignette furniture_with_model |
|
||||||||||||||||||||||||||||||||||||||||
furniture_materialMaterial Focus |
select |
auto |
material_detail |
|
||||||||||||||||||||||||||||||||||||||||
furniture_interactionModel Interaction |
select |
auto |
furniture_with_model |
|
||||||||||||||||||||||||||||||||||||||||
furniture_width_cmWidth (cm) |
number |
β | minimalist_space cozy_vignette furniture_with_model | free text | ||||||||||||||||||||||||||||||||||||||||
furniture_height_cmHeight (cm) |
number |
β | minimalist_space cozy_vignette furniture_with_model | free text | ||||||||||||||||||||||||||||||||||||||||
furniture_depth_cmDepth (cm) |
number |
β | minimalist_space cozy_vignette furniture_with_model | free text |
Beauty & Cosmetics (cosmetics)
| Field | Type | Default | Applies to styles | Options | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cosmetics_angleView Angle |
select |
auto |
cosmetics_packshot |
|
||||||||||||
cosmetics_shadowSurface |
select |
soft |
cosmetics_packshot |
|
||||||||||||
cosmetics_bg_colorBackground |
color |
#F5F5F0 |
cosmetics_packshot |
Hex color, e.g. #FFFFFF
|
||||||||||||
cosmetics_elementPrimary Element |
select |
travertine_stone |
earthy_minimalism |
|
||||||||||||
cosmetics_env_colorAtmosphere / Surface Color |
color |
#E8DCC4 |
earthy_minimalism |
Hex color, e.g. #FFFFFF
|
||||||||||||
cosmetics_formulaFormula Texture |
select |
thick_cream |
texture_swatch |
|
||||||||||||
cosmetics_swatch_colorBackground / Surface Color |
color |
#F2EBE5 |
texture_swatch |
Hex color, e.g. #FFFFFF
|
||||||||||||
cosmetics_vanityVanity Setup |
select |
marble_sink |
minimalist_vanity |
|
||||||||||||
cosmetics_interactionModel Pose |
select |
holding_near_face |
cosmetics_with_model |
|
||||||||||||
cosmetics_model_sceneBackground Scene |
select |
clean_studio |
cosmetics_with_model |
|
||||||||||||
cosmetics_width_cmWidth (cm) |
number |
β | earthy_minimalism minimalist_vanity cosmetics_with_model texture_swatch | free text | ||||||||||||
cosmetics_height_cmHeight (cm) |
number |
β | earthy_minimalism minimalist_vanity cosmetics_with_model texture_swatch | free text | ||||||||||||
cosmetics_depth_cmDepth (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
| Status | Code | Meaning |
|---|---|---|
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'];