myart-arch/prompt-music-search

Describe the music you want and get spot-on matches: real, released tracks, never AI-generated.

Public
29 runs

Run time and cost

This model runs on CPU hardware. We don't yet have enough runs of this model to provide performance information.

Readme

Prompt Music Search by MyPart

Describe the music you need in plain words and get a ranked list of real, released tracks from MyPart’s catalog.

  • Natural-language briefs. From a few words (“Futuristic EDM beat”) to a full creative brief (“warm, uplifting acoustic music for a travel ad about feeling at home anywhere”), in any language.
  • Song or section. Match whole songs, or the best-fitting part of each song with its start and end time.
  • Licensed-only option. Restrict results to MyPart’s licensable catalogs.

Real catalog music only: nothing is generated.

Get started

  1. Get a MyPart API key. Request access at mypart.ai/api-access. Every request needs it.
  2. Use your own Replicate API token to call the model, as with any model on Replicate.

Keep both in environment variables: MYPART_API_KEY and REPLICATE_API_TOKEN. The MyPart key is passed as the mypart_api_key input; Replicate treats it as a secret and redacts it from prediction logs.

Quick start

curl -s -X POST https://api.replicate.com/v1/predictions \
  -H "Authorization: Bearer $REPLICATE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Prefer: wait" \
  -d '{
    "version": "myart-arch/prompt-music-search:ee171cf4023e15a40d2f0dc71e49ccd5e9ef287db76a9c042c1e7542b91325c2",
    "input": {
      "mypart_api_key": "'"$MYPART_API_KEY"'",
      "query": "Warm, uplifting acoustic music for an Airbnb ad about discovering beautiful places and feeling at home anywhere."
    }
  }'
import os
import replicate

output = replicate.run(
    "myart-arch/prompt-music-search:ee171cf4023e15a40d2f0dc71e49ccd5e9ef287db76a9c042c1e7542b91325c2",
    input={
        "mypart_api_key": os.environ["MYPART_API_KEY"],
        "query": "energetic indie rock for a travel vlog",
        "num_results": 10,
    },
)
for track in output["results"]:
    print(track["score"], track["artist"], "-", track["title"], track["url"])

Inputs

Input Default Description
mypart_api_key required Your MyPart API key (request one). Treated as a secret.
query required The music you want, in your own words.
search_resolution song song matches whole songs. section matches the best-fitting part of each song and returns its start and end time.
results_mode discovery popular boosts highly familiar songs and artists. discovery allows a wider, more flexible search.
num_results 10 1-50. The maximum returned.
licensed false true returns only tracks from MyPart’s licensable catalogs.

Output

{
  "results": [
    {
      "id": "164779",
      "title": "Going Home",
      "artist": "Jon Allen",
      "score": 5.46,
      "url": "https://.../preview.mp3",
      "spotify_id": "4R19bxsqCY2NQUncOKG8Pe",
      "start_time_seconds": null,
      "end_time_seconds": null,
      "section_lyrics": null
    }
  ]
}
Field Meaning
id MyPart track id
title, artist Track title and artist
score Match score; higher is a closer match
url Audio preview (MP3)
spotify_id When available, otherwise null
start_time_seconds, end_time_seconds Section searches only: the part of the song that matched
section_lyrics Section searches only: the lyrics of that part, when it has lyrics

The order of the top results is varied on purpose; use score to rank them.

Tips

  • Describe the use and the feeling (“for a product launch, premium and exciting”) rather than only a genre: the brief is interpreted into moods, genres, instruments and more.
  • You can provide a reference song or artist, e.g. “Songs in the style of Bruno Mars about achieving success in life”.

Troubleshooting

Error What to do
A MyPart API key is required Pass your key as mypart_api_key. No key yet? Request one at mypart.ai/api-access.
Invalid or revoked MyPart API key Check the key was copied in full, or request a new one at mypart.ai/api-access.
The MyPart API is busy Retry after a few seconds.

About MyPart

MyPart builds music reasoning for creative tools: it understands what a visual or a brief needs and finds real music that fits. API access: mypart.ai/api-access.

Model created
Model updated