Emilia AI Studio — API Reference
Generate AI product, food, jewelry, clothing, furniture and cosmetics images programmatically.
Base URL: https://ai.emilia.digital/es/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/es/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 | Tipo | Descripción |
|---|---|---|
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_idopcional |
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_idopcional |
integer | ID of a presenter (model/character) to feature. Get the list via POST /get-plugin-config. |
custom_promptopcional |
string | Free-form text prompt — overrides preset styling. |
aspectopcional |
string | Output aspect ratio. Defaults to 1:1. See Aspect ratios. |
resolutionopcional |
string | Output resolution. Defaults to 1K. Affects credit cost — see Resolutions. |
additional_imagesopcional |
string[] | Up to ~3 extra reference images (data URLs or HTTPS URLs) — e.g. brand logo, color reference, secondary product. |
replacement_imageopcional |
string | Background image (data URL or HTTPS URL) used by area-replacement styles. |
| helper fieldsopcional | 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 | Renderizaciones de estudio y estilo de vida para la mayoría de los productos. |
jewelry |
Joyería | Tomas comerciales de lujo para joyería fina. |
clothing |
Ropa | Fotografía editorial y de comercio electrónico para ropa. |
food |
Comida y Bebidas | Deliciosa fotografía de alimentos y bebidas. |
furniture |
Muebles | Escenas de salas profesionales y tomas de estudio para muebles. |
cosmetics |
Belleza y Cosmética | Fotografía editorial y de estudio de alta gama para cuidado de la piel, maquillaje y fragancias. |
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 | Descripción |
|---|---|---|
pure_white |
Packshot Limpio | Fondo limpio y minimalista para centrar la atención en el producto. |
studio_gradient |
Superficie de estudio | Toma de estudio premium sobre mármol, madera, hormigón y más. |
editorial_close_up_product |
Primer Plano Editorial | Primeros planos artísticos que destacan los detalles del producto. |
scene |
Por Ubicación | Coloque su producto en una escena de la vida real. |
with_presenter |
Con Presentador | Muestra tu producto interactuando con un presentador/a (modelo de IA o persona real). |
reference |
Por Referencia | Generar la imagen del producto basándose en una imagen de referencia. |
Comida y Bebidas (food)
System presets for this mode
| ID | Title | Descripción |
|---|---|---|
side_view |
Vista Lateral | Ángulo lateral para resaltar las capas y la altura. |
top_view |
Vista Superior | Toma cenital que muestra todo el plato. |
lifestyle |
Estilo de Vida | Plato decorado de forma natural con accesorios sutiles sobre la mesa. |
hands_touch |
Manos y Tacto | Mostrar la interacción con el plato mediante manos o utensilios. |
macro_texture |
Textura Macro | Primer plano de texturas, capas y detalles. |
reference_food |
Por Referencia | Generar la imagen del plato basándose en una imagen de referencia. |
Joyería (jewelry)
System presets for this mode
| ID | Title | Descripción |
|---|---|---|
studio_packshot |
Packshot de Estudio | Toma de comercio electrónico impecable sobre un fondo de estudio limpio. |
styled_still_life |
Naturaleza Muerta Estilizada | Toma editorial con accesorios de lujo como tela, piedra o flores. |
collection_showcase |
Colección | Composición ingeniosa de varias piezas para anuncios de alto impacto. |
on_model |
En el Cuerpo | Muestra la joya en la parte del cuerpo correspondiente para demostrar la escala y el ajuste. |
lifestyle_jewelry |
Escena de Estilo de Vida | Muestre la joya en un entorno aspiracional del mundo real. |
reference_jewelry |
Por Referencia | Genere una imagen de joyería basada en un estilo o foto de referencia. |
Ropa (clothing)
System presets for this mode
| ID | Title | Descripción |
|---|---|---|
ecommerce_packshot |
Packshot | Toma limpia y estandarizada para catálogos de productos. |
editorial_close_up |
Detalle Macro | Primer plano extremo que resalta la textura, el logotipo o detalles clave de la prenda. |
artistic_flat_lay |
Plano Cenital Artístico | Toma creativa desde arriba para catálogos y redes sociales. |
studio_model |
Modelo de Estudio | Toma de catálogo clásica con un/a modelo en un estudio. |
lifestyle_scene |
Escena de Estilo de Vida | Muestre el producto en un entorno aspiracional del mundo real. |
reference_clothing |
Por Referencia | Genere una imagen de ropa basada en una foto de referencia. |
Muebles (furniture)
System presets for this mode
| ID | Title | Descripción |
|---|---|---|
furniture_packshot |
Packshot de Estudio | Fondo blanco limpio para catálogos de comercio electrónico. |
minimalist_space |
Habitación Minimalista | Espacio amplio y despejado para resaltar el mueble. |
cozy_vignette |
Sala de Estar Estilizada | Habitación decorada con accesorios y una iluminación suave. |
material_detail |
Detalle de Material | Toma macro que enfatiza las texturas y los acabados de los materiales. |
furniture_with_model |
Con Presentador | El mueble acompañado de un presentador para dar una idea de la escala y el contexto. |
reference_furniture |
Por Referencia | Estética de la habitación basada en una fotografía de inspiración. |
Belleza y Cosmética (cosmetics)
System presets for this mode
| ID | Title | Descripción |
|---|---|---|
cosmetics_packshot |
Packshot de Estudio | Fondo blanco limpio o de color sólido para comercio electrónico. |
earthy_minimalism |
Elementos Naturales | Configuración lujosa con piedra en bruto, yeso o texturas de agua. |
texture_swatch |
Muestra de Textura | Toma macro artística que muestra la textura de la fórmula junto al envase del producto. |
minimalist_vanity |
Tocador Limpio | Entorno de baño o spa de alta gama con iluminación cálida y suave. |
cosmetics_with_model |
Con Presentador | Presentador con piel radiante sosteniendo o aplicándose el producto. |
reference_cosmetics |
Por Referencia | Estética, iluminación y ambiente basados en una fotografía de inspiración. |
Aspect ratios
Pass via the aspect field. Default: 1:1.
| Value | Use case |
|---|---|
1:1 | Cuadrada |
4:5 | Post social |
9:16 | Formato Historia |
16:9 | Panorámica |
3:4 | Tradicional |
3:2 | Estándar |
4:3 | Clásico |
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 | Tipo | Default | Applies to styles | Options | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
presenter_interactionInteracción |
select |
holding |
with_presenter |
|
||||||||||||||||||||||||||||||||||||||||||||||||||
presenter_shotTipo de Toma |
select |
full_body |
with_presenter |
|
||||||||||||||||||||||||||||||||||||||||||||||||||
bg_sceneUbicación |
select |
living_room |
scene with_presenter |
|
||||||||||||||||||||||||||||||||||||||||||||||||||
scene_styleEstilo de entorno |
select |
minimalist_modern |
scene with_presenter |
|
||||||||||||||||||||||||||||||||||||||||||||||||||
shadowSuperficie |
select |
soft |
pure_white |
|
||||||||||||||||||||||||||||||||||||||||||||||||||
product_surfaceSuperficie |
select |
gradient |
studio_gradient |
|
||||||||||||||||||||||||||||||||||||||||||||||||||
bg_colorFondo |
color |
#ffffff |
color_backdrop pure_white studio_gradient |
Hex color, e.g. #FFFFFF
|
||||||||||||||||||||||||||||||||||||||||||||||||||
product_width_cmAnchura (cm) |
number |
— | scene with_presenter | free text | ||||||||||||||||||||||||||||||||||||||||||||||||||
product_height_cmAltura (cm) |
number |
— | scene with_presenter | free text | ||||||||||||||||||||||||||||||||||||||||||||||||||
product_depth_cmProfundidad (cm) |
number |
— | scene with_presenter | free text |
Comida y Bebidas (food)
| Field | Tipo | Default | Applies to styles | Options | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
food_backgroundFondo |
select |
marble |
top_view side_view action_image lifestyle hands_touch macro_texture |
|
||||||||||||||||||
food_styleEstilo |
select |
realistic |
top_view side_view action_image lifestyle hands_touch macro_texture |
|
||||||||||||||||||
food_surfaceRecipiente |
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
|
Joyería (jewelry)
| Field | Tipo | Default | Applies to styles | Options | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jewelry_bg_colorFondo |
color |
#ffffff |
studio_packshot |
Hex color, e.g. #FFFFFF
|
||||||||||||||||||||||||||||||||||||
jewelry_composition_styleComposición |
select |
standing |
studio_packshot |
|
||||||||||||||||||||||||||||||||||||
jewelry_shadow_styleSombra |
select |
soft |
studio_packshot |
|
||||||||||||||||||||||||||||||||||||
jewelry_focus_pointPunto de enfoque |
select |
center_gemstone |
macro_detail |
|
||||||||||||||||||||||||||||||||||||
jewelry_macro_backgroundFondo |
select |
out_of_focus_gradient |
macro_detail |
|
||||||||||||||||||||||||||||||||||||
jewelry_scene_elementsElementos de la escena |
select |
luxe_fabric |
styled_still_life |
|
||||||||||||||||||||||||||||||||||||
jewelry_moodAmbiente |
select |
light_and_airy |
styled_still_life |
|
||||||||||||||||||||||||||||||||||||
jewelry_genderGénero |
select |
female |
on_model |
|
||||||||||||||||||||||||||||||||||||
jewelry_skin_toneTono de piel |
select |
light |
on_model |
|
||||||||||||||||||||||||||||||||||||
jewelry_body_partParte del cuerpo |
select |
auto |
on_model |
|
||||||||||||||||||||||||||||||||||||
jewelry_model_backgroundFondo |
select |
studio_background |
on_model |
|
||||||||||||||||||||||||||||||||||||
jewelry_layout_styleEstilo de diseño |
select |
dynamic_cascade |
collection_showcase |
|
||||||||||||||||||||||||||||||||||||
jewelry_background_surfaceSuperficie de fondo |
select |
reflective_mirror |
collection_showcase |
|
||||||||||||||||||||||||||||||||||||
jewelry_theme_colorColor |
color |
#ffffff |
collection_showcase styled_still_life on_model |
Hex color, e.g. #FFFFFF
|
||||||||||||||||||||||||||||||||||||
jewelry_creative_directionDirección Creativa |
select |
clean_editorial_portrait |
lifestyle_jewelry |
|
||||||||||||||||||||||||||||||||||||
jewelry_expressionExpresión |
select |
confident_direct |
lifestyle_jewelry |
|
||||||||||||||||||||||||||||||||||||
jewelry_shot_typeTipo de Toma |
select |
focus_on_jewelry |
lifestyle_jewelry |
|
Ropa (clothing)
| Field | Tipo | Default | Applies to styles | Options | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fabric_typeTipo de tejido |
select |
auto |
editorial_close_up |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
garment_viewVista de la prenda |
select |
front |
ecommerce_packshot artistic_flat_lay studio_model lifestyle_scene reference_clothing |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
garment_fitAjuste de la prenda |
select |
true_to_size |
ecommerce_packshot artistic_flat_lay studio_model lifestyle_scene reference_clothing |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
display_styleEstilo de visualización |
select |
flat_lay |
ecommerce_packshot |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
surface_typeSuperficie |
select |
wood |
artistic_flat_lay |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
background_typeFondo |
select |
seamless_paper |
studio_model |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bg_colorFondo |
color |
#ffffff |
ecommerce_packshot studio_model artistic_flat_lay |
Hex color, e.g. #FFFFFF
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
model_shotToma de modelo |
select |
full_body |
studio_model lifestyle_scene |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
flatlay_viewÁngulo de visión |
select |
top_down |
artistic_flat_lay |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lighting_styleIluminación |
select |
soft_studio |
artistic_flat_lay |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
scene_locationUbicación de la escena |
select |
urban_city_street |
lifestyle_scene |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
time_of_dayHora del Día |
select |
auto |
lifestyle_scene |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
weather_conditionClima |
select |
clear |
lifestyle_scene |
|
Muebles (furniture)
| Field | Tipo | Default | Applies to styles | Options | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
furniture_angleÁngulo de visión |
select |
auto |
furniture_packshot |
|
||||||||||||||||||||||||||||||||||||||||
furniture_shadowSuperficie |
select |
soft |
furniture_packshot |
|
||||||||||||||||||||||||||||||||||||||||
furniture_bg_colorFondo |
color |
#ffffff |
furniture_packshot |
Hex color, e.g. #FFFFFF
|
||||||||||||||||||||||||||||||||||||||||
furniture_room_typeTipo de sala / espacio |
select |
clean_studio |
minimalist_space cozy_vignette furniture_with_model |
|
||||||||||||||||||||||||||||||||||||||||
furniture_design_styleEstilo de Diseño de Interiores |
select |
auto |
minimalist_space cozy_vignette furniture_with_model |
|
||||||||||||||||||||||||||||||||||||||||
furniture_materialÉnfasis en el material |
select |
auto |
material_detail |
|
||||||||||||||||||||||||||||||||||||||||
furniture_interactionInteracción con Modelo |
select |
auto |
furniture_with_model |
|
||||||||||||||||||||||||||||||||||||||||
furniture_width_cmAnchura (cm) |
number |
— | minimalist_space cozy_vignette furniture_with_model | free text | ||||||||||||||||||||||||||||||||||||||||
furniture_height_cmAltura (cm) |
number |
— | minimalist_space cozy_vignette furniture_with_model | free text | ||||||||||||||||||||||||||||||||||||||||
furniture_depth_cmProfundidad (cm) |
number |
— | minimalist_space cozy_vignette furniture_with_model | free text |
Belleza y Cosmética (cosmetics)
| Field | Tipo | Default | Applies to styles | Options | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cosmetics_angleÁngulo de visión |
select |
auto |
cosmetics_packshot |
|
||||||||||||
cosmetics_shadowSuperficie |
select |
soft |
cosmetics_packshot |
|
||||||||||||
cosmetics_bg_colorFondo |
color |
#F5F5F0 |
cosmetics_packshot |
Hex color, e.g. #FFFFFF
|
||||||||||||
cosmetics_elementElemento principal |
select |
travertine_stone |
earthy_minimalism |
|
||||||||||||
cosmetics_env_colorColor de atmósfera / superficie |
color |
#E8DCC4 |
earthy_minimalism |
Hex color, e.g. #FFFFFF
|
||||||||||||
cosmetics_formulaTextura de fórmula |
select |
thick_cream |
texture_swatch |
|
||||||||||||
cosmetics_swatch_colorColor de fondo / superficie |
color |
#F2EBE5 |
texture_swatch |
Hex color, e.g. #FFFFFF
|
||||||||||||
cosmetics_vanityConfiguración de tocador |
select |
marble_sink |
minimalist_vanity |
|
||||||||||||
cosmetics_interactionPose de modelo |
select |
holding_near_face |
cosmetics_with_model |
|
||||||||||||
cosmetics_model_sceneEscena de fondo |
select |
clean_studio |
cosmetics_with_model |
|
||||||||||||
cosmetics_width_cmAnchura (cm) |
number |
— | earthy_minimalism minimalist_vanity cosmetics_with_model texture_swatch | free text | ||||||||||||
cosmetics_height_cmAltura (cm) |
number |
— | earthy_minimalism minimalist_vanity cosmetics_with_model texture_swatch | free text | ||||||||||||
cosmetics_depth_cmProfundidad (cm) |
number |
— | earthy_minimalism minimalist_vanity cosmetics_with_model texture_swatch | free text |
Response format
Éxito — 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 }
}
Errores
| 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/es/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/es/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/es/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/es/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'];