mcp-server

v0.9.0
@codingmantra/mcp-server Checked 4 days ago Published 1 day ago

Official MCP server for CodingMantra AI tools and social media publishing and scheduling

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_social_workflow

Read the social workflow, capabilities, timezone guidance, and platform restrictions before planning content or posting. Read-only; no API call.

list_social_accounts

Read connected Facebook Pages and Instagram accounts with stable platform-prefixed IDs, raw platformAccountId, names, capabilities and reconnect status. No provider tokens. Connect in the web hub first.

generate_social_caption

Synchronously create or refine a caption and hashtags from a brief or images. Uses wallet credits and saved brand context unless brandBrief is supplied. Does not publish. Include verified facts, audience, tone, and CTA in the brief; review the result.

ParameterTypeDescription
brandBriefstringBrand name, audience, voice, offer, facts, and call to action for this post.
captionstringPost text. Instagram caption plus hashtags must fit 2200 characters.
hashtagsarrayRelevant hashtags; duplicates already in the caption are omitted during publication.
isAiGeneratedbooleanDisclose AI-generated or AI-edited Facebook Reel (default false).
mediaLayoutstringApply the same canvas to all slides; fit preserves the full image with white padding, crop fills the canvas.
mediaUrlsarrayImages only. Instagram supports one image or a carousel of 2–10 images; Facebook accepts up to 10.
platformstringTarget platform; defaults to Instagram.
shareToFeedbooleanAlso share Instagram Reel to feed (default true).
videoUrlstringOne HTTPS Reel video URL or owned prepared video preview URL; omit image slides. Server validates and stores the video.

list_social_drafts

Read saved drafts, including captions, images, account selections, and proposed dates. Returns 20 per page; use offset for pagination.

ParameterTypeDescription
offsetintegerNumber of drafts to skip.

save_social_draft

Save a new draft or replace an existing draft by id. Does not queue or publish. Send the complete draft when editing; omitted fields use API defaults. Local images are uploaded and persisted.

ParameterTypeDescription
brandBriefstringBrand name, audience, voice, offer, facts, and call to action for this post.
captionstringPost text. Instagram caption plus hashtags must fit 2200 characters.
hashtagsarrayRelevant hashtags; duplicates already in the caption are omitted during publication.
idstringExact draft, media UUID or post ID returned by a social tool.
isAiGeneratedbooleanDisclose AI-generated or AI-edited Facebook Reel (default false).
mediaLayoutstringApply the same canvas to all slides; fit preserves the full image with white padding, crop fills the canvas.
mediaUrlsarrayImages only. Instagram supports one image or a carousel of 2–10 images; Facebook accepts up to 10.
platformsarrayOptional target accounts; drafts may have no accounts yet.
scheduledForstring | nullOptional proposed date with explicit offset; saving does not schedule.
shareToFeedbooleanAlso share Instagram Reel to feed (default true).
socialContentIdstringOptional media library content ID.
videoUrlstringOne HTTPS Reel video URL or owned prepared video preview URL; omit image slides. Server validates and stores the video.

delete_social_draft

Delete one saved draft belonging to the API-key owner. Does not delete a scheduled or published post.

ParameterTypeDescription
id *stringExact draft, media UUID or post ID returned by a social tool.

list_social_library

Read reusable saved content and scheduled/published posts with ordered slides. Defaults to grouped posts; groupBy media returns individual assets. Read-only.

ParameterTypeDescription
accountIdstringRaw platform account ID; requires platform.
groupBystring
limitinteger
offsetinteger
platformstring
searchstring
statusstring
typestring

list_social_media

Read generated images from your gallery for use in posts. Returns public media URLs; use existing image generation tools to create new visuals.

ParameterTypeDescription
limitintegerImages per page (default 24).
pageintegerGallery page (default 1).

prepare_social_video

Import and validate a public HTTPS MP4 for a reusable Reel video ID, or start a direct upload with upload=true. For direct upload, PUT video bytes to returned uploadUrl with Content-Type video/mp4, then complete_social_video_upload. Does not publish. Common profile: 3–90s, 9:16 H.264/yuv420p, 24–60 fps, 540×960 to 1080×1920, optional AAC 48kHz, max 100 MB.

ParameterTypeDescription
bytesintegerExact local file size in bytes, required with upload=true; the upload signature binds this size.
uploadbooleanStart direct storage upload instead of importing a URL.
urlstringPublic HTTPS MP4 URL; no redirects or credentials.

complete_social_video_upload

Validate a completed direct video upload and return its reusable owned video ID. Repeat safely for a ready video. Does not publish.

ParameterTypeDescription
id *stringID returned by prepare_social_video upload=true.

get_social_video

Read ready, validated video metadata for your account. Does not publish.

ParameterTypeDescription
id *stringOwned ready video UUID.

upload_social_image

Synchronously upload and normalize an image from HTTPS URL, base64, data URI, or local file. Returns an owner-scoped reusable media ID and JPEG URL; does not publish or generate AI content. Source max 10 MB/40 million pixels; request max 20 MB.

ParameterTypeDescription
image *HTTPS URL, raw base64, data URI, local image path, or explicit image object. Static JPEG/PNG/WebP; 10 MB decoded limit. Uploaded media IDs belong to your API-key owner.

get_social_image

Read prepared image metadata by reusable media UUID. Read-only and scoped to your API-key owner.

ParameterTypeDescription
id *stringMedia UUID returned by upload_social_image.

schedule_social_draft

Asynchronously queue an approved saved hub draft using the existing atomic draft-consumption workflow. Requires draftId and complete final platforms/content/scheduledFor. Reusing draftId returns the original schedule; do not use for new standalone posts. Use raw platformAccountId in platforms.

ParameterTypeDescription
content *objectFinal post caption, hashtags, brand brief, and images.
draftId *stringOptional saved draft ID. Scheduling consumes it atomically; repeating this request returns the same scheduled post.
platforms *arrayConnected accounts to publish to; select each account once.
scheduledFor *stringFuture ISO 8601 timestamp with explicit UTC offset, e.g. 2026-10-10T09:00:00+05:30. Resolve the user’s timezone before scheduling.
socialContentIdstringOptional media library content ID for tracking.

schedule_social_post

Asynchronously queue future delivery to one or multiple owned accounts. Requires a future ISO timestamp with an explicit offset and an idempotencyKey. Acceptance is not publication; poll get_social_post for per-account results. Does not consume a saved draft.

ParameterTypeDescription
accountIds *One or up to 20 distinct IDs from list_social_accounts: facebook:<Meta Page ID> or instagram:<Meta account ID>.
idempotencyKey *stringCaller-chosen key for this intended post. Preserve the exact key and body on retries; a new key means a new post. Never invent a new key after a timeout.
scheduledFor *stringFuture ISO 8601 timestamp with explicit UTC offset, e.g. 2026-10-10T09:00:00+05:30. Resolve the user’s timezone before scheduling.
captionstringPost text. Instagram caption plus hashtags must fit 2200 characters.
hashtagsarrayRelevant hashtags; duplicates already in the caption are omitted during publication.
imagesarrayImage inputs; Instagram requires 1–10 images (single image or carousel). Use reusable mediaId for large images.
isAiGeneratedbooleanDisclose AI-generated or AI-edited Facebook Reel (default false).
mediaLayoutstringApply the same canvas to all slides; fit preserves the full image with white padding, crop fills the canvas.
shareToFeedbooleanAlso share Instagram Reel to feed (default true).
videoobjectSingle-video Reel; omit images. First prepare/validate the video.

list_social_posts

Read scheduled, published, failed, or cancelled posts. Filter by platform, status, or date range; use limit/offset for pagination. Dates must include a UTC offset.

ParameterTypeDescription
fromDatestringInclusive start timestamp with offset.
limitintegerPage size, default 20.
offsetintegerNumber of posts to skip.
platformstringPlatform filter.
statusstringPost status filter.
toDatestringInclusive end timestamp with offset.

get_social_post

Read one scheduled post, including overall and per-account delivery status, retries, errors, job IDs and providerPostId receipts. Check this before retrying a failed or ambiguous publication.

ParameterTypeDescription
id *stringExact draft, media UUID or post ID returned by a social tool.

update_social_post

Edit a pending schedule, content, or target accounts. Provide a new future scheduledFor to reschedule or retry a failed post. The API rejects changes to posts that are publishing or already published.

ParameterTypeDescription
id *stringExact draft, media UUID or post ID returned by a social tool.
contentobjectFields to change; omitted fields retain their existing values.
platformsarrayConnected accounts to publish to; select each account once.
scheduledForstringFuture ISO 8601 timestamp with explicit UTC offset, e.g. 2026-10-10T09:00:00+05:30. Resolve the user’s timezone before scheduling.

cancel_social_post

Cancel outstanding deliveries and retain the record. Successful targets remain published; pending targets are cancelled. The API rejects cancellation while publishing or after publication. Does not remove an already published platform post.

ParameterTypeDescription
id *stringExact draft, media UUID or post ID returned by a social tool.

delete_social_post

Remove a schedule record. The API prevents deletion during publishing or after publication. Does not delete a live Facebook or Instagram post.

ParameterTypeDescription
id *stringExact draft, media UUID or post ID returned by a social tool.

publish_social_post

Asynchronously queue immediate delivery to one or multiple owned Facebook/Instagram accounts. Requires idempotencyKey; identical retries return the original post. HTTP acceptance does not mean live publication. Poll get_social_post; remote response loss may still be ambiguous.

ParameterTypeDescription
accountIds *One or up to 20 distinct IDs from list_social_accounts: facebook:<Meta Page ID> or instagram:<Meta account ID>.
idempotencyKey *stringCaller-chosen key for this intended post. Preserve the exact key and body on retries; a new key means a new post. Never invent a new key after a timeout.
captionstringPost text. Instagram caption plus hashtags must fit 2200 characters.
hashtagsarrayRelevant hashtags; duplicates already in the caption are omitted during publication.
imagesarrayImage inputs; Instagram requires 1–10 images (single image or carousel). Use reusable mediaId for large images.
isAiGeneratedbooleanDisclose AI-generated or AI-edited Facebook Reel (default false).
mediaLayoutstringApply the same canvas to all slides; fit preserves the full image with white padding, crop fills the canvas.
shareToFeedbooleanAlso share Instagram Reel to feed (default true).
videoobjectSingle-video Reel; omit images. First prepare/validate the video.

get_social_analytics

Read recorded publishing totals, reach, engagement, top posts, and posting activity. Metrics reflect stored provider data and may be incomplete; these are not guaranteed optimal posting times.

ParameterTypeDescription
accountIdstringOptional connected account filter.
platformstringOptional platform filter.
rangestringReporting range, default 30d.

list_meta_ad_accounts

List connected Meta Ad Accounts (act_...) and Ads permission readiness (ads_read, ads_management, pages_manage_ads). Enable Meta Ads Access in the web hub first.

ParameterTypeDescription
refreshbooleanSet true to refresh ad accounts from Meta Graph API.

get_meta_ads_overview

Read Meta Ads account KPIs (spend, reach, clicks, CTR, CPC, ROAS), daily trend, and campaign health scores with diagnostic flags (ad fatigue, low CTR, high CPC, zero-result spend).

ParameterTypeDescription
adAccountId *stringMeta Ad Account ID (e.g., act_123456).
datePresetstringReporting preset, default last_30d.

create_meta_ad_campaign

Create a simplified Meta Ads campaign, ad set, creative, and ad (or boost an existing Facebook Page post). Requires idempotencyKey. Defaults startStatus to PAUSED for spend safety unless ACTIVE is explicitly requested.

ParameterTypeDescription
adAccountId *stringMeta Ad Account ID.
campaignName *stringCampaign name.
dailyBudget *numberDaily budget in major account currency units (e.g. 25 for $25/day).
goal *stringSimplified business goal.
idempotencyKey *stringCaller-chosen key for this intended post. Preserve the exact key and body on retries; a new key means a new post. Never invent a new key after a timeout.
pageId *stringFacebook Page ID.
ageMaxinteger
ageMininteger
audiencePresetstringSimplified audience preset.
callToActionstringCall-to-action button.
countriesarray2-letter ISO country codes (default ["US"]).
descriptionstringOptional link description.
destinationUrlstringLanding page HTTPS URL (required for mode=new).
existingPostIdstringExisting Facebook object_story_id (pageId_postId) when mode=boost_post.
genderstring
headlinestringOptional ad headline.
imageUrlstringPublic HTTPS image URL for mode=new.
instagramAccountIdstringOptional Instagram professional account ID.
modestringCreate a new ad or boost an existing Page post.
primaryTextstringAd primary copy (required for mode=new).
startStatusstringInitial status, defaults to PAUSED.

update_meta_ad_campaign

Pause, resume, rename, or update the daily budget of an existing Meta campaign, ad set, or ad.

ParameterTypeDescription
adAccountId *stringOwning Meta Ad Account ID.
id *stringNumeric Meta campaign, ad set, or ad ID.
dailyBudgetnumberUpdated daily budget in major account currency units.
entityTypestringTarget entity type (default campaign).
namestringUpdated entity name.
statusstringNew delivery status.

audit_meta_ads

Run a credit-gated AI performance audit on a Meta Ad Account (3 AI credits) to detect wasted spend, ad fatigue, and prioritized 1-click optimizations.

ParameterTypeDescription
adAccountId *stringMeta Ad Account ID.
datePresetstringAnalysis window (default last_30d).

manage_meta_ad_guardrails

List, create, or delete automated Meta Ads Spend, CPA, CPC, CTR, or Frequency guardrail rules monitored by the background worker.

ParameterTypeDescription
operation *stringAction to perform on guardrail rules.
actionstringGuardrail action (default notify).
adAccountIdstringMeta Ad Account ID (required for create; optional filter for list).
campaignIdstringOptional campaign ID scope for create.
campaignNamestring
idstringGuardrail rule ID (required for delete).
metricstringMetric to watch (required for create).
namestringRule name (required for create).
operatorstringTrigger comparison (required for create).
thresholdnumberThreshold value (required for create).

generate_jewellery_rate_poster

Generates a branded gold and silver rate poster. Synchronous: returns the generated image for inline display. Rates are supplied by the caller, not fetched from a market feed.

ParameterTypeDescription
scenePrompt *stringPoster scene, background, and visual style.
addressstringBusiness address.
aspectRatiostringAspect ratio supported by the selected model.
brandNamestringJewelry business name.
datestringDate to display on the poster.
footerTextstringOptional footer or disclaimer.
goldRate14kstring14K gold rate text, including currency and units.
goldRate18kstring18K gold rate text, including currency and units.
goldRate22kstring22K gold rate text, including currency and units.
goldRate24kstring24K gold rate text, including currency and units.
logoImagestringOptional brand logo URL, data URI, or local file path.
modelstringImage model slug; use list_image_models to discover models.
phoneNumberstringBusiness contact number.
productImagestringOptional jewelry image URL, data URI, or local file path.
resolutionstringResolution supported by the selected model (1K, 2K, or 4K).
silverRatestringSilver rate text, including currency and units.
tagLinestringOptional brand tagline.

generate_product_photo

Generates studio-grade commercial product photography with customizable background scenes, ambient occlusion contact shadows, camera optics, resolutions (1K, 2K, 4K), aspect ratios, and dynamic logo/text overlays. Returns the image directly for inline display (synchronous).

ParameterTypeDescription
productImages *arrayArray of product images. Each item can have 'url', 'dataUrl', or local 'path'. At least one required.
scenePrompt *stringA detailed description of the background scene, surface, and environment for the product photo.
aspectRatiostringOutput aspect ratio ('1:1', '16:9', '9:16', '4:5'). Default is '1:1'.
backgroundstringOptional model-specific background setting ('auto', 'transparent', 'opaque').
logoImagestringOptional URL, data URI, or local file path of a brand logo to place on the image.
logoPlacementstringWhere to place the logo (e.g., 'top-left', 'bottom-right').
logoSizenumberScale of the logo overlay (0.05 to 0.5). Default is 0.15.
marketingTextstringOptional marketing text or slogan to overlay.
modelstringThe AI model slug (e.g., 'pro', 'standard', 'flash'). Default is 'pro'.
overlayTextstringOptional text to overlay on the image.
promptIdstringOptional ID of a pre-defined background template.
qualitystringOptional model-specific quality setting (e.g., 'high', 'xhigh', 'max').
referenceImagestringOptional URL, data URI, or local file path of a style reference image.
resolutionstringOutput resolution ('1K', '2K', '4K'). Default is '1K'.
sizeMeasurementstringOptional physical dimensions of the product (e.g., '10 cm tall') to maintain realistic scale.

try_on_jewelry

Luxury jewelry virtual try-on. Places necklaces, rings, earrings, and bracelets naturally on human models with prongs/gemstone preservation, authentic optical dispersion, and anatomical contact shadows. Returns generated image directly (synchronous).

ParameterTypeDescription
jewelryImages *arrayArray of jewelry product images. Each can have 'url', 'dataUrl', or local 'path'. At least one required.
aspectRatiostringOutput aspect ratio ('1:1', '9:16', '16:9'). Default is '1:1'.
autoSelfCorrectbooleanSet true only when the user explicitly requests quality checking and up to one correction. Defaults to false. Each quality check costs 2 credits; one correction costs the selected model/resolution ima…
logoImagestringOptional brand logo overlay.
logoPlacementstringLogo placement ('top-left', 'bottom-right', etc.).
logoSizenumberScale of the logo overlay.
marketingTextstringOptional marketing text or slogan.
modelstringModel tier slug ('standard', 'pro', 'flash'). Default is 'flash'.
modelIdstringOptional full image model ID (e.g., 'google/gemini-nano-banana-2.1').
overlayTextstringOptional text to overlay on the image.
personImagestringOptional photo of a person to model the jewelry (URL, data URI, or local file path). If omitted, an elegant editorial model is generated.
promptstringCreative styling directions (e.g., 'wearing black velvet evening gown, soft studio rim lighting, Parisian luxury ambiance').
promptIdstringOptional ID of a pre-defined jewelry try-on style preset.
qualitystringOptional model-specific quality setting.
referenceImagestringOptional campaign reference image (URL, data URI, or local path) to copy lighting and mood from.
resolutionstringOutput resolution ('1K', '2K', '4K'). Default is '1K'.
sizeMeasurementstringPhysical dimensions (e.g., '2 cm pendant', 'ring size 7') to maintain accurate scale.

try_on_apparel

Virtual fashion apparel try-on. Drapes garments realistically along model anatomy with natural gravitational folds, realistic tension, ambient occlusion contact shadows, and editorial lighting. Default model tier is Flash. Returns generated image directly (synchronous).

ParameterTypeDescription
apparelImages *arrayArray of clothing/apparel images. Each can have 'url', 'dataUrl', or local 'path'. At least one required.
aspectRatiostringOutput aspect ratio ('9:16', '1:1', '16:9', '4:5'). Default is '9:16'.
logoImagestringOptional brand logo overlay.
marketingTextstringOptional marketing copy.
modelstringThe model tier ('flash', 'pro', 'standard'). Default is 'flash'.
modelImagestringOptional photo of a person/model (URL, data URI, or local path). If omitted, a professional fashion model is generated.
overlayTextstringOptional text overlay.
promptstringStyling and scene creative direction (e.g., 'standing on Milan street, golden hour sunlight, editorial fashion magazine style').
referenceImagestringOptional style reference image URL, data URI, or local path.
resolutionstringOutput resolution ('1K', '2K', '4K'). Default is '1K'.

try_on_product

Universal commercial product staging and try-on across footwear, accessories, watches, eyewear, cosmetics, and furniture with 3-point studio lighting and ambient occlusion contact shadows. Default model tier is Flash. Returns generated image directly (synchronous).

ParameterTypeDescription
productImages *arrayArray of product images. At least one required.
aspectRatiostringOutput aspect ratio ('1:1', '16:9', '9:16'). Default is '1:1'.
logoImagestringOptional brand logo overlay.
mainImagestringOptional base image (model portrait, empty room, or tabletop) to place the product into.
modelstringThe model tier ('flash', 'pro', 'standard'). Default is 'flash'.
overlayTextstringOptional text overlay.
promptstringCreative styling and environment directions.
referenceImagestringOptional style reference image.
resolutionstringOutput resolution ('1K', '2K', '4K'). Default is '1K'.
sizeMeasurementstringPhysical dimensions (e.g., '10 inches', '30 cm') to maintain exact scale.

generate_festival_post

Generates high-conversion festival marketing graphics, holiday greetings (Diwali, Eid, Christmas, New Year, Valentine's), and promotional event banners with product and brand logo integration. Default model is Flash. Returns generated image directly (synchronous).

ParameterTypeDescription
festivalPrompt *stringFestival theme or campaign message (e.g., 'Diwali luxury jewelry promotion with warm golden diyas and floral rangoli').
aspectRatiostringOutput aspect ratio ('1:1', '9:16', '16:9'). Default is '1:1'.
logoImagestringOptional brand logo image.
marketingTextstringSupporting promotional message or contact details.
modelstringThe model tier ('flash', 'pro', 'standard'). Default is 'flash' (Flash 2.1).
overlayTextstringMain headline or festive greeting text (e.g., 'Happy Diwali - 20% Off').
productImagestringOptional hero product image (URL, data URI, or local file path) to place centrally in the festive composition.
resolutionstringOutput resolution ('1K', '2K'). Default is '1K'.

build_human

Creates photorealistic AI human models tailored for brand photography, fashion, ecommerce, and marketing campaigns with complete demographic, facial, hair, and body customization, plus multi-view character sheets (2x2 grid). Default model tier is Flash. Returns generated image directly (synchronous).

ParameterTypeDescription
agestringAge category or specific age (e.g., 'Young Adult', '25 years old', 'Middle-aged').
aspectRatiostringOutput aspect ratio ('1:1', '9:16', '4:5', '16:9'). Default is '1:1'.
bodyHeightstringHeight description (e.g., 'Petite', 'Average', 'Tall Fashion Model').
bodyShapestringBody shape (e.g., 'Hourglass', 'Athletic Rectangular', 'Pear', 'Inverted Triangle').
bodySizestringBody build (e.g., 'Petite', 'Slim Athletic', 'Medium', 'Curvy', 'Plus Size').
countrystringCountry of origin (e.g., 'India', 'Japan', 'France', 'Brazil').
culturalTraitsstringEthnicity or cultural heritage (e.g., 'South Asian', 'East Asian', 'Caucasian', 'African').
cupSizestringBust proportion if female (e.g., 'Small', 'Medium', 'Full').
customTweakPromptstringCustom refinement or scene styling prompt (e.g., 'wearing an ivory cashmere turtleneck against a warm minimalist studio backdrop').
extraDescriptionstringExtra unique physical traits (e.g., 'light freckles across nose bridge, subtle smile').
eyeColorstringEye color (e.g., 'Dark Brown', 'Hazel Green', 'Deep Blue').
eyeShapestringEye shape (e.g., 'Almond', 'Round', 'Monolid', 'Hooded').
faceShapestringFace shape (e.g., 'Oval', 'Square', 'Heart', 'Round').
genderstringGender identity (e.g., 'Female', 'Male', 'Non-binary').
generateMultiViewbooleanGenerate a 4-panel consistent character sheet in a 2x2 grid (Front, Side, 3/4, Close-up detail). Default is false.
hairColorstringHair color (e.g., 'Natural Black', 'Chestnut Brown', 'Honey Blonde').
hairStylestringHairstyle (e.g., 'Long Waves', 'Buzz Cut', 'Sleek Bob', 'Afro', 'Layered Cut').
hairThicknessstringHair density (e.g., 'Thick', 'Medium', 'Fine').
hairTypestringHair texture (e.g., 'Straight', 'Wavy', 'Curly', 'Coily').
modelstringModel tier ('flash', 'pro', 'standard'). Default is 'flash'.
muscleDefinitionstringMuscle definition (e.g., 'Soft Natural', 'Toned Athletic', 'Defined Muscular').
namestringOptional name or character identifier for the model.
noseShapestringNose shape (e.g., 'Natural Straight', 'Aquiline', 'Button', 'Broad').
referenceImagesarrayOptional array of reference face or body images (URLs, data URIs, or local file paths) to guide identity.
resolutionstringOutput resolution ('1K', '2K', '4K'). Default is '1K'.
skinTonestringComplexion and skin tone (e.g., 'Medium Warm', 'Fair Porcelain', 'Rich Deep Bronze').

generate_youtube_thumbnail

Generates high-CTR YouTube thumbnails with rule-of-thirds composition, emotional human expressions, vibrant contrast separation, and legible bold text overlays. Returns generated image directly (synchronous).

ParameterTypeDescription
prompt *stringCore video concept or thumbnail description (e.g., 'Shocked tech reviewer holding futuristic glowing AI smartphone, neon studio background').
aspectRatiostringThumbnail aspect ratio. Default is '16:9'.
backgroundImagestringOptional custom background image.
logoImagestringOptional channel/brand logo to place in corner.
modelstringModel tier ('flash', 'pro', 'standard'). Default is 'flash' (google/gemini-nano-banana-2.1).
modelIdstringThe image model ID.
overlayTextstringShort, punchy thumbnail headline text (e.g., 'DON\'T BUY THIS!').
personImagestringOptional photo of the YouTube creator/subject (URL, data URI, or local path) to feature prominently.
promptIdstringOptional ID or title of a pre-defined layout style template from youtubeThumbnailPrompts.
referenceImagestringOptional style or concept reference image (URL, data URI, or local file path).
resolutionstringOutput resolution ('1K', '2K', '4K'). Default is '1K'.

generate_passport_photo

Converts any portrait into an official, compliant passport or visa identity photo with pixel-level facial identity preservation, neutral lighting, and plain white/off-white background. Default model tier is Flash. Default aspect ratio is '1:1'. Returns generated image directly (synchronous).

ParameterTypeDescription
photoDataUri *stringSource portrait photo (URL, data URI, or local file path) to convert.
aspectRatiostringPassport aspect ratio ('1:1', '4:5', '3:4'). Default is '1:1'.
modelstringModel tier ('flash', 'pro', 'standard'). Default is 'flash' (google/gemini-nano-banana-2.1).
modelIdstringThe image model ID.
promptstringAdjustments (e.g., 'white background, formal dark navy business suit, centered frontal view').
promptIdstringOptional ID or title of a pre-defined style template from passportPhotoPrompts.
referenceImagestringOptional style reference image (URL, data URI, or local file path) to guide attire or lighting.
resolutionstringOutput resolution ('1K', '2K', '4K'). Default is '1K'.

sketch_to_real

Transforms hand-drawn sketches, line drawings, or product drafts into photorealistic commercial images while strictly preserving the sketched silhouette, proportions, and outlines. Default model tier is Flash. Returns generated image directly (synchronous).

ParameterTypeDescription
sketchImage *stringThe source sketch/drawing image (URL, data URI, or local file path).
aspectRatiostringOutput aspect ratio ('1:1', '16:9', '9:16', '4:5'). Default is '1:1'.
logoImagestringOptional brand logo overlay (URL, data URI, or local file path).
marketingTextstringOptional marketing copy overlay.
modelstringModel tier ('flash', 'pro', 'standard'). Default is 'flash'.
overlayTextstringOptional headline text overlay.
promptstringDescription of materials, textures, colors, and lighting (e.g., 'matte black carbon fiber body, polished titanium accents, studio lighting').
referenceImagestringOptional style/concept reference image (URL, data URI, or local file path).
resolutionstringOutput resolution ('1K', '2K', '4K'). Default is '1K'.
stylestringTarget render style ('Photorealistic', 'Cinematic', '3D Render'). Default is 'Photorealistic'.

edit_professional_photo

Transforms, grades, and enhances portraits and lifestyle photos into magazine-grade studio or commercial editorial photography. Enforces natural dermal micro-pores, authentic iris catchlights, directional studio lighting, and realistic depth of field. Default model tier is Flash. Returns generated image directly (synchronous).

ParameterTypeDescription
prompt *stringEnhancement instruction or desired photo transformation (e.g., 'warm dusk cinematic lighting, shallow depth of field, natural skin texture, magazine editorial portrait').
aspectRatiostringOutput aspect ratio ('1:1', '4:5', '9:16', '16:9'). Default is '1:1'.
imagestringConvenience single subject photo (URL, data URI, or local file path) if only providing one image.
imagesarrayArray of subject reference photos (URL, data URI, or local file path). Each item can have 'url', 'dataUrl', or local 'path'. At least one required.
modelstringModel tier ('flash', 'pro', 'standard'). Default is 'flash' (google/gemini-nano-banana-2.1).
modelIdstringThe image model ID.
promptIdstringOptional ID or title of a pre-defined photography scene template.
referenceImagestringOptional style or concept reference image (URL, data URI, or local file path).
resolutionstringOutput resolution ('1K', '2K', '4K'). Default is '1K'.

edit_nano_banana

Creative multi-reference AI image editor and compositor. Generates, modifies, or restyles images from multiple reference photos and text instructions with multi-subject composition, perspective alignment, ground contact shadows, and versatile artistic styles (photorealistic, action figurine, chibi/Funko Pop, anime/Ghibli, 3D render). Default model tier is Flash. Returns generated image directly (synchronous).

ParameterTypeDescription
prompt *stringThe creative editing or generation prompt describing desired composition, style, or changes.
aspectRatiostringOutput aspect ratio ('1:1', '4:5', '9:16', '16:9'). Default is '1:1'.
imagestringConvenience single reference photo (URL, data URI, or local file path) if only providing one image.
imagesarrayArray of reference images (URL, data URI, or local file path). Each item can have 'url', 'dataUrl', or local 'path'. At least one required.
modelstringModel tier ('flash', 'pro', 'standard', 'gemini-nano-banana-2.1'). Default is 'flash' (google/gemini-nano-banana-2.1).
modelIdstringThe image model ID (e.g. 'google/gemini-nano-banana-2.1', 'google/gemini-3-pro-image').
promptIdstringOptional ID or title of a pre-defined style template (e.g., 'action-figure', 'funko-pop', 'studio-ghibli', '16bit-game-character').
referenceImagestringOptional style or concept reference image (URL, data URI, or local file path).
resolutionstringOutput resolution ('1K', '2K', '4K'). Default is '1K'.

generate_blog_image

Generates high-impact, editorial blog hero images, article thumbnails, and banners with clean composition, visual hierarchy, intentional negative space, and exact text overlays. Default aspect ratio is 16:9. Default model tier is Flash. Returns generated image directly (synchronous).

ParameterTypeDescription
prompt *stringDescription of the desired blog hero image, article concept, or editorial illustration.
aspectRatiostringOutput aspect ratio ('16:9', '1:1', '4:3', '3:4', '9:16', '4:5'). Default is '16:9'.
modelstringModel tier ('flash', 'pro', 'standard'). Default is 'flash' (google/gemini-nano-banana-2.1).
modelIdstringThe image model ID.
overlayTextstringOptional short text, title, or headline to overlay legibly on the image.
promptIdstringOptional ID or title of a pre-defined style template from blogImagePrompts (e.g., 'neon-cyber-circuit', 'balancing-stones').
referenceImagestringOptional style or aesthetic reference image (URL, data URI, or local file path).
resolutionstringOutput resolution ('1K', '2K', '4K'). Default is '1K'.

generate_baby_milestone

Creates magical baby milestone keepsake portraits by isolating the baby and generating enchanting themed backgrounds with organic milestone text integration, while preserving the baby's exact face, expression, skin tone, clothing, and posture. Default model tier is Flash. Default aspect ratio is '1:1'. Returns generated image directly (synchronous).

ParameterTypeDescription
photoDataUri *stringThe baby photo (URL, data URI, or local file path) to isolate and preserve as the main subject.
aspectRatiostringOutput aspect ratio ('1:1', '4:5', '3:4', '16:9', '9:16'). Default is '1:1'.
customPromptstringCreative theme or environment instructions (e.g., 'Enchanted woodland forest with soft morning sunbeams and wildflowers').
milestoneUnitstringUnit for milestone ('month' or 'year').
milestoneValuenumberMilestone number (e.g., 1, 3, 6, 12).
modelstringModel tier ('flash', 'pro', 'standard'). Default is 'flash' (google/gemini-nano-banana-2.1).
modelIdstringThe image model ID.
promptIdstringOptional ID or title of a pre-defined style preset from babyMilestonePrompts.
referenceImagestringOptional environmental style reference image (URL, data URI, or local file path).
resolutionstringOutput resolution ('1K', '2K', '4K'). Default is '1K'.

upscale_image

Enhances a reference image with the Pro AI model at 4K. Preserves composition through instructions and validates larger dimensions and matching proportions. AI may alter fine details. Uses 60 credits; returns the upscaled image synchronously.

ParameterTypeDescription
imageDataUri *stringThe image to upscale (URL, data URI, or local file path).

generate_qr_code

Generates custom QR codes for URLs, plain text, Wi-Fi credentials, vCards, emails, and UPI payment strings with customizable colors, sizing, and error correction. Returns QR image directly (synchronous).

ParameterTypeDescription
type *stringThe type of QR code to generate.
value *stringThe text, URL, or data payload to encode.
bgColorstringBackground color as hex (e.g., '#FFFFFF'). Default is white.
fgColorstringForeground color as hex (e.g., '#000000'). Default is black.
levelstringError correction level. Default is 'L'.
sizenumberQR code size in pixels (50-2048). Default is 512.

generate_qr_code_simple

Quick single-parameter QR code generation from plain text or URL. Returns QR image directly (synchronous).

ParameterTypeDescription
text *stringThe text or URL to encode in the QR code.

get_user_credits

Checks your current CodingMantra AI wallet credit balance. Useful before launching batches or large video/image tasks.

get_credit_history

Instantly retrieves recent wallet transactions and the current balance. Use it to reconcile campaign spend, refunds, or top-ups.

ParameterTypeDescription
limitintegerMaximum number of recent transactions, newest first.

quote_product_photo

Instantly estimates the credit cost and wallet shortfall for one or more separate product photo generations. Call before generate_product_photo to plan a catalog budget. Does not generate images or spend credits.

ParameterTypeDescription
aspectRatiostringSupported output aspect ratio, such as 1:1 or 4:5. Defaults to 1:1.
backgroundstringOptional model-specific background setting, as used for generation.
generationCountintegerNumber of separate photo requests using these same settings.
hasLogobooleanWhether each request includes a logo image.
hasStyleReferencebooleanWhether each request includes a separate style reference image.
modelstringOptional image model slug or ID from list_image_models.
productImageCountintegerProduct images sent in each generation request. Must fit the model’s input limit together with any logo and style reference.
qualitystringOptional model-specific quality setting, as used for generation.
resolutionstringOutput resolution supported by that model, such as 2K.

list_image_models

Lists all available CodingMantra AI image generation models (e.g., Gemini Flash, Gemini Pro, GPT Image 2.6 Sunburst, Seedream 5.0 Flash, MAI-Image 2.7 Flash), including supported resolutions, aspect ratios, reference-image support, and sample credit costs.

list_video_models

Instantly lists video model IDs, resolutions, aspect ratios, durations, audio and image support, and sample credit costs. Use this before submitting asynchronous video jobs.

generate_product_video

Generates commercial product videography. Asynchronous: returns a jobId. You MUST use check_video_job_status with the jobId to poll for completion.

ParameterTypeDescription
aspectRatio *stringRequired aspect ratio supported by the selected model (e.g., 9:16 or 16:9).
model *stringModel slug (e.g., 'google/veo-3.1-fast', 'google/veo-3.1').
prompt *stringRequired video description or creative prompt (10-5000 characters).
resolution *stringRequired resolution supported by the selected model (480p, 720p, 768p, or 1080p).
timeDuration *stringRequired duration in seconds supported by the selected model. Veo supports 4, 6, or 8; use 8 for 1080p, references, or an end frame.
ambientNoisestringAmbient sound description.
cameraMotionstringCamera motion instructions (e.g., 'orbit right', 'slow push-in').
charactersarrayOptional named characters for consistent storytelling.
dialoguestringOptional voiceover or dialogue script (up to 200 characters).
endImagestringBase64 data URI, local file path, or public URL for the last frame.
generateAudiobooleanWhether to generate synchronized audio. Default is false.
guidanceScalenumberOptional guidance strength for models that support it.
languagestringVoiceover language.
mainImagestringBase64 data URI, local file path, or public URL for the main subject image (Image-to-Video mode).
negativePromptstringElements to exclude from the video.
referenceImagesarrayReference images for style matching. Choose only one image mode: main image, frames, or references. Veo supports up to 3 references and requires 8 seconds for references or an end frame.
seedintegerOptional nonnegative random seed for models that support it.
soundEffectsstringSound effects direction for Story Teller.
soundSuggestionstringBackground music or sound effects direction.
startImagestringBase64 data URI, local file path, or public URL for the first frame.
styleAmbiancestringVisual style and atmosphere for Story Teller.

generate_apparel_video

Generates runway fashion and apparel motion showcase videos. Asynchronous: returns a jobId. You MUST use check_video_job_status with the jobId to poll for completion.

ParameterTypeDescription
aspectRatio *stringRequired aspect ratio supported by the selected model (e.g., 9:16 or 16:9).
model *stringModel slug (e.g., 'google/veo-3.1-fast', 'google/veo-3.1').
prompt *stringRequired video description or creative prompt (10-5000 characters).
resolution *stringRequired resolution supported by the selected model (480p, 720p, 768p, or 1080p).
timeDuration *stringRequired duration in seconds supported by the selected model. Veo supports 4, 6, or 8; use 8 for 1080p, references, or an end frame.
ambientNoisestringAmbient sound description.
cameraMotionstringCamera motion instructions (e.g., 'orbit right', 'slow push-in').
charactersarrayOptional named characters for consistent storytelling.
dialoguestringOptional voiceover or dialogue script (up to 200 characters).
endImagestringBase64 data URI, local file path, or public URL for the last frame.
generateAudiobooleanWhether to generate synchronized audio. Default is false.
guidanceScalenumberOptional guidance strength for models that support it.
languagestringVoiceover language.
mainImagestringBase64 data URI, local file path, or public URL for the main subject image (Image-to-Video mode).
negativePromptstringElements to exclude from the video.
referenceImagesarrayReference images for style matching. Choose only one image mode: main image, frames, or references. Veo supports up to 3 references and requires 8 seconds for references or an end frame.
seedintegerOptional nonnegative random seed for models that support it.
soundEffectsstringSound effects direction for Story Teller.
soundSuggestionstringBackground music or sound effects direction.
startImagestringBase64 data URI, local file path, or public URL for the first frame.
styleAmbiancestringVisual style and atmosphere for Story Teller.

generate_festival_video

Generates celebratory festival greetings and motion graphics. Asynchronous: returns a jobId. You MUST use check_video_job_status with the jobId to poll for completion.

ParameterTypeDescription
aspectRatio *stringRequired aspect ratio supported by the selected model (e.g., 9:16 or 16:9).
model *stringModel slug (e.g., 'google/veo-3.1-fast', 'google/veo-3.1').
prompt *stringRequired video description or creative prompt (10-5000 characters).
resolution *stringRequired resolution supported by the selected model (480p, 720p, 768p, or 1080p).
timeDuration *stringRequired duration in seconds supported by the selected model. Veo supports 4, 6, or 8; use 8 for 1080p, references, or an end frame.
ambientNoisestringAmbient sound description.
cameraMotionstringCamera motion instructions (e.g., 'orbit right', 'slow push-in').
charactersarrayOptional named characters for consistent storytelling.
dialoguestringOptional voiceover or dialogue script (up to 200 characters).
endImagestringBase64 data URI, local file path, or public URL for the last frame.
generateAudiobooleanWhether to generate synchronized audio. Default is false.
guidanceScalenumberOptional guidance strength for models that support it.
languagestringVoiceover language.
mainImagestringBase64 data URI, local file path, or public URL for the main subject image (Image-to-Video mode).
negativePromptstringElements to exclude from the video.
referenceImagesarrayReference images for style matching. Choose only one image mode: main image, frames, or references. Veo supports up to 3 references and requires 8 seconds for references or an end frame.
seedintegerOptional nonnegative random seed for models that support it.
soundEffectsstringSound effects direction for Story Teller.
soundSuggestionstringBackground music or sound effects direction.
startImagestringBase64 data URI, local file path, or public URL for the first frame.
styleAmbiancestringVisual style and atmosphere for Story Teller.

generate_jewelry_video

Generates luxury jewelry videography with optical brilliance and rotating display. Asynchronous: returns a jobId. You MUST use check_video_job_status with the jobId to poll for completion.

ParameterTypeDescription
aspectRatio *stringRequired aspect ratio supported by the selected model (e.g., 9:16 or 16:9).
model *stringModel slug (e.g., 'google/veo-3.1-fast', 'google/veo-3.1').
prompt *stringRequired video description or creative prompt (10-5000 characters).
resolution *stringRequired resolution supported by the selected model (480p, 720p, 768p, or 1080p).
timeDuration *stringRequired duration in seconds supported by the selected model. Veo supports 4, 6, or 8; use 8 for 1080p, references, or an end frame.
ambientNoisestringAmbient sound description.
cameraMotionstringCamera motion instructions (e.g., 'orbit right', 'slow push-in').
charactersarrayOptional named characters for consistent storytelling.
dialoguestringOptional voiceover or dialogue script (up to 200 characters).
endImagestringBase64 data URI, local file path, or public URL for the last frame.
generateAudiobooleanWhether to generate synchronized audio. Default is false.
guidanceScalenumberOptional guidance strength for models that support it.
languagestringVoiceover language.
mainImagestringBase64 data URI, local file path, or public URL for the main subject image (Image-to-Video mode).
negativePromptstringElements to exclude from the video.
referenceImagesarrayReference images for style matching. Choose only one image mode: main image, frames, or references. Veo supports up to 3 references and requires 8 seconds for references or an end frame.
seedintegerOptional nonnegative random seed for models that support it.
soundEffectsstringSound effects direction for Story Teller.
soundSuggestionstringBackground music or sound effects direction.
startImagestringBase64 data URI, local file path, or public URL for the first frame.
styleAmbiancestringVisual style and atmosphere for Story Teller.

generate_logo_video

Generates 3D logo reveal and motion graphic video intros. Asynchronous: returns a jobId. You MUST use check_video_job_status with the jobId to poll for completion.

ParameterTypeDescription
aspectRatio *stringRequired aspect ratio supported by the selected model (e.g., 9:16 or 16:9).
model *stringModel slug (e.g., 'google/veo-3.1-fast', 'google/veo-3.1').
prompt *stringRequired video description or creative prompt (10-5000 characters).
resolution *stringRequired resolution supported by the selected model (480p, 720p, 768p, or 1080p).
timeDuration *stringRequired duration in seconds supported by the selected model. Veo supports 4, 6, or 8; use 8 for 1080p, references, or an end frame.
ambientNoisestringAmbient sound description.
cameraMotionstringCamera motion instructions (e.g., 'orbit right', 'slow push-in').
charactersarrayOptional named characters for consistent storytelling.
dialoguestringOptional voiceover or dialogue script (up to 200 characters).
endImagestringBase64 data URI, local file path, or public URL for the last frame.
generateAudiobooleanWhether to generate synchronized audio. Default is false.
guidanceScalenumberOptional guidance strength for models that support it.
languagestringVoiceover language.
mainImagestringBase64 data URI, local file path, or public URL for the main subject image (Image-to-Video mode).
negativePromptstringElements to exclude from the video.
referenceImagesarrayReference images for style matching. Choose only one image mode: main image, frames, or references. Veo supports up to 3 references and requires 8 seconds for references or an end frame.
seedintegerOptional nonnegative random seed for models that support it.
soundEffectsstringSound effects direction for Story Teller.
soundSuggestionstringBackground music or sound effects direction.
startImagestringBase64 data URI, local file path, or public URL for the first frame.
styleAmbiancestringVisual style and atmosphere for Story Teller.

generate_story_video

Generates cinematic story videos with character descriptions, reference images, sound effects, and atmosphere. Asynchronous: returns a jobId; poll check_video_job_status until completed, failed, or cancelled.

ParameterTypeDescription
aspectRatio *stringRequired aspect ratio supported by the selected model (e.g., 9:16 or 16:9).
model *stringModel slug (e.g., 'google/veo-3.1-fast', 'google/veo-3.1').
prompt *stringRequired video description or creative prompt (10-5000 characters).
resolution *stringRequired resolution supported by the selected model (480p, 720p, 768p, or 1080p).
timeDuration *stringRequired duration in seconds supported by the selected model. Veo supports 4, 6, or 8; use 8 for 1080p, references, or an end frame.
ambientNoisestringAmbient sound description.
cameraMotionstringCamera motion instructions (e.g., 'orbit right', 'slow push-in').
charactersarrayOptional named characters for consistent storytelling.
dialoguestringOptional voiceover or dialogue script (up to 200 characters).
endImagestringBase64 data URI, local file path, or public URL for the last frame.
generateAudiobooleanWhether to generate synchronized audio. Default is false.
guidanceScalenumberOptional guidance strength for models that support it.
languagestringVoiceover language.
mainImagestringBase64 data URI, local file path, or public URL for the main subject image (Image-to-Video mode).
negativePromptstringElements to exclude from the video.
referenceImagesarrayReference images for style matching. Choose only one image mode: main image, frames, or references. Veo supports up to 3 references and requires 8 seconds for references or an end frame.
seedintegerOptional nonnegative random seed for models that support it.
soundEffectsstringSound effects direction for Story Teller.
soundSuggestionstringBackground music or sound effects direction.
startImagestringBase64 data URI, local file path, or public URL for the first frame.
styleAmbiancestringVisual style and atmosphere for Story Teller.

generate_talking_avatar

Animates a portrait with HeyGen Avatar IV lip sync from a script and HeyGen voice ID. Asynchronous: returns a jobId; poll check_video_job_status until completed, failed, or cancelled. Credits are calculated by the server from the script budget and resolution.

ParameterTypeDescription
image *stringPNG, JPEG, or WebP portrait as a base64 data URI or local file path. Public URLs are not accepted.
script *stringSpoken script. Must fit the selected duration budget and speech speed.
voiceId *stringHeyGen voice ID for the narration.
aspectRatiostringOutput aspect ratio.
backgroundColorstringSolid background color when backgroundMode is color.
backgroundModestringPreserve the portrait background or use a solid color.
captionsbooleanWhether to add captions.
expressivenessstringOptional expression intensity override.
motionPromptstringOptional motion instructions overriding the preset.
performancePresetstringAvatar performance style.
resolutionstringOutput resolution.
speechModestringSpeech source; currently only text is supported.
speednumberSpeech speed multiplier.
targetDurationintegerMaximum script duration budget in seconds.
titlestringOptional video title.

generate_talking_avatar_audio

Animates a portrait with HeyGen Avatar 6 Turbo lip sync driven by your own speech audio file (MP3, WAV, M4A, AAC, OGG, or WebM; 2–120s, max 12 MB). Local file paths are recommended. Asynchronous: returns a jobId; poll check_video_job_status until completed, failed, or cancelled. Server bills by audio duration and resolution (1080p: 20 credits/s; 2K: 35 credits/s).

ParameterTypeDescription
audio *stringMP3, WAV, M4A, AAC, OGG, or WebM speech audio as a base64 data URI or local file path (max 12 MB). Public URLs are not accepted.
audioSeconds *numberDuration of the supplied speech audio in seconds (2–120). The server enforces a size-based floor.
image *stringPNG, JPEG, or WebP portrait as a base64 data URI or local file path. Public URLs are not accepted.
motionExpressivenessnumberOptional body/face motion expressiveness scale (0–1).
motionPromptstringOptional motion or performance direction.
resolutionstringOutput resolution ('1080p' or '2K').

check_video_job_status

Checks the real-time status of an asynchronous video generation job. Call this repeatedly (every 10-30 seconds) until the job status is 'completed', 'failed', or 'cancelled'.

ParameterTypeDescription
jobId *stringThe ID of the video job to track.