Guide
Stable Audio 3 Medium Text-to-Audio Getting Started Guide: Capability Boundaries, Pricing, and Integration Practices
On this page
What problem this model solves
If you are working on things like podcast background audio, product demo soundtracks, short-video underscoring, or game ambient sound effects, there is almost certainly a "find the asset" step in your workflow: digging through music libraries, comparing licenses, cutting and splicing. It produces no code and no business logic, but it steadily consumes people's time.
The positioning of stable-audio-3-medium/text-to-audio is very narrow and very clear: the input is text, the output is audio. It does this one thing only. No images, no video, no multimodal mixed input, and no editing capability to "take text + audio input and generate audio again." You write a description in the request and get back an audio clip; the generation process ends there.
This one-way design is actually good news for engineering. It means simple interface semantics, a short call chain, and a small failure surface: you do not need branch logic for different modalities, do not need to consider format compatibility of input files, and do not need to maintain a complex intermediate-state cache. One text in, one audio result out, and everything else belongs to your business layer.
The scenarios it fits can be roughly grouped into two categories. The first is "filling asset gaps from scratch": your product needs a batch of ambient sounds, notification tones, or transition sounds, but budget and timeline rule out custom procurement. The second is "needing variants at scale": you want tens or hundreds of subtly different samples in the same stylistic direction, which is unrealistic to do by hand, while keeping the overall listening experience within a controllable range.
Conversely, if your need is an arrangement precise down to a specific instrument on a specific beat, denoising or separating existing audio, or converting a vocal line into another timbre, this is not among your options. The test is simple: can your need be expressed as "a piece of text describing the audio you want," and do you accept that the result is generated in one shot and does not enter a later editing process? If yes, read on; if not, you should look for a solution elsewhere first.

Capability boundaries and applicable scenarios
Drawing a model's capability boundaries clearly is more useful than memorizing its feature list. For this model, the only certain facts at the documentation level are two: the capability is text-to-audio, and the output type is audio. Anything beyond these two should be treated as unknown rather than assumed to exist.
What it definitely can do:
Given a text description, generate one audio result. Text is your only control channel, so the granularity of the description directly determines how controllable the result is. Style, mood, sense of rhythm, and the general type of sound can all go into the prompt, and the model generates accordingly. What your engineering code needs to do is translate "the sound a person wants" into "a description the model can read."
What cannot be assumed to exist:
- More input than text. It does not read reference audio, does not support audio continuation, and does not accept image or video input.
- More output than a single audio clip. It does not return timeline annotations, does not return stem files, and does not return a project file you can keep editing.
- It is not an editing tool. You cannot specify "remove the drum hit at second 3," nor can you ask it to keep the previous version's result and change one detail. Every call is an independent generation.
- Parameter details are governed by the model page. The text field is
prompt(up to 5000 characters);durationcontrols length, range 1–380 seconds, default 30 seconds;output_formatsupports mp3, wav, flac, ogg, opus, m4a, aac, default mp3, andbitratedefaults to 192k and has no effect on wav or flac;num_inference_stepsdefaults to 8, andseedis used to reproduce the same result. The remaining fields are likewise governed by the parameter documentation on the model page.
Applicable scenarios therefore narrow down to a few: needing to generate ambient or functional audio in bulk; needing to quickly validate whether a sound direction is feasible; needing to offer a "describe it and get it" audio capability inside a product without building your own model. What does not fit is high-precision music production, audio post-processing, and situations with strict reproducibility requirements—generative models are inherently stochastic, and repeated calls with the same prompt may not yield exactly identical results. This must be made clear in product expectations up front.

Per-item billing: how to calculate cost
The billing basis for this model is per-item billing: each generated audio clip is charged once, and the official list price is $0.0538 per item. The keyword here is "item," not "second" and not "character."
This basis leads to a very practical corollary: cost scales linearly with the number of calls, and is independent of how long your prompt is. Expanding your prompt from one sentence to a paragraph does not change the per-item cost; generating longer audio does not change the per-item cost either, if the interface does not bill separately by duration. So when budgeting, the only quantity you need to estimate is "how many times will this be called per month."
A rough calculation goes like this: first estimate how many generations a single business process triggers. For example, one content production run needs 3 candidates and runs 40 times a day, which is 120 items per day. Multiply by 30 days to get the monthly item count. Multiply that count by the unit price per item to get an order-of-magnitude cost expectation.
Errors usually come from three places. The first is retries. Unsatisfactory results get rerun, and network jitter or rate limiting also causes duplicate calls, so the actual item count tends to exceed the theoretical count; a conservative estimate should leave some headroom. The second is candidate strategy. Generating several items in order to pick a good one is a common practice, but it multiplies the actual item count, so you need to decide at the product design stage whether it is "generate one and use it" or "generate several and then choose." The third is misunderstanding the billing basis. If the way you call causes one request to be split into multiple charges, or conversely several items to be merged, your statistics will not match expectations; confirm this by checking the billing details.
One more reminder: unit prices change, and this article only discusses the conversion method. For the actual real-time price, refer to the pricing panel on the site. Hardcoding the unit price in code for budget decisions is risky; a more robust approach is to decouple billing logic from price configuration, with cost accounting in its own layer.

Parameters to confirm and input preparation before calling
Before writing the first line of calling code, it is worth clarifying two things: how to write the prompt, and how to organize the request.
How to write the prompt. Text is the only control channel, so prompt quality is almost equivalent to result quality. In practice, splitting the description into several dimensions and addressing each separately is more effective than piling up a long string of adjectives: sound type (for example, ambient background noise versus a rhythmic passage), mood or atmosphere (tense, soothing, bright), and rough sense of time (crescendo, loop, single trigger). What to avoid is conflicting modifiers and overly literary expressions—the model reads acoustic features, not rhetoric. Also accept one point: a prompt can control direction, not details; expecting text to specify every note precisely is unrealistic.
Organizing the request. Field names are governed by the model page; what you really need to decide yourself is three things: duration (duration, 1–380 seconds), output format and bitrate (output_format, bitrate), and whether to fix seed. These three determine whether the product can go directly into the downstream pipeline, so it is advisable to put them in a request template rather than assembling them on the fly at runtime. What you can prepare on the engineering side in advance: make prompts configurable templates rather than scattered throughout the code; record a business-side identifier for each call to facilitate later reconciliation; and store the returned audio in object storage with traceable metadata (prompt, call time, business source), because the audio result itself is not reproducible—once lost, it cannot be recovered.
Integration method. Call through the unified interface of HiAPI.ai, using the model identifier stable-audio-3-medium/text-to-audio. You can view the model's integration information and documentation on the model page /models/stable-audio-3-medium-text-to-audio. The advantage of the unified interface is that you do not need to maintain separate authentication and error-handling logic for each model, and the change surface is small when you later replace or add models.
Typical usage and batch generation strategy
Do not run the full volume right away. For capabilities like text-to-audio, how good the results are depends heavily on the prompt and your scenario, so early trial-and-error costs should be kept to the minimum scope.
Step one: single-item trial runs. Pick the three to five most representative business scenarios, write one prompt for each, generate one audio clip each, and listen to them manually. The purpose of this step is not tuning but judging "whether this direction works at all." If four of the five scenarios clearly fall short, the problem may not be the prompt but that this model does not fit your scenario; cutting losses in time is more worthwhile than continuing to tune parameters.
Step two: small-batch sampling. Once a feasible direction is chosen, fix the prompt template and run a dozen to a few dozen items to see result stability: when the same template is generated multiple times, does the listening experience stay within an acceptable range? This step exposes prompt robustness issues—some descriptions look clear, but the variance of the actual generated results is large.
Step three: batch concurrency. Scale up only after confirming stability. Keep a few engineering points in mind. Concurrency must have an upper limit; do not fire hundreds or thousands of requests at once. Failures need retries, but distinguish retryable errors (timeouts, rate limiting) from non-retryable errors (malformed requests)—retrying the latter only wastes item count. Persist each result immediately after generation along with its metadata; do not accumulate them in memory waiting for the whole batch to finish. The whole batch task should support resuming from a checkpoint, so that if it dies midway it can continue from where it left off.
Step four: result retention and selection. The volume of generated audio quickly exceeds what humans can listen to, so it is advisable to record business tags when persisting and later sample-evaluate by tag. If the product form allows, design "generate several items, and let the user or a rule pick one" as an explicit step, rather than letting users receive a random result without any indication.
The core idea of this path is: at each step, exchange the minimum cost for one piece of certain information, avoiding a large volume of calls before the direction is validated and then having to redo everything because the results fall short.
Common issues and troubleshooting
Generated results do not match the description. First check whether the prompt is too abstract. A description like "warm, textured atmosphere" may be understood very differently by a person and by the model. Switch to more specific acoustic descriptions, remove conflicting modifiers, and run a few more items to see the trend. If it still deviates after adjustment, this direction is beyond the model's capability range and the problem is not the prompt.
Results vary a lot across generations. This is normal for generative models and not necessarily a fault. The way to handle it is to use fixed, validated prompt templates and control final quality by generating several items and then selecting, rather than expecting a single call to hit the mark reliably.
Output duration deviates from expectations. Duration is specified by duration, with values from 1 to 380 seconds and a default of 30 seconds; values outside the range are rejected directly during input validation. But "specified N seconds" does not equal "exactly N seconds in listening experience"—the product side should still be designed around "getting an audio clip," and when an exact length is needed, trim or extend on the business side.
Billing statistics do not match actual calls. The most common reason is that retries and candidate generation were not included in the statistics. It is advisable to separately record every actually issued request on the business side and periodically sample-check against billing details to confirm that the mapping "one business action corresponds to how many billed calls" is stable.
A batch task fails massively midway. First look at the distribution of error types. If they are rate-limiting errors, reduce concurrency; if they are request-body problems, the template generates invalid requests under some kind of input, and the validation layer should block them rather than relying on retries to push through.
Whether to choose it: a decision checklist
Before starting integration, run quickly through the following:
- Can your need be described in a piece of text? If not, this is not the right tool.
- Do you need only the single direction "generate audio from text," without audio editing, audio-to-text, or multimodal mixing? If those are involved, they need to be solved as separate capabilities.
- Do you accept that generated results are stochastic and are you willing to accommodate "generate several items and then select" in your design? If not, pure generative models are not a good fit.
- Can your usage be estimated in "item count," and do you accept that cost grows linearly with the item count? Per-item billing models are friendly to high-frequency small-batch calls, but for massive call volumes you need to work out the budget in advance.
- How much audio precision does your scenario require? Functional sounds, ambient sounds, and background music are usually fine; fine-grained arrangement and post-processing are out of scope.
If all of the above point to "yes," this model is worth running as your first version. Starting with single-item trial runs, validating stability with small batches, and then gradually scaling up is the lowest-cost path to production. Model details and integration methods can be viewed at /models/stable-audio-3-medium-text-to-audio.
Related articles
View all articles →-
Guide
MAI Image 2.7 Text-to-Image Getting Started Guide: Capability Boundaries, Pricing, and Integration Practices
From capability boundaries to per-image billing integration practices, all in one place
-
Guide
MAI Image 2.7 Flash Text-to-Image Integration Guide: Capability Boundaries, Parameters, and Cost Estimation
From capability boundaries to the cost accounting of $0.0149 per image, this article explains clearly in one go how to integrate, how to use, and how to save money
-
Guide
MAI Image 2.7 Image Editing Getting Started Guide: Capabilities, Pricing, and Integration Key Points of the Image Editing Model
From capability boundaries to cost estimation, what developers need to know before integrating the Microsoft image editing model