MockAnything Configuration
MockAnything is a powerful embeddable AI mockup editor that lets you turn any image into a professional, customizable product mockup directly inside your website or app. Easily embed the full editor via iFrame, image upload, prompt, or API call, and instantly give users a complete AI-powered mockup creation experience.
With advanced AI tools, you can change ethnicity, modify scenes or pose, replace environments, and enhance your original photo with natural, photorealistic results. Add your own artwork, switch product colors, and export a single mockup or a full AI-generated photoshoot in seconds.
MockAnything also includes smart product detection that automatically identifies product and unlocks real manufacturer color options, making it ideal for e-commerce, print-on-demand, apparel, packaging, and product designers who need accurate, brand-friendly variations.
Embed MockAnything once and offer your users a complete, production-ready mockup studio anywhere.
Here’s how AI credits work:
Prompt Image Generation uses SeeDream 4.0 - 3 credits per generation
Editor AI Tools (scene change, ethnicity, camera angle, environment, etc.) use NanoBanana - 5 credits per edit
AI Photoshoot Generation - 3 credits per generated variation
Mockup Tools Are Free - artwork placement, product color changes (including real manufacturer colors), smart detection, and exports do not cost credits.
Overview
MockAnything is a powerful embeddable AI mockup editor that can turn any image into a fully editable, production-ready mockup. You can start the editor in two ways:
Iframe Embed (Direct Integration)
Embed the editor using a static iframe—ideal for simple integrations.
API-initialized Editor (Dynamic Integration)
Call our API with parameters like prompt, image_url, or artwork_url.
The API responds with:
HTML for your iframe
A dynamic initialization script
A unique event listener name
This gives you full control to inject the editor anywhere in your UI.
This document explains both approaches, editor configuration, event listeners, and how to handle authentication.
Quick Start: Two Ways to Launch the Editor
1. Static iframe Embed
You can change the default behavior of the Embedded Editor by changing the object inside the initDynamicMockupsIframe function from SDK.
iframeId
dm-iframe
true
string
ID of iFrame element
data
true
object
Change embeded editor behaviour
data
data parameter allows you to change the functionality inside the embedded editor:
x-website-key
""
yes
string
Connect the embed editor with Dynamic Mockups. Generate free website-key on your account here .
editorType
"classic"
no
"classic" | "mockanything"
Editor type. It can be used as classic or mockanything editor.
themeAppearance
"light"
no
"light" | "dark"
Theme appearance: 'dark' or 'light'. If specified, it overrides the setting configured via account dashboard.
data example
2. JS / API Approach (Dynamic Editor Injection)
You can initialize the editor using a backend call that returns:
iframe_editor→ HTML for the iframeinit_function→ Script that binds the editor’s internal logicevent_listener_name→ Unique listener for postMessage events
This approach allows:
Passing dynamic prompts
Starting from an uploaded image
Passing artwork
Integrating deeply inside React, Vue, or any JS framework
API Endpoint
POST /api/v1/mock-anything/embed/initialize
Example Payload
Example Response
event_listener_name
The identifier you use to listen for events from this specific editor instance
iframe_editor
Fully prepared iframe HTML you can inject directly into the DOM
init_function
JavaScript bootstrap that connects the iframe, events, and internal editor logic
Full Example (React)
Event System
Each editor instance receives a unique event listener key.
You listen like this:
Events include:
editor_readyexport_completedphotoshoot_completedartwork_updatedvariant_changed
Last updated
Was this helpful?