mcp-server
v0.9.0Official 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.
| Parameter | Type | Description |
|---|---|---|
brandBrief | string | Brand name, audience, voice, offer, facts, and call to action for this post. |
caption | string | Post text. Instagram caption plus hashtags must fit 2200 characters. |
hashtags | array | Relevant hashtags; duplicates already in the caption are omitted during publication. |
isAiGenerated | boolean | Disclose AI-generated or AI-edited Facebook Reel (default false). |
mediaLayout | string | Apply the same canvas to all slides; fit preserves the full image with white padding, crop fills the canvas. |
mediaUrls | array | Images only. Instagram supports one image or a carousel of 2–10 images; Facebook accepts up to 10. |
platform | string | Target platform; defaults to Instagram. |
shareToFeed | boolean | Also share Instagram Reel to feed (default true). |
videoUrl | string | One 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.
| Parameter | Type | Description |
|---|---|---|
offset | integer | Number 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.
| Parameter | Type | Description |
|---|---|---|
brandBrief | string | Brand name, audience, voice, offer, facts, and call to action for this post. |
caption | string | Post text. Instagram caption plus hashtags must fit 2200 characters. |
hashtags | array | Relevant hashtags; duplicates already in the caption are omitted during publication. |
id | string | Exact draft, media UUID or post ID returned by a social tool. |
isAiGenerated | boolean | Disclose AI-generated or AI-edited Facebook Reel (default false). |
mediaLayout | string | Apply the same canvas to all slides; fit preserves the full image with white padding, crop fills the canvas. |
mediaUrls | array | Images only. Instagram supports one image or a carousel of 2–10 images; Facebook accepts up to 10. |
platforms | array | Optional target accounts; drafts may have no accounts yet. |
scheduledFor | string | null | Optional proposed date with explicit offset; saving does not schedule. |
shareToFeed | boolean | Also share Instagram Reel to feed (default true). |
socialContentId | string | Optional media library content ID. |
videoUrl | string | One 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.
| Parameter | Type | Description |
|---|---|---|
id * | string | Exact 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.
| Parameter | Type | Description |
|---|---|---|
accountId | string | Raw platform account ID; requires platform. |
groupBy | string | |
limit | integer | |
offset | integer | |
platform | string | |
search | string | |
status | string | |
type | string |
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.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Images per page (default 24). |
page | integer | Gallery 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.
| Parameter | Type | Description |
|---|---|---|
bytes | integer | Exact local file size in bytes, required with upload=true; the upload signature binds this size. |
upload | boolean | Start direct storage upload instead of importing a URL. |
url | string | Public 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.
| Parameter | Type | Description |
|---|---|---|
id * | string | ID returned by prepare_social_video upload=true. |
get_social_video
Read ready, validated video metadata for your account. Does not publish.
| Parameter | Type | Description |
|---|---|---|
id * | string | Owned 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.
| Parameter | Type | Description |
|---|---|---|
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.
| Parameter | Type | Description |
|---|---|---|
id * | string | Media 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.
| Parameter | Type | Description |
|---|---|---|
content * | object | Final post caption, hashtags, brand brief, and images. |
draftId * | string | Optional saved draft ID. Scheduling consumes it atomically; repeating this request returns the same scheduled post. |
platforms * | array | Connected accounts to publish to; select each account once. |
scheduledFor * | string | Future ISO 8601 timestamp with explicit UTC offset, e.g. 2026-10-10T09:00:00+05:30. Resolve the user’s timezone before scheduling. |
socialContentId | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
accountIds * | One or up to 20 distinct IDs from list_social_accounts: facebook:<Meta Page ID> or instagram:<Meta account ID>. | |
idempotencyKey * | string | Caller-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 * | string | Future ISO 8601 timestamp with explicit UTC offset, e.g. 2026-10-10T09:00:00+05:30. Resolve the user’s timezone before scheduling. |
caption | string | Post text. Instagram caption plus hashtags must fit 2200 characters. |
hashtags | array | Relevant hashtags; duplicates already in the caption are omitted during publication. |
images | array | Image inputs; Instagram requires 1–10 images (single image or carousel). Use reusable mediaId for large images. |
isAiGenerated | boolean | Disclose AI-generated or AI-edited Facebook Reel (default false). |
mediaLayout | string | Apply the same canvas to all slides; fit preserves the full image with white padding, crop fills the canvas. |
shareToFeed | boolean | Also share Instagram Reel to feed (default true). |
video | object | Single-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.
| Parameter | Type | Description |
|---|---|---|
fromDate | string | Inclusive start timestamp with offset. |
limit | integer | Page size, default 20. |
offset | integer | Number of posts to skip. |
platform | string | Platform filter. |
status | string | Post status filter. |
toDate | string | Inclusive 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.
| Parameter | Type | Description |
|---|---|---|
id * | string | Exact 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.
| Parameter | Type | Description |
|---|---|---|
id * | string | Exact draft, media UUID or post ID returned by a social tool. |
content | object | Fields to change; omitted fields retain their existing values. |
platforms | array | Connected accounts to publish to; select each account once. |
scheduledFor | string | Future 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.
| Parameter | Type | Description |
|---|---|---|
id * | string | Exact 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.
| Parameter | Type | Description |
|---|---|---|
id * | string | Exact 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.
| Parameter | Type | Description |
|---|---|---|
accountIds * | One or up to 20 distinct IDs from list_social_accounts: facebook:<Meta Page ID> or instagram:<Meta account ID>. | |
idempotencyKey * | string | Caller-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. |
caption | string | Post text. Instagram caption plus hashtags must fit 2200 characters. |
hashtags | array | Relevant hashtags; duplicates already in the caption are omitted during publication. |
images | array | Image inputs; Instagram requires 1–10 images (single image or carousel). Use reusable mediaId for large images. |
isAiGenerated | boolean | Disclose AI-generated or AI-edited Facebook Reel (default false). |
mediaLayout | string | Apply the same canvas to all slides; fit preserves the full image with white padding, crop fills the canvas. |
shareToFeed | boolean | Also share Instagram Reel to feed (default true). |
video | object | Single-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.
| Parameter | Type | Description |
|---|---|---|
accountId | string | Optional connected account filter. |
platform | string | Optional platform filter. |
range | string | Reporting 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.
| Parameter | Type | Description |
|---|---|---|
refresh | boolean | Set 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).
| Parameter | Type | Description |
|---|---|---|
adAccountId * | string | Meta Ad Account ID (e.g., act_123456). |
datePreset | string | Reporting 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.
| Parameter | Type | Description |
|---|---|---|
adAccountId * | string | Meta Ad Account ID. |
campaignName * | string | Campaign name. |
dailyBudget * | number | Daily budget in major account currency units (e.g. 25 for $25/day). |
goal * | string | Simplified business goal. |
idempotencyKey * | string | Caller-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 * | string | Facebook Page ID. |
ageMax | integer | |
ageMin | integer | |
audiencePreset | string | Simplified audience preset. |
callToAction | string | Call-to-action button. |
countries | array | 2-letter ISO country codes (default ["US"]). |
description | string | Optional link description. |
destinationUrl | string | Landing page HTTPS URL (required for mode=new). |
existingPostId | string | Existing Facebook object_story_id (pageId_postId) when mode=boost_post. |
gender | string | |
headline | string | Optional ad headline. |
imageUrl | string | Public HTTPS image URL for mode=new. |
instagramAccountId | string | Optional Instagram professional account ID. |
mode | string | Create a new ad or boost an existing Page post. |
primaryText | string | Ad primary copy (required for mode=new). |
startStatus | string | Initial 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.
| Parameter | Type | Description |
|---|---|---|
adAccountId * | string | Owning Meta Ad Account ID. |
id * | string | Numeric Meta campaign, ad set, or ad ID. |
dailyBudget | number | Updated daily budget in major account currency units. |
entityType | string | Target entity type (default campaign). |
name | string | Updated entity name. |
status | string | New 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.
| Parameter | Type | Description |
|---|---|---|
adAccountId * | string | Meta Ad Account ID. |
datePreset | string | Analysis 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.
| Parameter | Type | Description |
|---|---|---|
operation * | string | Action to perform on guardrail rules. |
action | string | Guardrail action (default notify). |
adAccountId | string | Meta Ad Account ID (required for create; optional filter for list). |
campaignId | string | Optional campaign ID scope for create. |
campaignName | string | |
id | string | Guardrail rule ID (required for delete). |
metric | string | Metric to watch (required for create). |
name | string | Rule name (required for create). |
operator | string | Trigger comparison (required for create). |
threshold | number | Threshold 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.
| Parameter | Type | Description |
|---|---|---|
scenePrompt * | string | Poster scene, background, and visual style. |
address | string | Business address. |
aspectRatio | string | Aspect ratio supported by the selected model. |
brandName | string | Jewelry business name. |
date | string | Date to display on the poster. |
footerText | string | Optional footer or disclaimer. |
goldRate14k | string | 14K gold rate text, including currency and units. |
goldRate18k | string | 18K gold rate text, including currency and units. |
goldRate22k | string | 22K gold rate text, including currency and units. |
goldRate24k | string | 24K gold rate text, including currency and units. |
logoImage | string | Optional brand logo URL, data URI, or local file path. |
model | string | Image model slug; use list_image_models to discover models. |
phoneNumber | string | Business contact number. |
productImage | string | Optional jewelry image URL, data URI, or local file path. |
resolution | string | Resolution supported by the selected model (1K, 2K, or 4K). |
silverRate | string | Silver rate text, including currency and units. |
tagLine | string | Optional 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).
| Parameter | Type | Description |
|---|---|---|
productImages * | array | Array of product images. Each item can have 'url', 'dataUrl', or local 'path'. At least one required. |
scenePrompt * | string | A detailed description of the background scene, surface, and environment for the product photo. |
aspectRatio | string | Output aspect ratio ('1:1', '16:9', '9:16', '4:5'). Default is '1:1'. |
background | string | Optional model-specific background setting ('auto', 'transparent', 'opaque'). |
logoImage | string | Optional URL, data URI, or local file path of a brand logo to place on the image. |
logoPlacement | string | Where to place the logo (e.g., 'top-left', 'bottom-right'). |
logoSize | number | Scale of the logo overlay (0.05 to 0.5). Default is 0.15. |
marketingText | string | Optional marketing text or slogan to overlay. |
model | string | The AI model slug (e.g., 'pro', 'standard', 'flash'). Default is 'pro'. |
overlayText | string | Optional text to overlay on the image. |
promptId | string | Optional ID of a pre-defined background template. |
quality | string | Optional model-specific quality setting (e.g., 'high', 'xhigh', 'max'). |
referenceImage | string | Optional URL, data URI, or local file path of a style reference image. |
resolution | string | Output resolution ('1K', '2K', '4K'). Default is '1K'. |
sizeMeasurement | string | Optional physical dimensions of the product (e.g., '10 cm tall') to maintain realistic scale. |
generate_logo
Generates bespoke vector-style brand logos, monograms, emblems, and modern wordmarks with character-perfect typography, color palettes, and reference image guidance. Default model is Flash. Returns the generated logo directly for inline display (synchronous).
| Parameter | Type | Description |
|---|---|---|
companyName * | string | The company or brand name to feature in the logo. |
stylePrompt * | string | A detailed style description for the logo (e.g., 'minimalist flat vector logo, navy blue and gold, clean tech aesthetic'). |
aspectRatio | string | Output aspect ratio ('1:1', '16:9', '4:3'). Default is '1:1'. |
colors | string | Preferred color palette description (e.g., 'emerald green and brushed gold'). |
ideas | string | Core keywords, symbols, or concepts for the logo. |
industry | string | The industry the company operates in (e.g., 'Technology', 'Luxury Jewelry', 'Fashion'). |
model | string | Model tier to use ('flash' or 'pro'). Default is 'flash' (google/gemini-nano-banana-2.1). |
modelId | string | Full image model ID if specific model desired (e.g. google/gemini-nano-banana-2.1). |
referenceImage | string | Optional style reference image URL, data URI, or local file path. |
resolution | string | Output resolution ('1K', '2K', '4K'). Default is '1K'. |
subtitle | string | An optional subtitle or tagline. |
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).
| Parameter | Type | Description |
|---|---|---|
jewelryImages * | array | Array of jewelry product images. Each can have 'url', 'dataUrl', or local 'path'. At least one required. |
aspectRatio | string | Output aspect ratio ('1:1', '9:16', '16:9'). Default is '1:1'. |
autoSelfCorrect | boolean | Set 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… |
logoImage | string | Optional brand logo overlay. |
logoPlacement | string | Logo placement ('top-left', 'bottom-right', etc.). |
logoSize | number | Scale of the logo overlay. |
marketingText | string | Optional marketing text or slogan. |
model | string | Model tier slug ('standard', 'pro', 'flash'). Default is 'flash'. |
modelId | string | Optional full image model ID (e.g., 'google/gemini-nano-banana-2.1'). |
overlayText | string | Optional text to overlay on the image. |
personImage | string | Optional photo of a person to model the jewelry (URL, data URI, or local file path). If omitted, an elegant editorial model is generated. |
prompt | string | Creative styling directions (e.g., 'wearing black velvet evening gown, soft studio rim lighting, Parisian luxury ambiance'). |
promptId | string | Optional ID of a pre-defined jewelry try-on style preset. |
quality | string | Optional model-specific quality setting. |
referenceImage | string | Optional campaign reference image (URL, data URI, or local path) to copy lighting and mood from. |
resolution | string | Output resolution ('1K', '2K', '4K'). Default is '1K'. |
sizeMeasurement | string | Physical 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).
| Parameter | Type | Description |
|---|---|---|
apparelImages * | array | Array of clothing/apparel images. Each can have 'url', 'dataUrl', or local 'path'. At least one required. |
aspectRatio | string | Output aspect ratio ('9:16', '1:1', '16:9', '4:5'). Default is '9:16'. |
logoImage | string | Optional brand logo overlay. |
marketingText | string | Optional marketing copy. |
model | string | The model tier ('flash', 'pro', 'standard'). Default is 'flash'. |
modelImage | string | Optional photo of a person/model (URL, data URI, or local path). If omitted, a professional fashion model is generated. |
overlayText | string | Optional text overlay. |
prompt | string | Styling and scene creative direction (e.g., 'standing on Milan street, golden hour sunlight, editorial fashion magazine style'). |
referenceImage | string | Optional style reference image URL, data URI, or local path. |
resolution | string | Output 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).
| Parameter | Type | Description |
|---|---|---|
productImages * | array | Array of product images. At least one required. |
aspectRatio | string | Output aspect ratio ('1:1', '16:9', '9:16'). Default is '1:1'. |
logoImage | string | Optional brand logo overlay. |
mainImage | string | Optional base image (model portrait, empty room, or tabletop) to place the product into. |
model | string | The model tier ('flash', 'pro', 'standard'). Default is 'flash'. |
overlayText | string | Optional text overlay. |
prompt | string | Creative styling and environment directions. |
referenceImage | string | Optional style reference image. |
resolution | string | Output resolution ('1K', '2K', '4K'). Default is '1K'. |
sizeMeasurement | string | Physical 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).
| Parameter | Type | Description |
|---|---|---|
festivalPrompt * | string | Festival theme or campaign message (e.g., 'Diwali luxury jewelry promotion with warm golden diyas and floral rangoli'). |
aspectRatio | string | Output aspect ratio ('1:1', '9:16', '16:9'). Default is '1:1'. |
logoImage | string | Optional brand logo image. |
marketingText | string | Supporting promotional message or contact details. |
model | string | The model tier ('flash', 'pro', 'standard'). Default is 'flash' (Flash 2.1). |
overlayText | string | Main headline or festive greeting text (e.g., 'Happy Diwali - 20% Off'). |
productImage | string | Optional hero product image (URL, data URI, or local file path) to place centrally in the festive composition. |
resolution | string | Output 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).
| Parameter | Type | Description |
|---|---|---|
age | string | Age category or specific age (e.g., 'Young Adult', '25 years old', 'Middle-aged'). |
aspectRatio | string | Output aspect ratio ('1:1', '9:16', '4:5', '16:9'). Default is '1:1'. |
bodyHeight | string | Height description (e.g., 'Petite', 'Average', 'Tall Fashion Model'). |
bodyShape | string | Body shape (e.g., 'Hourglass', 'Athletic Rectangular', 'Pear', 'Inverted Triangle'). |
bodySize | string | Body build (e.g., 'Petite', 'Slim Athletic', 'Medium', 'Curvy', 'Plus Size'). |
country | string | Country of origin (e.g., 'India', 'Japan', 'France', 'Brazil'). |
culturalTraits | string | Ethnicity or cultural heritage (e.g., 'South Asian', 'East Asian', 'Caucasian', 'African'). |
cupSize | string | Bust proportion if female (e.g., 'Small', 'Medium', 'Full'). |
customTweakPrompt | string | Custom refinement or scene styling prompt (e.g., 'wearing an ivory cashmere turtleneck against a warm minimalist studio backdrop'). |
extraDescription | string | Extra unique physical traits (e.g., 'light freckles across nose bridge, subtle smile'). |
eyeColor | string | Eye color (e.g., 'Dark Brown', 'Hazel Green', 'Deep Blue'). |
eyeShape | string | Eye shape (e.g., 'Almond', 'Round', 'Monolid', 'Hooded'). |
faceShape | string | Face shape (e.g., 'Oval', 'Square', 'Heart', 'Round'). |
gender | string | Gender identity (e.g., 'Female', 'Male', 'Non-binary'). |
generateMultiView | boolean | Generate a 4-panel consistent character sheet in a 2x2 grid (Front, Side, 3/4, Close-up detail). Default is false. |
hairColor | string | Hair color (e.g., 'Natural Black', 'Chestnut Brown', 'Honey Blonde'). |
hairStyle | string | Hairstyle (e.g., 'Long Waves', 'Buzz Cut', 'Sleek Bob', 'Afro', 'Layered Cut'). |
hairThickness | string | Hair density (e.g., 'Thick', 'Medium', 'Fine'). |
hairType | string | Hair texture (e.g., 'Straight', 'Wavy', 'Curly', 'Coily'). |
model | string | Model tier ('flash', 'pro', 'standard'). Default is 'flash'. |
muscleDefinition | string | Muscle definition (e.g., 'Soft Natural', 'Toned Athletic', 'Defined Muscular'). |
name | string | Optional name or character identifier for the model. |
noseShape | string | Nose shape (e.g., 'Natural Straight', 'Aquiline', 'Button', 'Broad'). |
referenceImages | array | Optional array of reference face or body images (URLs, data URIs, or local file paths) to guide identity. |
resolution | string | Output resolution ('1K', '2K', '4K'). Default is '1K'. |
skinTone | string | Complexion 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).
| Parameter | Type | Description |
|---|---|---|
prompt * | string | Core video concept or thumbnail description (e.g., 'Shocked tech reviewer holding futuristic glowing AI smartphone, neon studio background'). |
aspectRatio | string | Thumbnail aspect ratio. Default is '16:9'. |
backgroundImage | string | Optional custom background image. |
logoImage | string | Optional channel/brand logo to place in corner. |
model | string | Model tier ('flash', 'pro', 'standard'). Default is 'flash' (google/gemini-nano-banana-2.1). |
modelId | string | The image model ID. |
overlayText | string | Short, punchy thumbnail headline text (e.g., 'DON\'T BUY THIS!'). |
personImage | string | Optional photo of the YouTube creator/subject (URL, data URI, or local path) to feature prominently. |
promptId | string | Optional ID or title of a pre-defined layout style template from youtubeThumbnailPrompts. |
referenceImage | string | Optional style or concept reference image (URL, data URI, or local file path). |
resolution | string | Output 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).
| Parameter | Type | Description |
|---|---|---|
photoDataUri * | string | Source portrait photo (URL, data URI, or local file path) to convert. |
aspectRatio | string | Passport aspect ratio ('1:1', '4:5', '3:4'). Default is '1:1'. |
model | string | Model tier ('flash', 'pro', 'standard'). Default is 'flash' (google/gemini-nano-banana-2.1). |
modelId | string | The image model ID. |
prompt | string | Adjustments (e.g., 'white background, formal dark navy business suit, centered frontal view'). |
promptId | string | Optional ID or title of a pre-defined style template from passportPhotoPrompts. |
referenceImage | string | Optional style reference image (URL, data URI, or local file path) to guide attire or lighting. |
resolution | string | Output 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).
| Parameter | Type | Description |
|---|---|---|
sketchImage * | string | The source sketch/drawing image (URL, data URI, or local file path). |
aspectRatio | string | Output aspect ratio ('1:1', '16:9', '9:16', '4:5'). Default is '1:1'. |
logoImage | string | Optional brand logo overlay (URL, data URI, or local file path). |
marketingText | string | Optional marketing copy overlay. |
model | string | Model tier ('flash', 'pro', 'standard'). Default is 'flash'. |
overlayText | string | Optional headline text overlay. |
prompt | string | Description of materials, textures, colors, and lighting (e.g., 'matte black carbon fiber body, polished titanium accents, studio lighting'). |
referenceImage | string | Optional style/concept reference image (URL, data URI, or local file path). |
resolution | string | Output resolution ('1K', '2K', '4K'). Default is '1K'. |
style | string | Target 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).
| Parameter | Type | Description |
|---|---|---|
prompt * | string | Enhancement instruction or desired photo transformation (e.g., 'warm dusk cinematic lighting, shallow depth of field, natural skin texture, magazine editorial portrait'). |
aspectRatio | string | Output aspect ratio ('1:1', '4:5', '9:16', '16:9'). Default is '1:1'. |
image | string | Convenience single subject photo (URL, data URI, or local file path) if only providing one image. |
images | array | Array of subject reference photos (URL, data URI, or local file path). Each item can have 'url', 'dataUrl', or local 'path'. At least one required. |
model | string | Model tier ('flash', 'pro', 'standard'). Default is 'flash' (google/gemini-nano-banana-2.1). |
modelId | string | The image model ID. |
promptId | string | Optional ID or title of a pre-defined photography scene template. |
referenceImage | string | Optional style or concept reference image (URL, data URI, or local file path). |
resolution | string | Output 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).
| Parameter | Type | Description |
|---|---|---|
prompt * | string | The creative editing or generation prompt describing desired composition, style, or changes. |
aspectRatio | string | Output aspect ratio ('1:1', '4:5', '9:16', '16:9'). Default is '1:1'. |
image | string | Convenience single reference photo (URL, data URI, or local file path) if only providing one image. |
images | array | Array of reference images (URL, data URI, or local file path). Each item can have 'url', 'dataUrl', or local 'path'. At least one required. |
model | string | Model tier ('flash', 'pro', 'standard', 'gemini-nano-banana-2.1'). Default is 'flash' (google/gemini-nano-banana-2.1). |
modelId | string | The image model ID (e.g. 'google/gemini-nano-banana-2.1', 'google/gemini-3-pro-image'). |
promptId | string | Optional ID or title of a pre-defined style template (e.g., 'action-figure', 'funko-pop', 'studio-ghibli', '16bit-game-character'). |
referenceImage | string | Optional style or concept reference image (URL, data URI, or local file path). |
resolution | string | Output 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).
| Parameter | Type | Description |
|---|---|---|
prompt * | string | Description of the desired blog hero image, article concept, or editorial illustration. |
aspectRatio | string | Output aspect ratio ('16:9', '1:1', '4:3', '3:4', '9:16', '4:5'). Default is '16:9'. |
model | string | Model tier ('flash', 'pro', 'standard'). Default is 'flash' (google/gemini-nano-banana-2.1). |
modelId | string | The image model ID. |
overlayText | string | Optional short text, title, or headline to overlay legibly on the image. |
promptId | string | Optional ID or title of a pre-defined style template from blogImagePrompts (e.g., 'neon-cyber-circuit', 'balancing-stones'). |
referenceImage | string | Optional style or aesthetic reference image (URL, data URI, or local file path). |
resolution | string | Output 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).
| Parameter | Type | Description |
|---|---|---|
photoDataUri * | string | The baby photo (URL, data URI, or local file path) to isolate and preserve as the main subject. |
aspectRatio | string | Output aspect ratio ('1:1', '4:5', '3:4', '16:9', '9:16'). Default is '1:1'. |
customPrompt | string | Creative theme or environment instructions (e.g., 'Enchanted woodland forest with soft morning sunbeams and wildflowers'). |
milestoneUnit | string | Unit for milestone ('month' or 'year'). |
milestoneValue | number | Milestone number (e.g., 1, 3, 6, 12). |
model | string | Model tier ('flash', 'pro', 'standard'). Default is 'flash' (google/gemini-nano-banana-2.1). |
modelId | string | The image model ID. |
promptId | string | Optional ID or title of a pre-defined style preset from babyMilestonePrompts. |
referenceImage | string | Optional environmental style reference image (URL, data URI, or local file path). |
resolution | string | Output 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.
| Parameter | Type | Description |
|---|---|---|
imageDataUri * | string | The 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).
| Parameter | Type | Description |
|---|---|---|
type * | string | The type of QR code to generate. |
value * | string | The text, URL, or data payload to encode. |
bgColor | string | Background color as hex (e.g., '#FFFFFF'). Default is white. |
fgColor | string | Foreground color as hex (e.g., '#000000'). Default is black. |
level | string | Error correction level. Default is 'L'. |
size | number | QR 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).
| Parameter | Type | Description |
|---|---|---|
text * | string | The 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.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Maximum 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.
| Parameter | Type | Description |
|---|---|---|
aspectRatio | string | Supported output aspect ratio, such as 1:1 or 4:5. Defaults to 1:1. |
background | string | Optional model-specific background setting, as used for generation. |
generationCount | integer | Number of separate photo requests using these same settings. |
hasLogo | boolean | Whether each request includes a logo image. |
hasStyleReference | boolean | Whether each request includes a separate style reference image. |
model | string | Optional image model slug or ID from list_image_models. |
productImageCount | integer | Product images sent in each generation request. Must fit the model’s input limit together with any logo and style reference. |
quality | string | Optional model-specific quality setting, as used for generation. |
resolution | string | Output 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.
| Parameter | Type | Description |
|---|---|---|
aspectRatio * | string | Required aspect ratio supported by the selected model (e.g., 9:16 or 16:9). |
model * | string | Model slug (e.g., 'google/veo-3.1-fast', 'google/veo-3.1'). |
prompt * | string | Required video description or creative prompt (10-5000 characters). |
resolution * | string | Required resolution supported by the selected model (480p, 720p, 768p, or 1080p). |
timeDuration * | string | Required duration in seconds supported by the selected model. Veo supports 4, 6, or 8; use 8 for 1080p, references, or an end frame. |
ambientNoise | string | Ambient sound description. |
cameraMotion | string | Camera motion instructions (e.g., 'orbit right', 'slow push-in'). |
characters | array | Optional named characters for consistent storytelling. |
dialogue | string | Optional voiceover or dialogue script (up to 200 characters). |
endImage | string | Base64 data URI, local file path, or public URL for the last frame. |
generateAudio | boolean | Whether to generate synchronized audio. Default is false. |
guidanceScale | number | Optional guidance strength for models that support it. |
language | string | Voiceover language. |
mainImage | string | Base64 data URI, local file path, or public URL for the main subject image (Image-to-Video mode). |
negativePrompt | string | Elements to exclude from the video. |
referenceImages | array | Reference 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. |
seed | integer | Optional nonnegative random seed for models that support it. |
soundEffects | string | Sound effects direction for Story Teller. |
soundSuggestion | string | Background music or sound effects direction. |
startImage | string | Base64 data URI, local file path, or public URL for the first frame. |
styleAmbiance | string | Visual 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.
| Parameter | Type | Description |
|---|---|---|
aspectRatio * | string | Required aspect ratio supported by the selected model (e.g., 9:16 or 16:9). |
model * | string | Model slug (e.g., 'google/veo-3.1-fast', 'google/veo-3.1'). |
prompt * | string | Required video description or creative prompt (10-5000 characters). |
resolution * | string | Required resolution supported by the selected model (480p, 720p, 768p, or 1080p). |
timeDuration * | string | Required duration in seconds supported by the selected model. Veo supports 4, 6, or 8; use 8 for 1080p, references, or an end frame. |
ambientNoise | string | Ambient sound description. |
cameraMotion | string | Camera motion instructions (e.g., 'orbit right', 'slow push-in'). |
characters | array | Optional named characters for consistent storytelling. |
dialogue | string | Optional voiceover or dialogue script (up to 200 characters). |
endImage | string | Base64 data URI, local file path, or public URL for the last frame. |
generateAudio | boolean | Whether to generate synchronized audio. Default is false. |
guidanceScale | number | Optional guidance strength for models that support it. |
language | string | Voiceover language. |
mainImage | string | Base64 data URI, local file path, or public URL for the main subject image (Image-to-Video mode). |
negativePrompt | string | Elements to exclude from the video. |
referenceImages | array | Reference 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. |
seed | integer | Optional nonnegative random seed for models that support it. |
soundEffects | string | Sound effects direction for Story Teller. |
soundSuggestion | string | Background music or sound effects direction. |
startImage | string | Base64 data URI, local file path, or public URL for the first frame. |
styleAmbiance | string | Visual 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.
| Parameter | Type | Description |
|---|---|---|
aspectRatio * | string | Required aspect ratio supported by the selected model (e.g., 9:16 or 16:9). |
model * | string | Model slug (e.g., 'google/veo-3.1-fast', 'google/veo-3.1'). |
prompt * | string | Required video description or creative prompt (10-5000 characters). |
resolution * | string | Required resolution supported by the selected model (480p, 720p, 768p, or 1080p). |
timeDuration * | string | Required duration in seconds supported by the selected model. Veo supports 4, 6, or 8; use 8 for 1080p, references, or an end frame. |
ambientNoise | string | Ambient sound description. |
cameraMotion | string | Camera motion instructions (e.g., 'orbit right', 'slow push-in'). |
characters | array | Optional named characters for consistent storytelling. |
dialogue | string | Optional voiceover or dialogue script (up to 200 characters). |
endImage | string | Base64 data URI, local file path, or public URL for the last frame. |
generateAudio | boolean | Whether to generate synchronized audio. Default is false. |
guidanceScale | number | Optional guidance strength for models that support it. |
language | string | Voiceover language. |
mainImage | string | Base64 data URI, local file path, or public URL for the main subject image (Image-to-Video mode). |
negativePrompt | string | Elements to exclude from the video. |
referenceImages | array | Reference 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. |
seed | integer | Optional nonnegative random seed for models that support it. |
soundEffects | string | Sound effects direction for Story Teller. |
soundSuggestion | string | Background music or sound effects direction. |
startImage | string | Base64 data URI, local file path, or public URL for the first frame. |
styleAmbiance | string | Visual 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.
| Parameter | Type | Description |
|---|---|---|
aspectRatio * | string | Required aspect ratio supported by the selected model (e.g., 9:16 or 16:9). |
model * | string | Model slug (e.g., 'google/veo-3.1-fast', 'google/veo-3.1'). |
prompt * | string | Required video description or creative prompt (10-5000 characters). |
resolution * | string | Required resolution supported by the selected model (480p, 720p, 768p, or 1080p). |
timeDuration * | string | Required duration in seconds supported by the selected model. Veo supports 4, 6, or 8; use 8 for 1080p, references, or an end frame. |
ambientNoise | string | Ambient sound description. |
cameraMotion | string | Camera motion instructions (e.g., 'orbit right', 'slow push-in'). |
characters | array | Optional named characters for consistent storytelling. |
dialogue | string | Optional voiceover or dialogue script (up to 200 characters). |
endImage | string | Base64 data URI, local file path, or public URL for the last frame. |
generateAudio | boolean | Whether to generate synchronized audio. Default is false. |
guidanceScale | number | Optional guidance strength for models that support it. |
language | string | Voiceover language. |
mainImage | string | Base64 data URI, local file path, or public URL for the main subject image (Image-to-Video mode). |
negativePrompt | string | Elements to exclude from the video. |
referenceImages | array | Reference 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. |
seed | integer | Optional nonnegative random seed for models that support it. |
soundEffects | string | Sound effects direction for Story Teller. |
soundSuggestion | string | Background music or sound effects direction. |
startImage | string | Base64 data URI, local file path, or public URL for the first frame. |
styleAmbiance | string | Visual 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.
| Parameter | Type | Description |
|---|---|---|
aspectRatio * | string | Required aspect ratio supported by the selected model (e.g., 9:16 or 16:9). |
model * | string | Model slug (e.g., 'google/veo-3.1-fast', 'google/veo-3.1'). |
prompt * | string | Required video description or creative prompt (10-5000 characters). |
resolution * | string | Required resolution supported by the selected model (480p, 720p, 768p, or 1080p). |
timeDuration * | string | Required duration in seconds supported by the selected model. Veo supports 4, 6, or 8; use 8 for 1080p, references, or an end frame. |
ambientNoise | string | Ambient sound description. |
cameraMotion | string | Camera motion instructions (e.g., 'orbit right', 'slow push-in'). |
characters | array | Optional named characters for consistent storytelling. |
dialogue | string | Optional voiceover or dialogue script (up to 200 characters). |
endImage | string | Base64 data URI, local file path, or public URL for the last frame. |
generateAudio | boolean | Whether to generate synchronized audio. Default is false. |
guidanceScale | number | Optional guidance strength for models that support it. |
language | string | Voiceover language. |
mainImage | string | Base64 data URI, local file path, or public URL for the main subject image (Image-to-Video mode). |
negativePrompt | string | Elements to exclude from the video. |
referenceImages | array | Reference 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. |
seed | integer | Optional nonnegative random seed for models that support it. |
soundEffects | string | Sound effects direction for Story Teller. |
soundSuggestion | string | Background music or sound effects direction. |
startImage | string | Base64 data URI, local file path, or public URL for the first frame. |
styleAmbiance | string | Visual 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.
| Parameter | Type | Description |
|---|---|---|
aspectRatio * | string | Required aspect ratio supported by the selected model (e.g., 9:16 or 16:9). |
model * | string | Model slug (e.g., 'google/veo-3.1-fast', 'google/veo-3.1'). |
prompt * | string | Required video description or creative prompt (10-5000 characters). |
resolution * | string | Required resolution supported by the selected model (480p, 720p, 768p, or 1080p). |
timeDuration * | string | Required duration in seconds supported by the selected model. Veo supports 4, 6, or 8; use 8 for 1080p, references, or an end frame. |
ambientNoise | string | Ambient sound description. |
cameraMotion | string | Camera motion instructions (e.g., 'orbit right', 'slow push-in'). |
characters | array | Optional named characters for consistent storytelling. |
dialogue | string | Optional voiceover or dialogue script (up to 200 characters). |
endImage | string | Base64 data URI, local file path, or public URL for the last frame. |
generateAudio | boolean | Whether to generate synchronized audio. Default is false. |
guidanceScale | number | Optional guidance strength for models that support it. |
language | string | Voiceover language. |
mainImage | string | Base64 data URI, local file path, or public URL for the main subject image (Image-to-Video mode). |
negativePrompt | string | Elements to exclude from the video. |
referenceImages | array | Reference 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. |
seed | integer | Optional nonnegative random seed for models that support it. |
soundEffects | string | Sound effects direction for Story Teller. |
soundSuggestion | string | Background music or sound effects direction. |
startImage | string | Base64 data URI, local file path, or public URL for the first frame. |
styleAmbiance | string | Visual 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.
| Parameter | Type | Description |
|---|---|---|
image * | string | PNG, JPEG, or WebP portrait as a base64 data URI or local file path. Public URLs are not accepted. |
script * | string | Spoken script. Must fit the selected duration budget and speech speed. |
voiceId * | string | HeyGen voice ID for the narration. |
aspectRatio | string | Output aspect ratio. |
backgroundColor | string | Solid background color when backgroundMode is color. |
backgroundMode | string | Preserve the portrait background or use a solid color. |
captions | boolean | Whether to add captions. |
expressiveness | string | Optional expression intensity override. |
motionPrompt | string | Optional motion instructions overriding the preset. |
performancePreset | string | Avatar performance style. |
resolution | string | Output resolution. |
speechMode | string | Speech source; currently only text is supported. |
speed | number | Speech speed multiplier. |
targetDuration | integer | Maximum script duration budget in seconds. |
title | string | Optional 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).
| Parameter | Type | Description |
|---|---|---|
audio * | string | MP3, 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 * | number | Duration of the supplied speech audio in seconds (2–120). The server enforces a size-based floor. |
image * | string | PNG, JPEG, or WebP portrait as a base64 data URI or local file path. Public URLs are not accepted. |
motionExpressiveness | number | Optional body/face motion expressiveness scale (0–1). |
motionPrompt | string | Optional motion or performance direction. |
resolution | string | Output 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'.
| Parameter | Type | Description |
|---|---|---|
jobId * | string | The ID of the video job to track. |