MCP / Tools / Shot / Media / Export / media_generate

media_generate

orchestrationbetaauth: media:writeapproval: suggeststatus: v1

Generate music, speech, dialogue, sound effects, or shot-scoped scene audio.

When to use

  • Use for non-visual media generation workflows.
  • Use `workflow=scene_audio` for Seed Audio shot/scene mixes that may include dialogue, ambience, Foley, and selected voice references.
  • `phase=start` returns an async `job_id`: poll `job_get(job_id, include_result=true)` until it completes. BeatBandit stores the audio asset and settles credits automatically when the job completes, so `phase=finalize` is optional and only works on a completed job.

When not to use

  • Do not use for still images or videos.
  • Do not use to upload or attach reusable voice samples; use `asset_upload(target_type=reference_audio_asset)` and `voice_profile`.
  • Do not call `phase=start` again while a returned `job_id` is still pending or processing; poll `job_get` instead.

Examples

  • “Generate suspense music for this scene.”
  • “Generate 30 seconds of shot audio for shot 101 with Mira's selected voice reference.”

Anti-examples

  • Generate a storyboard image.
  • Attach an existing voice sample to a character profile.

Workflows

Switch behavior by setting the workflow input field.

WorkflowPhasesCalls
musicreadiness, start, finalizemedia.generate
speechreadiness, start, finalizemedia.generate
dialoguereadiness, start, finalizemedia.generate
sound_effectreadiness, start, finalizemedia.generate
scene_audioreadiness, start, finalizemedia.generate

Input schema

media_generate input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "required": [
    "workflow",
    "phase",
    "project_id"
  ],
  "properties": {
    "workflow": {
      "type": "string",
      "enum": [
        "music",
        "speech",
        "dialogue",
        "sound_effect",
        "scene_audio"
      ],
      "description": "Audio generation workflow: music, speech, dialogue, sound_effect, or shot-scoped scene_audio."
    },
    "phase": {
      "type": "string",
      "enum": [
        "readiness",
        "start",
        "finalize"
      ],
      "description": "Use readiness to discover models and constraints, start to enqueue generation, and finalize with job_id when required."
    },
    "project_id": {
      "type": "integer",
      "description": "Numeric BeatBandit project ID."
    },
    "job_id": {
      "type": "string",
      "minLength": 1,
      "description": "Required when phase=finalize."
    },
    "payload": {
      "type": "object",
      "description": "Model selection and generation parameters. Call phase=readiness first to inspect supported models and limits.",
      "properties": {
        "model_id": {
          "type": "string",
          "minLength": 1,
          "description": "Selected media model ID from readiness; required for start."
        },
        "scope_type": {
          "type": "string",
          "enum": [
            "project",
            "scene",
            "episode",
            "shot"
          ],
          "description": "Target scope type (project, scene, episode, or shot for scene_audio)."
        },
        "scope_code": {
          "type": "string",
          "minLength": 1,
          "description": "Target scene/episode/shot scope code (or full for project scope)."
        },
        "scope_card_id": {
          "type": "integer",
          "description": "Optional scope card ID."
        },
        "source_shot_card_id": {
          "type": "integer",
          "description": "Shot card ID for shot-scoped scene_audio generation."
        },
        "title": {
          "type": "string",
          "description": "Optional display title for the generated audio asset."
        },
        "prompt": {
          "type": "string",
          "description": "Audio description prompt for music, sound_effect, or scene_audio."
        },
        "text": {
          "type": "string",
          "description": "Spoken script text for speech generation."
        },
        "lyrics_prompt": {
          "type": "string",
          "description": "Lyrics text for vocal music models that support lyrics."
        },
        "dialogue_blocks": {
          "type": "array",
          "description": "Ordered speaker lines ({text, voice}) for dialogue generation.",
          "items": {
            "type": "object",
            "required": [
              "text",
              "voice"
            ],
            "properties": {
              "text": {
                "type": "string",
                "minLength": 1
              },
              "voice": {
                "type": "string",
                "minLength": 1
              }
            },
            "additionalProperties": true
          }
        },
        "duration_seconds": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "Requested clip duration in seconds within the selected model's bounds."
        },
        "instrumental": {
          "type": "boolean",
          "description": "Generate instrumental music without vocals when supported."
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Style/mood tags for music models."
        },
        "bpm": {
          "type": "string",
          "description": "Optional tempo hint for music generation."
        },
        "voice": {
          "type": "string",
          "description": "Voice identifier for speech generation."
        },
        "speed": {
          "type": "number",
          "description": "Speech playback speed multiplier."
        },
        "language": {
          "type": "string",
          "description": "Language code or label for speech/dialogue."
        },
        "loop": {
          "type": "boolean",
          "description": "Request seamless looping for sound_effect models that support it."
        },
        "prompt_influence": {
          "type": "number",
          "description": "Prompt adherence weight for supported SFX models."
        },
        "negative_prompt": {
          "type": "string",
          "description": "Elements to avoid in the generated audio."
        },
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          },
          "description": "Voice or visual references (such as reusable voice-profile audio references for scene_audio)."
        },
        "add_to_timeline": {
          "type": "boolean",
          "description": "Automatically place the completed asset on the scope timeline."
        },
        "provider_params": {
          "type": "object",
          "additionalProperties": true,
          "description": "Optional model-specific parameters from readiness."
        },
        "output_format": {
          "type": "string"
        },
        "sample_rate": {
          "type": "integer"
        },
        "volume": {
          "type": "number"
        },
        "pitch": {
          "type": "integer"
        }
      },
      "additionalProperties": true
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "phase": {
            "const": "start"
          }
        }
      },
      "then": {
        "required": [
          "payload"
        ],
        "properties": {
          "payload": {
            "required": [
              "model_id"
            ]
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "phase": {
            "const": "finalize"
          }
        }
      },
      "then": {
        "required": [
          "job_id"
        ]
      }
    }
  ],
  "additionalProperties": false
}

Output schema

media_generate output
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "resource_updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Generic updated_at value for read/propose outputs that need a round-trippable optimistic-concurrency timestamp."
    },
    "credits_charged": {
      "type": "integer",
      "minimum": 0,
      "description": "Credits charged for this capability call when credit_metered=true."
    },
    "credits_skipped_reason": {
      "type": "string",
      "description": "Present instead of credits_charged when the capability intentionally skipped billing (e.g. cache hit, no-op, failed_before_llm)."
    },
    "pipeline_state": {
      "$ref": "./_common/pipeline_state.schema.json"
    },
    "next_actions": {
      "type": "array",
      "items": {
        "$ref": "./_common/next_action.schema.json"
      }
    }
  },
  "additionalProperties": true
}
← All toolsv1 · workflow_runner