82trust / 100

Music

by Treza in Markets & finance

x402 APIPassing, checked 2 h ago

Music generation: describe a track, get an original piece back in the same response. Google Lyria 3: a 30-second clip ($0.06) or a full song ($0.12). No account or API key: the payment is the only credential.

POST https://www.trezalabs.com/api/x402/music

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
161 ms typical, 161 ms slowest 5%
Last check
2 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://www.trezalabs.com/api/x402/music" \
  -H "content-type: application/json" \
  -d '{"model":"lyria-3-clip","prompt":"warm lo-fi hip hop, soft piano chords, vinyl crackle, relaxed 80 bpm groove"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fwww.trezalabs.com%2Fapi%2Fx402%2Fmusic
const res = await pay("https://www.trezalabs.com/api/x402/music", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"model":"lyria-3-clip","prompt":"warm lo-fi hip hop, soft piano chords, vinyl crackle, relaxed 80 bpm groove"}),
});
console.log(await res.json());

Example input

{
  "model": "lyria-3-clip",
  "prompt": "warm lo-fi hip hop, soft piano chords, vinyl crackle, relaxed 80 bpm groove"
}

Example output

{
  "audio": "https://www.trezalabs.com/api/media/generated/x402_music/1a2b3c4d.mp3?s=...&c=...",
  "model": "lyria-3-clip",
  "paidUsd": 0.06,
  "runId": "2026-09-23T18:04:11.000Z#1a2b3c4d",
  "status": "success",
  "statusUrl": "https://www.trezalabs.com/api/x402/music?runId=...&token=...",
  "transaction": "0x..."
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
2 h agoPassed4022.0 s$0.06
8 h agoPassed402161 ms$0.06