FastMetal
ModelsPricingDocsBlogComparisonApps
30% off, limited timeDeepSeek V4.1 Flash 1017, run in Japan, is 30% off until December 4 (JST)See details

API

  • Overview
  • Getting Started
  • Models
  • Reasoning Control
  • Video Generation
  • Structured Decisions
  • Media Uploads
  • Speech
  • Transcription
  • Music
  • Sound effects

Concepts

  • LLM API concepts
  • Errors and limits

Agents

  • All guides
  • MCP Server
  • Octofriend
  • Hermes
  • Claude Code
  • Crush
  • Opencode
  • GitHub Copilot
  • Cursor
  • DeepSeek Harness
  • OpenClaw
  • Xcode Intelligence

OpenAI Reference

  • /models
  • /chat/completions
  • /completions

Anthropic Reference

  • /messages
  • /messages/count_tokens

Platform Reference

  • /key/info

Help

  • FAQ

Music

Make an instrumental music take from a text prompt. POST the prompt and the length to /v1/audio/music with your API key and get the MP3 back, decoded and checked before it is billed. Each take is billed once, at the price of its length.

One take

Send the model, a prompt and the length in seconds. The call waits for the take, and the answer is the MP3 itself (audio/mpeg). Its headers carry what was measured and billed:

  • x-fm-duration-secondsthe length of the decoded take, in seconds.
  • x-fm-requested-secondsthe length asked for, in seconds.
  • x-fm-chargewhat the take was billed, and the currency.
  • x-fm-checksthe checks, for example length=ok; level=ok.
curl -sS -X POST https://api.fastmetal.ai/v1/audio/music \
  -H "Authorization: Bearer $FASTMETAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "ace-step/ace-step-1.5", "prompt": "Calm ambient bed, soft synth pads, light percussion, steady tempo", "duration_seconds": 60, "bpm": 100}' \
  -o take.mp3 -D headers.txt

With "delivery": "json" the answer is JSON instead: the take as base64 under audio, duration_seconds, requested_duration_seconds, instrumental, bpm, the charge (amount, currency, per, duration_seconds, instrumental, rounding and price_version) and the checks.

Fields

  • modelRequired. A music model from the price list below.
  • promptRequired. What the music should sound like: genre, mood, instruments, tempo. At most 1000 characters, with at least one letter or digit.
  • duration_secondsRequired. The length of the take in seconds: one of the lengths in the price list.
  • instrumentaltrue, the default. A take with vocals is not sold yet.
  • bpmOptional. The tempo, a whole number from 30 to 300. Without it, the model chooses.
  • deliverybinary (the default) or json.

Any other field is refused with a 400 naming it, before anything is charged. A prompt follows the speech API's rules for characters: no control character but tab and line feed, and no format character, private-use character or unassigned code point.

There is no seed: each call makes a new take, so two calls with the same body give two different takes, each billed. To choose between takes, make two or three and keep the one that fits.

Prices

A take is priced by its length, and the price is the whole charge for the take.

ModelTakePrice a take
ACE-Step 1.5
ace-step/ace-step-1.5
An open-weights music model by ACE Studio and StepFun.
30 s, instrumental$0.03165
60 s, instrumental$0.0633
90 s, instrumental$0.09495
ElevenLabs Music v2.5
elevenlabs/music-v2.5
A music model by ElevenLabs. Instrumental takes only, and it takes no bpm (a request with bpm is refused). A take comes back at about the length asked; the exact length is in x-fm-duration-seconds, and the answer also carries the take's true peak (x-fm-peak-dbfs) and loudness (x-fm-loudness-lufs).
A 60 s take comes back about 59.5 s long.
The 30 and 60 s takes are fixed-price takes at the same price: this model is priced by the whole minute, and nothing more is charged if a take runs long.
30 s, instrumental$0.66
about 60 s, instrumental$0.66

Prices are before tax, from the catalog the gateway bills by. A take that fails its checks costs nothing.

Time

Every length in the price list is one the model made inside 64 seconds in our measurements, so every call is answered within 90 seconds. A take that is not finished in time is refused and not billed.

A free price check

POST the same body with "op": "music" to /v1/audio/quote for the price of a take before you make it. Nothing is sent to the model and nothing is billed, and a request the call would refuse is refused here the same way.

curl -sS -X POST https://api.fastmetal.ai/v1/audio/quote \
  -H "Authorization: Bearer $FASTMETAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"op": "music", "model": "ace-step/ace-step-1.5", "prompt": "Calm ambient bed, soft synth pads, light percussion, steady tempo", "duration_seconds": 60}'

What is checked before a take is billed

Every take is decoded and measured. A take is never made again on its own: one call is one take.

  • A take shorter than asked by more than its tolerance is refused, and nothing is charged.
  • A silent take is refused, and nothing is charged.
  • A take a little longer than asked is delivered with the warning length_long, at the price of the length asked.
  • A very quiet take is delivered with the warning quiet, and billed.
  • An instrumental take that came back with lyrics is delivered with the warning lyrics_generated, and billed.

For approval and accounting

A take is billed once, in yen (US cents on a USD account), at the price of its length shown above, when FastMetal holds the whole checked take. A caller that disconnects after that is still billed, and so is a download the caller cuts short. A request refused before the model is called costs nothing, and so does a take that fails its checks. The JSON answer carries the charge and the price version it was billed at; the audio answer carries the charge in its x-fm-charge header.

MCP

Over MCP, generate_music makes music with the same models, lengths and prices. takes (1 to 3) asks for separate takes, each billed on its own, two at a time. dry_run states the price of one take and of all of them, for free. It answers within 45 seconds; takes not finished by then come back as pending with their ids, and get_audio with those ids fetches them (wait: true waits for them). A request_id makes a repeat safe: the same request_id with the same other arguments returns the first call's takes and bills nothing new. The prompt is not compared, so use a new request_id for each new request.

Errors

  • 400A field the request may not hold, or a value the model does not sell. Nothing is charged.
  • 413A body over 1 MiB.
  • 429budget_exceeded: the price does not fit what is left of the key's budget. From the music service, a 429 carries its code at the top of the body beside its error, and the refusal itself is not charged: account_requests (the account already has its share of takes in progress: retry when one ends), capacity (the music service is at its limit: retry shortly), or a pause of the account, account_paused_on_model (after takes on that model that were not confirmed delivered) or account_paused (after requests the music service refused): the message says when to retry.
  • 502With one of the music service's codes (listed below) at the top of the body, beside its error message, the music service's own refusal, and nothing was charged: the model could not make the take (host_failed), the take did not pass its checks (clip_wrong_length, clip_silent, clip_unusable), or the music service is unavailable right now (host_unavailable: try again later). A 5xx without one of them there (a code inside an error object is not one) can mean the connection failed after the take was made, which may have been charged, so check the balance before you retry.
  • 503Music is not available right now (music_unavailable), the take would not finish in time (not_started_time), its price could not be confirmed (pricing_updating), or the music service is busy (host_busy), and nothing was charged; a 503 with one of those codes at the top of the body, beside its error message, is always the music service's own refusal. Without one it can also be a failure on the way back, as for a 502: check the balance, then retry.
  • 504With the code past_time_budget, the answer was ready only after the time a call may take, and nothing was charged. Any other 504 is a failure on the way back, as for a 502: check the balance before you retry.

Every refusal of the music service carries one of these codes at the top of the body, beside its error message, and none of them was charged: not_found, audio_disabled, unauthorized, query_not_supported, request_late, request_too_large, body_unreadable, body_invalid_json, body_not_object, plane_unavailable, internal_error, invalid_request, pricing_updating, music_unavailable, account_paused, account_paused_on_model, account_requests, capacity, not_started_time, host_busy, host_unavailable, host_refused_line, host_failed, host_no_answer, host_cut_line_limit, host_cut_time_budget, host_no_audio, clip_unusable, clip_wrong_length, clip_silent, out_of_time, past_time_budget, journal_unavailable, host_busy_timeout, host_refused_request, host_outcome_unknown, host_answer_unusable, host_lost_request.

Product

  • Pricing
  • AI cost calculator
  • Apps
  • Discover
  • Studio
  • For business
  • Partners
  • For providers
  • API Docs

Guides

  • Claude Code
  • GitHub Copilot
  • Cursor
  • DeepSeek Harness
  • Getting Started

API Reference

  • OpenAI Compatible
  • Anthropic Compatible

Compare Alternatives

  • vs OpenRouter
  • vs Lolipop! AI Gateway
  • vs OrcaRouter
  • vs Anthropic Direct
  • vs OpenAI Direct
  • vs Overseas Hosting
  • vs Local LLMs
  • Model vs model
  • Answers side by side
  • Rankings by use case
  • All comparisons

Account

  • Chat
  • Usage
  • Profile

Legal

  • Newsletter
  • Contact
  • Company Information
  • Terms of Service
  • Privacy policy

The AI Brief, weekly

New models, agents and harnesses, once a week. What is in it and our privacy policy.

© 2026 FastMetal. All rights reserved.

team@fastmetal.ai

Leaderboard data: LMArena leaderboard dataset (lmarena-ai/leaderboard-dataset), CC BY 4.0; category names mapped and ratings rounded by FastMetal.