<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: lshadow</title>
    <description>The latest articles on DEV Community by lshadow (@levievans).</description>
    <link>https://dev.to/levievans</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4026241%2Fa6d73849-9b94-4c93-a1f1-86e030227584.jpg</url>
      <title>DEV Community: lshadow</title>
      <link>https://dev.to/levievans</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/levievans"/>
    <language>en</language>
    <item>
      <title>Licensing Music from Code: Search, License, and Stream Stems in Three API Calls</title>
      <dc:creator>lshadow</dc:creator>
      <pubDate>Thu, 05 Nov 2026 08:55:01 +0000</pubDate>
      <link>https://dev.to/levievans/licensing-music-from-code-search-license-and-stream-stems-in-three-api-calls-5fln</link>
      <guid>https://dev.to/levievans/licensing-music-from-code-search-license-and-stream-stems-in-three-api-calls-5fln</guid>
      <description>&lt;p&gt;Music licensing assumes humans, lawyers, and business days. You email a rights holder, negotiate, sign a PDF, and wait. But the software I'm building — agents and apps that generate media — needs a track cleared in the same request cycle it discovered it. So I built the licensing step into an API.&lt;/p&gt;

&lt;h2&gt;
  
  
  The catalog as data
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://levievans.cloud" rel="noopener noreferrer"&gt;X402 Music&lt;/a&gt; exposes 240 pre-cleared tracks and 960+ stems across 30 genres as JSON: BPM, key, frequency distribution, sentiment tags, an 8-dimension emotion vector, and a per-track fee schedule. If a machine can't read it, it doesn't ship.&lt;/p&gt;

&lt;h2&gt;
  
  
  Discovery
&lt;/h2&gt;

&lt;p&gt;Search by BPM range, key, mood tags, or vibe vector. Lookups run against an in-memory index and come back in single-digit milliseconds:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -s 'https://levievans.cloud/api/v1/search?min_bpm=120&amp;amp;max_bpm=128&amp;amp;key=Amin' \
  -H "authorization: Bearer $TOKEN"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Licensing as an API call
&lt;/h2&gt;

&lt;p&gt;Auth is one POST with a name — you get an API key (shown once) plus a JWT:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -s -X POST https://levievans.cloud/api/v1/auth/register \
  -H 'content-type: application/json' -d '{"name":"my-agent"}'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Licensing is another POST with the track IDs. Every license returns a signed HMAC receipt you can verify offline — a receipt instead of a PDF contract. Fees are per track, starting at $0.20.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -s -X POST https://levievans.cloud/api/v1/license \
  -H "authorization: Bearer $TOKEN" -H 'content-type: application/json' \
  -d '{"client_wallet":"0xabc","track_ids":["trk_neon_drive"]}'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Streaming stems
&lt;/h2&gt;

&lt;p&gt;Each track splits into drums, bass, melody, vocals, and FX, streamed as WAV at 1 credit per stem request (1 credit = 1 US cent). Billing is prepaid credits via Stripe Checkout — no subscription.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -s 'https://levievans.cloud/api/v1/stems/trk_neon_drive?stem=drums' \
  -H "authorization: Bearer $TOKEN" -o drums.wav
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;I verified the full flow — register, search, catalog, and a real stem download — before writing this.&lt;/p&gt;

&lt;h2&gt;
  
  
  Open questions
&lt;/h2&gt;

&lt;p&gt;Is per-track/per-stem micro-licensing the right granularity for agent-built media? And what catalog metadata would you need before trusting an API like this in production? Brutal feedback welcome — go break it: &lt;a href="https://levievans.cloud" rel="noopener noreferrer"&gt;https://levievans.cloud&lt;/a&gt;&lt;/p&gt;

</description>
      <category>api</category>
      <category>ai</category>
      <category>webdev</category>
      <category>music</category>
    </item>
  </channel>
</rss>
