@lweight/xbrush-api-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| XBRUSH_API_KEY | Yes | Your XBrush API key | |
| XBRUSH_BASE_URL | No | API base URL. Defaults to https://api.xbrush.run. | https://api.xbrush.run |
| XBRUSH_DISABLED_TOOLS | No | Comma-separated tool names to skip. Safety valve for selectively disabling a specific tool without uninstalling. |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| xbrush_image_generateA | Generate images from a text prompt using XBrush AI models. Submits async — poll the returned request_id with xbrush_get_request. Args: model (string, required): Model ID (e.g. z-image-turbo). Use xbrush_list_models to see options. prompt (string, required): Text description of the image. n (int, optional): Number of images (1-8). Default: 1. negative_prompt (string, optional): Elements to exclude. width (int, optional): Width in pixels (256-4096). Megapixel-based models (flux., z-image-turbo, ...) use it directly (default 1024). Resolution-based models ignore it UNLESS aspect_ratio:"custom" (see aspect_ratio). height (int, optional): Height in pixels (256-4096). Same rules as width. resolution (string, optional): Resolution tier for resolution-based models (gpt-image-2, seedream-, nano-banana-pro/2), e.g. "1K"/"2K"/"4K". aspect_ratio (string, optional): Aspect ratio for resolution-based models. gpt-image-2/-edit: 1:1, 3:2, 2:3, 4:3, 3:4, 4:5, 16:9, 9:16, 21:9, 1.91:1 (1K/2K); only 16:9/9:16/21:9/1.91:1 at 4K. Special value "custom": gpt-image-2/-edit output the exact width×height you pass (both required; each a multiple of 16, longest edge ≤3840, total pixels 655,360–8,294,400) — e.g. width:1024,height:1152,aspect_ratio:"custom" returns 1024×1152. quality (string, optional): low/medium/high — gpt-image-2/-edit only. seed (int, optional): Random seed for reproducibility. Note: resolution-based models (gpt-image-2, seedream-*, nano-banana-pro/2) ignore width/height — passing them returns an error. Exception: aspect_ratio:"custom" with width+height yields an EXACT pixel size on gpt-image-2/-edit (other resolution models may only keep the ratio or ignore it). |
| xbrush_image_editA | Edit an image with text instructions. For inpainting use an edit model; for outpainting (extending the canvas) use an outpaint model — there is no separate outpaint tool. Submits async — poll the returned request_id with xbrush_get_request. Args: model (string, required): Inpaint: qwen-image-edit, nano-banana-edit, seedream-4.5-edit. Outpaint: flux-outpaint, qwen-outpaint. See xbrush_list_models(category='image'). prompt (string, required): Text instruction for the edit. image_url (string, required): URL of the primary source image (also the first reference). image_urls (string[], optional): Additional reference image URLs for multi-reference models (gpt-image-2-edit, nano-banana-edit). Model receives [image_url, ...image_urls]. n (int, optional): Number of results (1-8). Default: 1. mask_url (string, optional): Mask image URL (white=edit, black=preserve). mode (string, optional): Hint 'inpaint'/'outpaint'; the chosen model determines the actual operation. width (int, optional): Output width (256-4096). Megapixel/outpaint models use it directly (outpaint: target canvas width). Resolution-based edit models ignore it UNLESS aspect_ratio:"custom" (see aspect_ratio). height (int, optional): Output height (256-4096). Same rules as width (outpaint: target canvas height). resolution (string, optional): Resolution tier for resolution-based edit models (gpt-image-2-edit, seedream-*-edit, nano-banana-pro/2-edit), e.g. "1K"/"2K"/"4K". aspect_ratio (string, optional): Aspect ratio for resolution-based edit models. gpt-image-2-edit: 1:1, 3:2, 2:3, 4:3, 3:4, 4:5, 16:9, 9:16, 21:9, 1.91:1 (1K/2K); only 16:9/9:16/21:9/1.91:1 at 4K. Special value "custom": gpt-image-2-edit outputs the exact width×height you pass (both required; each a multiple of 16, longest edge ≤3840, total pixels 655,360–8,294,400). quality (string, optional): low/medium/high — gpt-image-2-edit only. seed (int, optional): Random seed. Note: resolution-based edit models (gpt-image-2-edit, seedream-*-edit, nano-banana-pro/2-edit) ignore width/height — passing them returns an error. Exception: aspect_ratio:"custom" with width+height yields an EXACT pixel size on gpt-image-2-edit. Note: to give multiple reference images (e.g. compose two subjects with gpt-image-2-edit), put the primary in image_url and the rest in image_urls. |
| xbrush_image_upscaleA | Upscale an image to higher resolution. Submits async — poll the returned request_id with xbrush_get_request. Args: image_url (string, required): URL of the image to upscale. upscale_factor (int, optional): 2x or 4x. Default: 2. |
| xbrush_image_remove_bgA | Remove the background from an image. Submits async — poll the returned request_id with xbrush_get_request. Args: image_url (string, required): URL of the image. |
| xbrush_video_generateA | Generate a video from a start image, a text prompt, and/or reference images (reference-to-video). Submits async — poll the returned request_id with xbrush_get_request (typical wait 2-10 min). Args: model (string, required): Video model ID (e.g. kling-v3-pro, kling-o3, veo3.1, seedance-2.0, hailuo-02-pro, wan-2.7-video). Use xbrush_list_models(category='video') — entries include per-model duration constraints. image_url (string, optional): Start image (first frame) for image-to-video. Not needed for text-to-video or reference-to-video. image_urls (array, optional): Reference images for reference-to-video models (seedance-2.0/-fast). Each item is a URL string OR an object {url, role} where role is first_frame/last_frame/reference_image — so one call can combine a start frame, an end frame, and subject references. NUMBERING: in prompt/idea, @ImageN = the N-th item here by 1-based ARRAY POSITION, counting first_frame/last_frame too (NOT 'the N-th reference'). E.g. [last_frame, reference_image] → the reference is @Image2. image_url is not required when this is set. prompt (string, optional): ENGLISH motion/action description, sent to the model as-is. Reference an image_urls item as @ImageN (N = its 1-based position in image_urls). Use 'idea' instead for non-English text. Provide prompt or idea for text-to-video. idea (string, optional): NON-English description (e.g. Korean) — the server translates it before generation. Use this instead of prompt when not writing in English. Reference an image_urls item as @ImageN (N = its 1-based position in image_urls). end_image_url (string, optional): End image (last frame), for models that support an end frame. duration (int, optional): Seconds; valid range is model-specific (e.g. seedance-2.0 4–15, kling 5/10, veo3 4–8). resolution (string, optional): Resolution tier for models that support it (seedance-2.0: 480p/720p/1080p/1440p/2160p/4k/512p/768p). Server-validated per model. aspect_ratio (string, optional): Aspect ratio for models that support it (seedance-2.0: auto/adaptive/16:9/9:16/1:1/4:3/3:4/21:9). generate_audio (bool, optional): Generate audio with the video (seedance-2.0/-fast). consistency_mode (string, optional): Reference consistency for reference-to-video (seedance-2.0/-fast): overlay/advanced/auto. prompt_relevance (float, optional): Prompt adherence (0.0-1.0). |
| xbrush_video_upscaleA | Upscale a video to higher resolution. Submits async — poll the returned request_id with xbrush_get_request. Args: video_url (string, required): URL of the video to upscale. scale (int, required): Upscale multiplier (2 or 4). model (string, optional): Model ID (e.g. realesrgan, seedvr). |
| xbrush_video_extendA | Extend an existing video by generating additional seconds of motion. Submits async — poll the returned request_id with xbrush_get_request. Args: model (string, required): Extend model (e.g. ltx-2.3-extend, pixverse-v6-extend). See xbrush_list_models(category='video'), featureType 'extend'. video_url (string, required): URL of the source video to extend. duration (number, required): Seconds of new video to append (1-20). |
| xbrush_video_retakeA | Regenerate (retake) a video up to a given timestamp, producing a new variation. Submits async — poll the returned request_id with xbrush_get_request. Args: model (string, required): Retake model (e.g. ltx-2.3-retake). See xbrush_list_models(category='video'), featureType 'retake'. video_url (string, required): URL of the source video to retake. end_time (number, required): Timestamp in seconds (>= 0) up to which to regenerate. |
| xbrush_tts_generateA | Generate speech audio from text using an XBrush TTS model. Minimax models (speech-2.6-hd, speech-2.8-hd, speech-2.8-turbo) REQUIRE a voice_id — get one from xbrush_list_voices. ElevenLabs (eleven-v3) works without a voice_id. Submits async — poll the returned request_id with xbrush_get_request. Args: text (string, required): Text to speak. model (string, optional): TTS model ID (e.g. eleven-v3, speech-2.8-hd). Default is Minimax (needs voice_id). voice_id (string, required for Minimax): a voice from xbrush_list_voices. language (string, optional): Locale code (e.g. 'ko', 'en'). speed (float, optional): Speech rate (0.5-2.0). Default: 1.0. |
| xbrush_music_generateA | Generate music from a text prompt using an XBrush music model (e.g. lyria2, lyria3, lyria3-pro). Submits async — generation typically takes tens of seconds to minutes. Poll with xbrush_get_request. Args: prompt (string, required): Text description of the music. model (string, optional): Music model ID. Server default if omitted. duration (int, optional): Duration in seconds (1-120). negative_prompt (string, optional): Elements to exclude. seed (int, optional): Random seed. |
| xbrush_sound_effect_generateA | Generate foley / ambient sound effects for a given video. Video-driven models (pixverse-sound-effects) design sound from the visuals; text-driven models (elevenlabs-sound-effects, stable-audio-sfx) generate from prompt — but video_url is required for every model. Submits async — poll the returned request_id with xbrush_get_request. Args: video_url (string, required): Source video URL (required even for text-driven models). prompt (string, optional): Sound description — main input for text-driven models. model (string, optional): Sound-effect model ID. Server default if omitted. duration (number, optional): Seconds (1-30). |
| xbrush_chatA | Chat with an XBrush-hosted LLM (OpenAI-compatible chat completions, e.g. GLM 5.2). SYNCHRONOUS — returns the completion text directly; no request_id polling needed. The platform gateway cuts responses at ~30s, so keep outputs short: prefer the default reasoning_effort (none) or 'minimal' and a modest max_tokens. On a 504 gateway timeout the request usually STILL completes and bills server-side — recover the text with xbrush_list_requests + xbrush_get_request (failed requests are auto-refunded). Args: model (string, required): e.g. z-ai/glm-5.2. See xbrush_list_models(category='text'). messages (array, required): 1-1000 of {role: system|user|assistant, content: string ≤1M chars}. max_tokens (int, optional): 1-65536, includes reasoning tokens. temperature (float, optional): 0-2. top_p (float, optional): 0-1. frequency_penalty / presence_penalty (float, optional): -2 to 2. reasoning_effort (string, optional): none/minimal/high/max. Default: none (fastest). Billed per token (input/output/cached rates via xbrush_list_models). OpenAI params not listed above (tools, stop, n, seed, response_format, stream) are not supported. |
| xbrush_video_lip_syncA | Sync a face to speech: either a face VIDEO (pixverse-lipsync, infinite-talk) or a still portrait PHOTO animated as a talking head (fabric-1.0, fabric-1.0-fast). Speech comes from audio_url, or from built-in TTS via text + voice_id. Submits async — lip-sync generation can take 30s to several minutes. Poll with xbrush_get_request. Args: video_url (string): Face video URL — video-driven models. Provide this OR image_url. image_url (string): Still portrait URL — talking photo (fabric-1.0/-fast). audio_url (string): Audio URL to drive the mouth movement. Or use text + voice_id. text (string): Text to speak via built-in TTS (with voice_id from xbrush_list_voices). voice_id (string): TTS voice for text. duration (number, optional): Output seconds (1-60). resolution (string, optional): "480p" or "720p" (720p costs more). model (string, optional): Lip-sync model ID; which inputs are required is model-specific. |
| xbrush_watermark_addA | Apply the XBrush watermark to a target image or video. The watermark content is fixed by the server — no customization is accepted. Submits async — poll the returned request_id with xbrush_get_request. Args: image_url (string, optional): Target image URL. video_url (string, optional): Target video URL (one of image_url/video_url required). |
| xbrush_content_moderateA | Run NSFW moderation on an image or video.
The result (poll with xbrush_get_request) includes a Args: image_url (string, optional): Target image URL. video_url (string, optional): Target video URL (provide exactly one of image_url/video_url). |
| xbrush_get_requestA | Get the status and result of an XBrush API request. Use this to check the result of async operations (image edit, video generate, etc.). Args: request_id (string, required): Request ID starting with 'req'. |
| xbrush_list_requestsA | List recent XBrush API requests with status and results. Args: limit (int, optional): Number of requests (1-100). Default: 20. cursor (string, optional): Pagination cursor from previous response. |
| xbrush_check_healthA | Check XBrush API server health status. |
| xbrush_list_modelsA | List available XBrush AI models with pricing info. Models span image (generate/edit/upscale/remove-bg/outpaint/moderate), video (i2v/upscale/lipsync/extend/retake/moderate), audio (tts/music/sound-effect), text (chat LLMs for xbrush_chat, priced per 1M tokens), and utility. Video i2v entries include their duration constraints (min-max seconds, step, default). Watermark has no dedicated model list — call it directly. Args: category (string, optional): 'image', 'video', 'audio', 'text', or 'utility'. |
| xbrush_list_voicesA | List the voices available for text-to-speech, optionally for a specific model/provider.
Use a returned voice_id as the Args: model (string, optional): TTS model ID (e.g. speech-2.8-hd, eleven-v3). Omit for the default provider. |
| xbrush_file_uploadA | Upload a local file to XBrush CDN and get a URL. Use the returned CDN URL as image_url or video_url in other XBrush tools. Supported formats: PNG, JPG, GIF, WebP, MP4, WebM, MP3, WAV. Args: file_path (string, required): Absolute path to the local file. strategy (string, optional): 'auto' (default), 'direct', or 'presign'. - auto: small files (< 10MB) go via direct upload, larger via presigned S3. - direct: POST /v1/files/upload (multipart). - presign: presigned URL + S3 upload (handles large files). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/lweight/xbrush-api-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server