A Suede Labs AI project · Built by Jason Colapietro
Python SDK for Suede Labs AI — x402 pay-per-call music generation, stem splitting, MIDI transcription, mastering, lyric sync, guitar rig tools, and IP-registry lookups. 22 endpoints settled in USDC on Base. No API keys. No subscriptions. Sign an EIP-3009 authorization and call the endpoint.
The SDK wraps the 402-challenge / sign / retry loop so your agent code spends its time writing creative prompts, not encoding typed data.
pip install suede-aiRequires Python 3.10+. Pulls in httpx, eth-account, and pydantic.
from suede_ai import SuedeClient
# Funded EOA on Base with USDC. Treat this like any other secret.
PRIVATE_KEY = "0x..."
with SuedeClient(wallet_private_key=PRIVATE_KEY) as suede:
track = suede.create_music(
prompt="lo-fi rainy afternoon, vinyl crackle, soft piano",
duration_seconds=30,
)
print(track["assetUrl"]) # https://cdn.suedeai.ai/audio/trk_...mp3
print(track["provenance"]) # {"fingerprint": "0x..."} — on-chain attestationThe first call returns 402 with the x402 challenge. The SDK signs an EIP-3009 transferWithAuthorization for USDC on Base, replays with X-PAYMENT, and returns the JSON body. You never touch the typed data.
Prices are sourced from the live manifest at the time of writing and are enforced server-side.
- Client calls
POST /create-music. - Server returns 402 Payment Required with a JSON
acceptsarray. Each entry declares scheme (exact), network (eip155:8453), asset (USDC on Base),payToaddress, andmaxAmountRequired. - SDK builds an EIP-3009
TransferWithAuthorizationtyped message and signs it with the configured wallet. - SDK base64-encodes the payment payload and replays the original request with the
X-PAYMENTheader. - Suede's facilitator settles on-chain; the response body returns asset URL + on-chain provenance.
You can inspect the live manifest yourself:
curl https://app.suedeai.ai/.well-known/x402.json | jqimport httpx
from suede_ai import SuedeClient
http = httpx.Client(http2=True, timeout=120.0)
suede = SuedeClient(wallet_private_key=PRIVATE_KEY, http_client=http)result = suede.request("POST", "/v1/style-coach", json={"tags": "lofi, rainy"})manifest = suede.manifest() # free — no payment required# What signal chain is this guitar recording running?
chain = suede.rig_analyze(audio_url="https://cdn.example.com/riff.mp3")
# Recommend a rig for a target tone
rig = suede.rig_oracle(goal="warm blues crunch", genre="blues", budget_usd=1500)
# Roast your pedalboard
roast = suede.rig_roast(goal="tight metal", gear=["Boss DS-1", "Line 6 Spider"])# Q&A about on-chain rights for a specific asset
answer = suede.chain_chat(
question="Who owns this track and what licenses are active?",
asset_hash="0xabc123...",
)
# Analyze what genre/mood a text prompt implies
analysis = suede.prompt_analyze(prompt="dark cinematic orchestral tension build")- Async client (
AsyncSuedeClient) - Pydantic response models per endpoint
examples/folder: LangChain tool wrappers, CrewAI tasks, agentcash adapter
MIT. See LICENSE.
Built by Jason Colapietro · Suede Labs AI · x402 manifest
