Two Modes Sharing One Document
Whether you mount the editor inside Studio or frame it on a third-party domain, users work in a single non-destructive document that switches fluidly between Layers and AI.
Precision Multi-Layer Canvas
Full raster and typography layout controls purpose-built for marketing, product, and template customization.
- Select, crop, slice, rotate, and lock: Reorder, duplicate, merge down, merge visible, or rasterize layers with full undo/redo history.
- Google Fonts & AI Font Finder: Search Google Fonts or let the image-aware Font Finder recommend typefaces that match the visual mood of the canvas.
- Prompt-Placed Overlays: Place text, badges, or project assets onto the canvas by describing where they belong.
- Account Brand Kits & Smart Watermarks: Pull approved logos from the account brand kit and stamp light or dark watermarks automatically based on photo brightness.
- Canvas & Image Resize: Resize to exact dimensions with transparent fill, solid color, or Gemini Flash inpaint scene extension.
Instruction-Driven AI & Region Edits
Target the whole canvas, a single layer, or a drawn rectangular selection without leaving the host page.
- Whole-image or layer-targeted edits: Run natural-language instructions against the active layer or composite canvas and receive the result as a new non-destructive layer.
- Draggable selection crop & patch merge: Draw a region box, reposition or clear it, run an AI instruction, and merge only the edited patch back onto the image.
- Native Context Masks (GPT Image 2.5): Enable Use surrounding context (
useContextMask=1) so GPT Image 2.5 Sunburst edits the selected rectangle while seeing the surrounding padded canvas. - Async proxy-safe polling: Long-running edits poll asynchronously so reverse proxies and browser iframes never time out mid-generation.
Built-In Edit Model Switching
Pass editModel in the embed URL or init payloadβor let users switch tiers directly in the editor toolbar. Every tier draws from the same unified monthly image credit pool.
Cheap Β· Gemini Flash Lite
Fast, budget-friendly edits for high-volume previews, quick color shifts, and iterative layout draftsβfour times more edits from the same credit pool.
Recommended Β· Nano Banana 2.1
Our upgraded default edit engine (gemini-nano-banana-2.1). Excels at preserving subject identity, lighting continuity, and natural style transfers.
GPT 2.5 Β· Sunburst Precision
Purpose-built for "change this, leave the rest" edits, readable text in-image, and opt-in native rectangular context masks (useContextMask=1).
Two Ways to Embed
Start with a plain HTML <iframe> when you just want to open an image by URL, or use the lightweight InlinerEditor.embedIframe JavaScript helper to keep your API key off the iframe URL and receive published assets in a callback.
1. JavaScript SDK Helper (Recommended for Production)
The IIFE bundle mounts the iframe, waits for the editor's ready signal, sends your apiKey and options over postMessage, and invokes onPublish as soon as the user saves.
HTML + JavaScript (InlinerEditor.embedIframe)
<div id="inliner-editor"></div>
<script src="https://app.inliner.ai/inliner-editor/inliner-editor.iife.js"></script>
<script>
const editor = InlinerEditor.embedIframe('#inliner-editor', {
embedUrl: 'https://app.inliner.ai/inliner-editor/index.html',
apiKey: 'inl_your_api_key',
project: 'acme',
sourceUrl: 'https://img.inliner.ai/acme/product-hero_1200x600.png',
mode: 'layers', // 'layers' | 'ai'
editModel: 'quality', // 'cheap' | 'recommended' | 'quality' (GPT 2.5 Sunburst)
useContextMask: true, // native surrounding-context mask for GPT 2.5 selection edits
outputFormat: 'webp', // 'webp' (default lossless) | 'png' | 'jpg'
height: '740px',
onPublish(result) {
// result.url is the newly published, globally cached Inliner CDN URL
document.querySelector('#hero-preview').src = result.url || result.dataUrl;
console.log('Published contentId:', result.contentId, 'URL:', result.url);
},
onCancel() {
console.log('User closed or canceled editing');
},
onError(message) {
console.error('Editor error:', message);
}
});
</script>
2. Drop-In Iframe + Query Parameters
For CMS custom blocks, internal tools, or quick prototypes, point an iframe directly at /inliner-editor/index.html (or the chrome-less app route /embed/editor) and swap sourceUrl per asset.
HTML Iframe
<iframe
title="Inliner Editor"
src="https://app.inliner.ai/inliner-editor/index.html?embed=1&sourceUrl=https%3A%2F%2Fimg.inliner.ai%2Facme%2Fhero.png&project=acme&mode=layers&editModel=recommended&outputFormat=webp"
style="width:100%;height:720px;border:0;border-radius:14px;background:#0f0e0c"
allow="clipboard-write">
</iframe>
Options & postMessage Protocol
All iframe communication uses the versioned inliner.editor channel (version: 1):
- Child β Parent:
{ channel: 'inliner.editor', version: 1, type: 'ready' }when the editor UI has mounted. - Parent β Child:
{ channel: 'inliner.editor', version: 1, type: 'init', payload: { apiKey, project, sourceUrl, mode, editModel, useContextMask, outputFormat } }. - Child β Parent:
{ channel: 'inliner.editor', version: 1, type: 'publish', payload: { url, contentId, contentPath, dataUrl, document } }when the user clicks Save & Publish (ortype: 'cancel'/type: 'error').
| Option / Query Param | Default | Description |
|---|---|---|
sourceUrl |
optional | Hosted image URL to open (e.g. https://img.inliner.ai/acme/hero.png). Swap dynamically per item or user. |
project |
required for publish | Account project namespace that owns the published output and brand kit / watermark settings. |
apiKey |
required cross-origin | Account or team API key (inl_...) from Account β API Keys. Pass via JS embedIframe options to keep it out of the URL. |
mode |
layers |
Initial workspace mode: layers (multi-layer canvas) or ai (prompt & region editing). |
editModel |
recommended |
cheap (Gemini Flash Lite Β· 1 credit), recommended (Nano Banana 2.1 Β· 4 credits), or quality (GPT Image 2.5 Sunburst Β· 4 credits). |
useContextMask |
false |
Set to true (or 1 in URL) to opt into native rectangular context masks when editing selections with GPT 2.5. |
outputFormat |
webp |
Published raster format: webp (lossless encoding from canvas), png, or jpg. |
contentId |
optional | Reopen a previously saved multi-layer editor document by its content ID. |
embed |
1 |
Hides standalone app navigation chrome when framed on an external site. |
.webp before the query stringβfor example https://img.inliner.ai/acme/hero.png.webp. Inliner converts the completed asset to WebP on the fly without re-generating or billing credits.
Built for Platforms, Agencies & Internal Tools
SaaS & Website Builders
Let customers customize hero banners, social cards, and email graphics inside your app without building a canvas engine or managing GPU workers.
Headless CMS & Publishing
Attach an "Edit with Inliner" modal to any image field. Authors crop, add headline overlays with Google Fonts, and write the new CDN URL straight back to the entry.
E-Commerce & Merchandising
Use GPT Image 2.5 Sunburst masked edits and Nano Banana 2.1 to clean backgrounds, swap seasonal props, and stamp consistent light/dark brand watermarks.
Agency Client Portals
Scope each client to their own project namespace with preloaded brand kits, reference images, and shared team credits.