Spiral gives your agent every tool with one account. Browse the tools →

opencode · Audio

How to Use CassetteAI Music Generator in opencode

CassetteAI Music Generator creates instrumental music for videos, podcasts, and games from a written brief. It produces 44.1 kHz stereo WAV audio up to three minutes long, with genre, mood, instruments, and tempo described in the prompt.

Prompts to try with CassetteAI Music Generator in opencode

Copy an example into opencode, or ask in your own words.

Read the game's design document and use CassetteAI Music Generator to create a 90-second instrumental for the main menu. Base the mood on the setting, and write down the genre, instruments, and tempo you chose.

CassetteAI Music Generatoropencode
Try asking
  • Read the product demo script in this project. Use CassetteAI Music Generator to create a 60-second instrumental with soft synth chords, restrained electronic drums, and a calm mood at 90 BPM.

  • Use CassetteAI Music Generator to create three separate 30-second instrumental drafts for the racing prototype: house, rock, and synth-pop. Request an energetic mood and a tempo of 120 BPM for each.

  • Check the project's podcast brief and use CassetteAI Music Generator to create a 20-second instrumental intro with warm piano, upright bass, and brushed drums at 95 BPM. Save the chosen musical brief beside the audio asset.

  • Read the short film's scene notes and use CassetteAI Music Generator to create a 120-second instrumental score draft. Translate the scene's emotion into a specific mood, tempo, and set of instruments.

How to set up CassetteAI Music Generator in opencode

Pick the way that suits you. Each takes about two minutes.

Use Spiral's MCP server

  1. Add the server

    Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

    opencode mcp add spiral --global --url https://api.spiral.ai/mcp
  2. Sign in

    Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.

    opencode mcp auth spiral
  3. Check it

    Spiral shows as connected.

    opencode mcp list

Use the Spiral skill

  1. Send opencode this message

    Your agent reads Spiral's skill and sets itself up.

    set up https://spiral.ai/SKILL.md
  2. Sign in or paste a key

    Approve Spiral in the browser, or give the agent a key from the console.

Use the Spiral CLI

  1. Install and sign in

    Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

    npx -y spiral-cli@latest init

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run CassetteAI Music Generator

    One request; the result comes back by polling or a webhook.

    curl https://api.spiral.ai/v1/runs \
      -H "Authorization: Bearer $SPIRAL_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: $(uuidgen)" \
      -d '{
        "provider": "fal",
        "model": "cassetteai/music-generator",
        "input": {
          "prompt": "Smooth chill hip-hop beat with mellow piano melodies, deep bass, and soft drums, perfect for a night drive. Key: D Minor, Tempo: 90 BPM.",
          "duration": 50
        }
      }'

Then paste one of the prompts above: opencode finds CassetteAI Music Generator on Spiral, shows the price and runs it.

CassetteAI Music Generator providers and prices

Spiral runs CassetteAI Music Generator through fal. Open a card for today's price, with every fee included.

falAudio
music generator
cassetteai/music-generator

Settings you can ask for

CassetteAI Music Generator works from your prompt. Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Duration10 to 180

The duration of the generated music in seconds.

Every API field of music generator is on its tool page: open its card above.

What can you do with CassetteAI Music Generator in opencode?

Create instrumental music for game builds, narrated demos, and interactive prototypes from the project's creative brief. Turn that brief into a concrete description of genre, mood, instruments, and tempo before generating a track.

Product demonstration music

Generate a 60-second instrumental for a narrated product demo. Try restrained electronic percussion and soft synth chords to keep the musical brief focused.

Podcast intros and outros

Create a 20-second instrumental cue with a clear mood and a small set of instruments. Try warm piano, brushed drums, and upright bass for a conversational show.

Game menu music

Create a 90-second instrumental for a game's menu or lobby. Specify the genre, tempo, and instrumentation to match the setting.

Short film score drafts

Explore a 120-second instrumental cue for a short film scene. Compare separate takes with different moods or instrumentation before choosing a direction.

Study session music

Generate a three-minute instrumental for a short study break or focus segment. Start with a calm mood, slow tempo, soft piano, and restrained percussion.

Social video soundtracks

Make a 30-second instrumental for a travel montage or cooking clip. Describe a specific sound, such as cheerful acoustic pop or relaxed jazz.

Questions about CassetteAI Music Generator in opencode

Can opencode use CassetteAI Music Generator?

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run CassetteAI Music Generator like any built-in tool.

How much does CassetteAI Music Generator cost in opencode?

$0.026 per minute. Billed on `duration`, default 180. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

Do I need a fal account to use CassetteAI Music Generator in opencode?

No. Spiral runs CassetteAI Music Generator on its own fal account. You sign in to Spiral once and never paste a key.

How long does it take to set up CassetteAI Music Generator in opencode?

About two minutes: add the server, then sign in, then check it.

Does opencode wait while CassetteAI Music Generator runs?

CassetteAI Music Generator runs in the background. opencode starts the run, checks on it and gives you the audio when it's ready.

What is CassetteAI Music Generator useful for?

Use it for instrumental background music for videos, podcasts, games, or study sessions. Describe the musical style and mood you want, such as quiet jazz for narration or energetic house for a game.

Can CassetteAI Music Generator sing lyrics?

No. It generates instrumental music and does not support sung vocals or lyrics.

How long can a CassetteAI track be?

A track can be up to three minutes long. For longer projects, plan separate cues and assemble them in an audio editor.

What audio format does CassetteAI Music Generator produce?

It produces WAV audio at 44.1 kHz in stereo.

What should I put in a CassetteAI music prompt?

Specify the genre, mood, instruments, and tempo. For example, ask for mellow lo-fi hip-hop with soft piano, deep bass, and gentle drums at 90 BPM.

Get started

Start using CassetteAI Music Generator in opencode

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into opencode:

Set up opencode

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options