DreamLayer image tools
This server provides DreamLayer image generation, editing, and sprite animation tools for MCP clients, with credit-aware paid operations and recovery support.
Read API capabilities and operation availability without spending credits.
Check promotional, purchased, and available credit balance before paid work.
Upload local PNG, JPEG, WebP, or RAW images up to 200 MB to get an input asset ID.
Generate or edit images: text-to-image, image-to-image, background removal, and 2× upscale.
Create beta sprite-sheet animations from a reference image using presets or custom prompts, with configurable frame count, frame size, and transparency/background behavior.
Quote and cap sprite spending with sprite_pricing and max_credits.
Inspect execution status, resume event streams after drops, and download completed outputs without regenerating.
Use idempotency keys and structured errors for safe retries and failure recovery.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DreamLayer image tools generate an image of a cozy cabin in a snowy forest"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@dreamlayer/mcp
Image generation and editing tools for MCP-compatible AI clients, backed by the DreamLayer Agent API.
This working tree includes the unpublished 0.5.0-beta.0 video candidate.
The published version in the installation section below remains image/sprite-only.
For local review use Node >=22.12, pnpm install --frozen-lockfile, pnpm build,
and configure the MCP client to run node /absolute/path/to/dist/index.js with an
authorized video-enabled API endpoint. This does not publish or deploy anything.
Video candidate tools
dreamlayer_video_quote performs no paid generation. dreamlayer_video_execute
admits only a ready owned quote under an explicit user-authorized credit ceiling.
Never invent that authorization. Save the idempotency key before execution.
{"tool":"dreamlayer_video_quote","arguments":{"operation":"text_to_video","prompt":"A silent forest video","options":{"resolution":"720p","generate_audio":false,"aspect_ratio":"16:9"}}}For an image, first use dreamlayer_upload_image with an absolute local path,
then use the returned owned asset ID:
{"tool":"dreamlayer_video_quote","arguments":{"operation":"image_to_video","prompt":"Restrained product showcase on a clean white background","input_asset_id":"OWNED_ASSET_UUID","context":{"use_case":"product_showcase","requested_background":"clean_white"},"options":{"model":"auto","duration_seconds":15,"generate_audio":false}}}
{"tool":"dreamlayer_video_execute","arguments":{"quote_id":"READY_QUOTE_UUID","max_credits":40,"idempotency_key":"SAVED_UNIQUE_KEY"}}
{"tool":"dreamlayer_execution","arguments":{"execution_id":"EXECUTION_UUID"}}
{"tool":"dreamlayer_events","arguments":{"execution_id":"EXECUTION_UUID"}}
{"tool":"dreamlayer_download","arguments":{"execution_id":"EXECUTION_UUID","path":"/absolute/new/result.mp4"}}The execute result includes video_job, not an inline/base64 video. Status and
events are read-only and never start work. Progress is actual execution stages,
not an invented percentage. A bounded wait or lost response does not cancel a
job; recover its identity with the same quote/key. Already consumed quotes remain
recoverable after expiry. Retry downloads without generating again.
Default: 10s when absent from both prompt and options, native 720p, no audio unless requested; text aspect 16:9. Explicit durations and issued quotes are unchanged. One image uses native/source-driven aspect. Explicit incompatible settings and extra images are rejected before charging.
Policy video-v3-scoped-intent-10s-20261010 applies only to new quotes.
Explicit compatible model first; automatic 4s or 21–30s selects Seedance.
Complex action, demanding audio, continuity, white/unknown product backgrounds
and uncertain classification prefer Seedance. Clearly simple non-white product,
one-speaker talking-head, retro or controlled cinematic-lighting scenes prefer
FLUX. Complexity beats style; these are preferences, not quality guarantees.
FLUX accepts 5–20s; Seedance 4–30s. Source pixels are not analyzed.
Spoken dialogue enables unspecified audio; captions/labels do not. Speech instructions
are not discarded by a preceding "no music" clause. Non-white is not also white;
a speaker alone does not establish simple action. Shot timestamps
are not duration/aspect settings. Overlong timelines fail before spending rather
than being compressed; dialogue is never truncated. Live-test defaults remain 5s.
Existing quotes retain their model, prompt, settings and price.
No automatic cross-provider retry, fidelity scoring, UI change, extension,
upscaling, keyframes or multiple-reference support is included. Downloads use
owned 30-day storage, bounded streaming, SHA-256 verification and no overwrite.
pricing_pending/disabled access must be reported honestly, not bypassed.
Use it for raster logo concepts, product imagery, marketing visuals, print artwork concepts and game assets. Inspect output quality and task-specific requirements. See the installable agent workflows for task guidance and Godot/Unity import examples.
The full workflow below uses the published sprite-capable beta. Stable latest
remains 0.3.0; use the explicit version shown here.
Related MCP server: Dreamshot MCP Server
Install
Add it to your client. Claude Code:
claude mcp add dreamlayer --env DREAMLAYER_API_KEY=dlr_live_your_key -- npx -y @dreamlayer/mcp@0.4.0-beta.5Codex:
codex mcp add dreamlayer --env DREAMLAYER_API_KEY=dlr_live_your_key -- npx -y @dreamlayer/mcp@0.4.0-beta.5Cursor, or any other stdio MCP client:
{
"mcpServers": {
"dreamlayer": {
"command": "npx",
"args": ["-y", "@dreamlayer/mcp@0.4.0-beta.5"],
"env": { "DREAMLAYER_API_KEY": "dlr_live_your_key" }
}
}
}The key must be in the server's own environment. MCP clients spawn this as a subprocess, so a key exported in your shell does not reach it. That is the most common setup failure, and the server exits with an explanation rather than starting up broken.
Get a key at platform.dreamlayer.io. A new account starts at zero credits. Ordinary image operations cost one credit each; sprite bundles use the frame-count quote described below.
Tools
Tool | What it does |
| Read the contract and the operations this key may run. Spends nothing. |
| Read this API key's promotional, purchased, and total available credits. Spends nothing. |
| Upload PNG, JPEG, WebP, or camera RAW (up to 200 MB) and get an |
| Generate or edit. Returns the event stream. |
| Read canonical state for one execution. |
| Resume a stream after a drop, from a last event id. |
| Save a completed execution to a new local path without generating again. |
Operations
Omit operation and DreamLayer reads the prompt, which may come back asking a
clarifying question. Name it and that inference is skipped entirely.
| Needs an image | Result |
| No | A new image from the prompt |
| Yes | The reference, edited as described |
| Yes | The subject on transparency |
| Yes | Twice the width and height |
upscale doubles each side and finished images are capped at 4096 per side, so the
longest side of your input must be 2048 or less. A larger one is refused before it
costs a credit.
Behaviour worth knowing
A question is not a failure. An ambiguous prompt returns a question event ending
in needs_input. Answer it by calling dreamlayer_generate again with respond and
the conversation_id.
Retries are safe if you reuse the key. An idempotency_key is generated for you.
Pass the same one back to retry after an uncertain response and the original result
replays rather than paying twice.
Long runs are truncated, not lost. A stream over 256 events returns what it has,
marks truncated, and gives you the execution_id and last event id to resume from.
Errors are stable and provider-neutral. Error tool results include code, reason,
message, retryable, and request_id, matching REST and the CLI. A model should branch
on reason and retryable, never message text. The response excludes prompts, local
filenames, asset URLs, provider details, credentials, and raw upstream responses.
Requirements
Node.js 22.12 or later.
License
MIT. See LICENSE and NOTICE.
Sprite-sheet beta
Sprite requests accept exactly one of options.animation_prompt (1–4000 characters) or an options.action preset (walk, run, idle). Custom prompts can describe characters, creatures, objects, effects or 360° turntables. animation_mode is loop or once; presets default to loop, custom prompts to once. For a turntable, request a stationary camera and rotating subject. Broad requests do not guarantee correct motion, unseen details or successful effect transparency.
Request integer frame_count 7–100 (default 12) and frame_size 32, 64, 128, 256, 512, 720 or 1080 (default 512). These are square export canvases; a larger export does not guarantee additional detail. Aspect ratio and shared alignment are preserved with transparent padding. A bundle contains transparent PNG frames, sheet, atlas, preview and import instructions, including each frame's playback duration. Send background: "keep" in options when transparency is not needed: the frames ship with the generated background in place, plain rather than cut out, and cost the flat plain rate. A frame that cannot be cut out is retried at nearby moments of the same clip, and a single stubborn frame ships with its background rather than failing the sheet; atlas.json lists any such frame in kept_background_frames. Choose a repeating loop or a one-time action with a beginning and ending. If the requested number of distinct frames cannot be delivered, the job fails and held credits are returned. Translucent effects can lose detail or fail; small exports are not automatically pixel art.
Pricing is unchanged across sizes: frames 1–14 cost $0.14 each; additional frames $0.07 each. With background: "keep" every frame is a flat $0.07 with no tier, roughly half a transparent sheet (12 frames: 5.0 credits instead of 9.9). One credit is $0.17. Round the complete order upward once to a tenth of a credit. Check sprite_pricing in capabilities and approve the quote with max_credits. Credits are held during processing, settled after complete delivery and restored on failure/timeout. There is no customer cancellation. Keep the execution ID to resume status. Custom requests need the matching broad-animation server release; older servers reject them. New live generation quality, 100-frame duration and actual cost remain unverified.
Call dreamlayer_upload_image, then dreamlayer_generate with operation: "sprite_sheet", the uploaded input_asset_id, options: {action: "walk", frame_count: 12}, and max_credits set to your approved limit.
Each tool call waits for a bounded interval. If the result remains active, pass its execution_id and last_event_id to dreamlayer_events. When completed, use dreamlayer_download with execution_id and an absolute path ending in .zip. Existing files are never overwritten.
For affordability, compare the complete rounded quote in credits with available. One tenth of a credit is $0.017. Promotional and purchased amounts are displayed rounded down separately, so their displayed sum can be 0.1 credit below available; stored fractions are preserved. Compare against the combined total, not that sum. The order charge rounds only once, never per frame or per tier.
Tool discovery and recovery
Read tools/list for descriptions, input schemas, and operation availability. Read-only
calls are marked with readOnlyHint; upload, generation, and local download are not.
These annotations describe effects, not permission grants. Generation starts paid work.
Every tool returns structuredContent plus the same JSON serialized in a text block for
older clients. Failures set isError: true. Generation results and errors include the
idempotency key, including when the server generated it for you. Choose and save your own
key before calling when you need recovery even after the MCP process itself is lost.
After interruption, call dreamlayer_execution with the saved execution ID, then
dreamlayer_events with the last processed event ID. Retrieve completed work with
dreamlayer_download. Never start a replacement generation merely because the stream
closed. Keep the same uploaded asset ID and identical arguments when replaying a key.
MCP setup · API overview · Execution recovery
Abrupt stream failures trigger a canonical status read. If state is still uncertain,
the error is temporarily_unavailable with recovery guidance and the known execution
ID, cursor and retry key. local_output_failed means a completed output could not be
written: fix the path and retry dreamlayer_download, not dreamlayer_generate.
Client-side input validation uses invalid_request; other unclassified client failures
use client_error and are not evidence that generation failed.
Sprite backgrounds in beta.5
options.background selects what the frames look like. remove, the default, cuts every frame out for transparent frames. keep leaves the generated background in place: the frames are plain rather than cut out, and every frame costs the flat sprite_pricing.plain_frame_cents with no tier, about half the transparent price. Twelve frames quote 5 credits kept against 9.9 transparent.
beta.4 and earlier reject this field: their options schema set additionalProperties: false, so a request naming a background never reached the service. Pin beta.5 or later to use it.
A spelled-out background: "remove" is normalised away before the request is sent, because it is exactly what an absent field already means and the service fingerprints the options it receives; sending it would otherwise split one job into two idempotency identities.
Parameter descriptions in beta.4
Every input parameter in tools/list now states what it accepts, including the nested sprite options fields: prompt, conversation_id, max_credits (image operations require exactly 1; sprite jobs at or above the quoted price), aspect_ratio, execution_id and last_event_id. Tool names, arguments and results are unchanged from beta.3.
Error handling updates in beta.3
Malformed event payloads return response_contract_error with retryable: false, preserving the execution ID, last event ID and idempotency key when known. Check client compatibility or contact support; do not submit replacement work. Interrupted network streams still reconcile canonical state.
Available Tools
7 toolsdreamlayer_balanceARead-onlyIdempotent
Use before paid image work to check available credits for this API key. Returns promotional, purchased, available and credit_usd. Compare the complete rounded quote against available; separately rounded buckets may sum to 0.1 less. Costs no credits and does not buy credits. Resolve authentication or balance errors before generation.
Inputs: no named parameters. Returns: error, available, purchased, credit_usd, +1 more
dreamlayer_capabilitiesARead-onlyIdempotent
Use before choosing an image operation or quoting a sprite job. Read supported operations, input limits and sprite_pricing for this API key. Returns the current API contract; no image input, generation or credits required. Do not use this to create an asset.
Inputs: no named parameters. Returns: error, operations, api_version
dreamlayer_downloadA
Use when an existing execution completed or a previous download failed. Requires execution_id and an absolute new local path. Saves the finished image or sprite ZIP and returns path/bytes; starts no generation and spends no new credits. Never overwrites. For output_not_ready check status; for local_output_failed repair the path and download the same execution.
Inputs: path (required), execution_id (required). Returns: path, bytes, error
dreamlayer_eventsARead-onlyIdempotent
Use to resume running work or a dropped stream without another generation charge. Requires execution_id; pass the last_event_id actually processed. Returns bounded events, status and recovery cursor. If still running or rate-limited, back off before polling again. Do not repeatedly call in a tight loop or submit replacement work.
Inputs: execution_id (required), last_event_id. Returns: asset, error, events, status, +3 more
dreamlayer_executionARead-onlyIdempotent
Use after a timeout, rate limit or uncertain result to read the existing execution's canonical status. Requires execution_id; costs no credits. Returns state and result details, not a newly generated image. If running, wait and resume events; if completed, download. Do not replace an uncertain paid job.
Inputs: execution_id (required). Returns: error, status, image_job, execution_id
dreamlayer_generateA
Use when the user needs an original image, raster logo concept, product or marketing visual, an edit, transparent cutout, upscale, or reference-based sprite animation. Starts paid work within the user's authorized scope and budget. Text-to-image needs a prompt; other operations need input_asset_id. Select operation explicitly. Image operations cost one credit; sprite beta accepts 7–100 frames and returns a ZIP. Read sprite_pricing, round the whole quote upward once to 0.1 credit and set max_credits. Returns execution_id, status, asset, question and last_event_id. needs_input is a question; running work must be resumed, not replaced. No sprite cancellation; failed/expired holds are restored. Not a vector-logo, print-validation, product-fidelity or animation-quality guarantee.
Inputs: prompt, options, respond, operation, +5 more. Returns: asset, error, events, status, +3 more
dreamlayer_upload_imageA
Use when an edit, background removal, upscale or sprite animation needs a local reference. Requires an absolute path to PNG, JPEG, WebP or supported camera RAW, up to 200 MB. Uploads that file and returns input_asset_id; starts no paid work. Reuse the asset ID for recovery. Not needed for text-to-image. If upload fails, fix the input or retry upload only.
Inputs: path (required). Returns: error, expires_at, input_asset_id
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools are clearly distinct: balance, capabilities, generate, upload_image, and download each have a single obvious purpose. The only potential confusion is between execution and events, since both take an execution_id and serve post-generation recovery, but their descriptions separate status checking from stream resumption well.
All tools share the dreamlayer_ prefix and snake_case style, but the naming pattern is inconsistent: balance, capabilities, events, and execution are nouns, while download, generate, and upload_image are verbs or verb_noun. It remains readable and predictable in prefix, but not a uniform verb_noun convention.
Seven tools is a well-scoped set for a paid async image generation workflow. Each tool covers a necessary stage—checking credits, reading contract terms, uploading inputs, generating, checking status, resuming streams, and downloading results—without bloat.
The lifecycle is well covered: billing check, capability discovery, upload, generation, status retrieval, event resumption, and download. Minor gaps exist around asset management and cancellation, but the descriptions indicate these are either unnecessary or unsupported rather than critical missing operations.
Maintenance
Related MCP Connectors
Generate AI images and videos from any compatible MCP client.
Generate AI images, video, music, and sound effects, and upscale them, from any MCP client.
Generate AI video, images and audio, and browse your history, from any MCP client.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables image generation and multi-turn editing sessions using the Gemini API within MCP-compatible environments. Users can create, modify, and configure images through natural language commands, supporting features like aspect ratio adjustments and session-based image transformations.5ISC
- AlicenseNot gradedqualityDmaintenanceEnables AI image and video generation using Dreamshot's API, supporting tools like image editing, video creation, and enhancement directly from MCP-compatible clients.MIT
- AlicenseNot gradedqualityCmaintenanceEnables coding agents and other MCP clients to generate images from text prompts and edit, restyle, or extend existing images through an OpenAI-compatible /v1/images API. Results are returned both inline as image content blocks and as files saved to disk, so agents can view and reuse them within a normal task.274 npm1MIT
- AlicenseNot gradedqualityAmaintenanceEnables generating and editing images from any MCP client by rewriting requests into detailed prompts and routing them to Gemini, OpenAI, or BytePlus Seedream, with configurable quality presets, aspect ratios, and image sizes. Results are saved to disk and returned to the assistant as MCP resources.1,781 npmMIT