Blog

Guide

Using mureka-9.5/instrumental for E-commerce Product Images via the HiAPI API

Build a repeatable BGM-to-product-video pipeline with the HiAPI audio API

Nov 18, 2026 12 min read
Flat cover art of pale mauve and ink black color fields split by a thin violet seam, marking this guide's cover image.
On this page
Instrumental BGM generated with mureka-9.5/instrumental on HiAPI and muxed into a 30-second e-commerce product video.

Why product visuals need a dedicated BGM layer

Most e-commerce catalogs are assembled from two separate production lines: a visual line that ships product stills and short clips, and an audio line that is handled ad hoc, usually at the last minute. The result is predictable — the same three stock tracks across dozens of SKUs, inconsistent loudness between clips, and a licensing question nobody wants to answer during a campaign review.

Treating background music as its own layer fixes this. Instead of bolting audio onto finished videos, you generate a track per product category, store it as a reusable asset, and mux it in at render time. That separation has practical consequences:

  • Reusability. One track can serve every SKU in a category, so a hundred product clips do not require a hundred audio generations.
  • Consistency. A fixed track means fixed loudness and fixed loop points, which makes a grid of product videos feel like one brand rather than a playlist.
  • Replaceability. When a visual changes, you re-mux rather than re-generate audio. When the audio changes, the visuals stay untouched.
  • Clear provenance. A generated instrumental track has no third-party sample clearance problem, and you can regenerate it if a storefront needs a variant.

This is where a generative instrumental endpoint earns its place in the pipeline. Instrumental-only output means no vocals competing with on-screen text or a voice-over, and a text prompt means the mood can be described in the same vocabulary your brand guidelines already use — calm, minimal, energetic, clinical.

The rest of this guide builds that layer: generate a track with mureka-9.5/instrumental through HiAPI, then mux it into short product videos in a way you can run as a batch job rather than a per-clip art project.

What mureka-9.5/instrumental gives you

Functionally, mureka-9.5/instrumental is a text-to-music model that returns an instrumental track. There is no vocal stem to remove and no lyric input to manage — you describe the music you want, and you get audio back.

Called through HiAPI, that means the model fits the same integration pattern as the rest of the platform: one credential, one endpoint family, and a response you store and reuse. You are not wiring a separate account or a separate billing relationship for audio; the generated track is just another asset your pipeline produces alongside images and video.

A few properties matter for the e-commerce use case specifically:

  • Instrumental output. Product videos are usually short, silent-browsing contexts. A track without vocals keeps attention on the product and does not fight captions.
  • Prompt-driven mood. Category-level mood (for example, warm and acoustic for home goods, crisp and percussive for electronics) can be captured as a reusable prompt rather than a manual track selection.
  • Asset-shaped output. The result is an audio asset you can store, name, version, and reuse — the same lifecycle as an image render.

The model page at mureka-9.5/instrumental is the authoritative place to check the current request fields, supported options, and response shape before you write client code. This guide stays at the pipeline level deliberately: field names and available options evolve, and your integration should be built against the documented contract rather than against assumptions copied from a blog post.

One scoping note: instrumental BGM is one layer, not the whole audio track. If a product video needs a spoken voice-over or a set of sound effects, those are separate concerns that you compose on top of the music bed, not something you ask this endpoint to produce.

Designing the prompt and track spec per product category

The most common failure mode in generative audio is an unstructured prompt that produces something technically valid and brand-wrong. Fix this before you touch the API, by defining a small number of category profiles.

Build category profiles, not per-SKU prompts

Group your catalog into a manageable set of audio categories — typically five to fifteen for a mid-sized store. For each category, write down the mood, instrumentation hints, tempo range, and what to avoid. A profile is a document your whole team can review, and it maps one-to-one onto a prompt template:

Instrumental background bed for {category} product videos.
Mood: {mood}. Instrumentation: {instruments}.
Tempo: {tempo_range}. Keep the arrangement steady and loop-friendly.
No vocals. No sudden dynamic drops.

Specify for the edit, not just the mood

The prompt should encode how the track will be used. Two details pay off later:

  • Steady energy. Product clips are short; a track that spends its first ten seconds building will leave your clip with almost no music. Ask for a consistent arrangement.
  • Loop-friendliness. If you expect to loop the track to fill longer clips, ask for a stable, repeating feel with no hard tonal shifts. It is far easier to loop a track designed for it than to crossfade an arbitrary one.

Decide the track length up front

Track duration is a spec decision, not an afterthought. Two strategies work:

  1. Match the nominal clip length and trim slightly. Good when all clips in a category share a duration.
  2. Generate one longer bed per category and loop or trim per clip. Good when durations vary and you want a single reusable asset.

The second is usually cheaper in operational effort for a large catalog, but only if you designed for looping.

Write the spec down

Keep each profile in version control next to the prompt template, with the category, the template, and the intended track length. When someone asks why the kitchenware clips sound the way they do, the answer is a file, not a memory.

Making the API call through HiAPI

The call itself is the smallest part of the pipeline. Set it up so that everything around it — prompt assembly, asset naming, storage — is deterministic.

Credentials and client setup

Store your HiAPI key in an environment variable and load it in one place in your client. Do not scatter credentials across scripts.

export HIAPI_API_KEY="your_key_here"

Keep the base URL and key in a small shared module so every job — one-off test or full batch — uses the same configuration.

Assemble the request from the profile

Rather than hand-writing prompts in code, load the category profile, render the prompt template, and build the request from that. The request should carry:

  • the rendered prompt,
  • the target track characteristics your profile defines,
  • and the identifiers you need to trace the job afterward (category, profile version).

Confirm the exact request fields for mureka-9.5/instrumental on the model page before you finalize the payload, and pin your code to that documented shape.

Handle the response as an asset, not a value

A generation call returns an audio asset and an identifier. Two habits keep this manageable:

  • Persist immediately. Download to your own storage with a deterministic key such as bgm/{category}/{profile_version}/{job_id}.wav. Do not rely on a remote URL staying stable.
  • Record metadata. Store the prompt, profile version, job identifier, and returned duration alongside the file. When a track needs to be re-generated, you can reproduce the exact request.

Log failures as retryable or not

Distinguish between a transient failure (retry with backoff) and a request problem (invalid field, prompt rejected) that will fail identically on retry. A batch job that retries a malformed payload a hundred times is worse than one that fails fast and reports the profile that broke.

Muxing the track into product video

Muxing is where most perceived quality is won or lost. Audio that starts abruptly, jumps at a loop point, or sits louder than the storefront's other clips reads as sloppy even when the track itself is fine.

Match durations deliberately

Compare clip length and track length before you render:

  • Track longer than clip: trim from the end, not the beginning. Starting mid-track loses the intro and often lands in an unstable section.
  • Track shorter than clip: loop, but only across a region that was designed to loop. Use a short crossfade at the seam to avoid an audible click.
  • Roughly equal: still add a short fade-in and fade-out in the final second so the audio does not start or stop hard.

Control loudness as a pipeline setting

Loudness should be a fixed target applied to every asset, not a per-clip mix decision. Normalize the music bed to a consistent level before muxing, and duck it slightly under any voice-over so narration stays intelligible. Because you normalized the source track once, every derived clip inherits the same baseline.

Do the mux in one deterministic step

A single command that takes a clip and a track and produces the final file keeps the pipeline reproducible:

ffmpeg -i clip.mp4 -stream_loop -1 -i bgm.wav \
  -filter_complex "[0:a]anull[a0];[1:a]afade=t=in:st=0:d=0.5,afade=t=out:st=9.5:d=0.5[a1];[a0][a1]amix=inputs=2:duration=first" \
  -shortest -c:v copy -c:a aac out.mp4

Adapt the filter chain to your actual durations and whether the clip has its own audio, but keep the shape: one command, one output, parameters driven by the job spec rather than typed by hand.

Keep the source assets

Store the generated track separately from the muxed video. The video is a derived artifact; the track is the reusable one. Regenerating videos from stored tracks is fast, and regenerating tracks because you overwrote them is not.

Batching across SKUs without manual edits

Scaling from one clip to a catalog is mostly a data problem. If the per-clip steps are parameterized, the batch layer is thin.

Drive the job from a manifest

Describe the work as data — one row per output — with the SKU, clip path, category, and profile version. The runner reads the manifest, resolves the category to a track (generating one only if the cache misses), and renders the video. No step should require a human to choose a track.

Cache tracks by category and profile version

The track is the expensive, reusable part. Key your cache on category plus profile version plus any prompt-affecting options, and reuse it across every SKU in that category. When you change a profile, bump its version so old tracks are not silently reused with new visuals.

Make re-renders the normal path

Visuals change more often than audio. When a product image is updated, the desired behavior is: keep the track, re-mux the video. Structure the manifest so a changed clip resets only the video artifact, and the track cache stays warm. Re-renders should be cheap, boring, and safe to run in bulk.

Fail loudly per item, not per batch

A batch runner should process every row it can and report failures with the SKU, profile version, and reason. One bad clip should not abort a thousand-row job, and a summary at the end tells you which profiles or inputs need attention.

Keep the runner idempotent

Deterministic output keys mean re-running a batch overwrites the same artifacts rather than creating duplicates. That property turns the runner into something you can safely schedule — a nightly pass over new SKUs, for example — without hand-holding.

Quality checks before publishing

Before assets go live, run a short, fixed checklist. Automate what you can and make the rest a review step with a clear owner.

Automated checks

  • Duration match. The muxed video's audio length equals the clip length within a small tolerance.
  • Loudness consistency. Sample the audio level across the batch and flag outliers — a single track normalized differently stands out in a grid.
  • Loop seams. For looped tracks, inspect the seam region; a click or level jump should fail the check.
  • Fade presence. Confirm the fade-in and fade-out actually applied.
  • File integrity. Validate that each output decodes and that the codec matches your storefront's expectations.

Human checks

  • Brand fit. Listen to one representative clip per category. Generation is nondeterministic; a profile that usually works can occasionally produce an off-brand track. Regenerate and update the cache for that category.
  • Text legibility. Confirm the music does not mask on-screen copy or voice-over, especially on mobile speakers.
  • Start and end. Watch the first and last second of a few clips — that is where abrupt audio is most obvious.

When something fails

Work outward from the artifact. If the video is wrong but the track is right, the problem is in the mux step or the manifest. If the track is wrong, check the rendered prompt and the profile version before re-calling the model. When a request itself fails or returns an unexpected shape, consult the mureka-9.5/instrumental model page for the current contract, then check your credentials and payload against it.

Run these checks as part of the batch, not as a separate audit. A pipeline that validates its own output is what makes the whole approach repeatable.

Once the profiles, the track cache, and the checks are in place, adding a new product category is a small, reviewable change rather than a new production project — which is the point of building the BGM layer separately in the first place.

Related articles

View all articles →

Start building with persistent AI artifacts

Get your API key and call image, video and audio models through one task-based API.

Read the API docs