Skip to main content

suede-ai

PyPI PyPI - Python Version PyPI - Downloads License: MIT x402

A Suede Labs AI project · Built by Jason Colapietro

Python SDK for Suede Labs AI — x402 pay-per-call music, video, and image generation settled in USDC on Base. The three typed methods below mirror the current public discovery manifest. Legacy convenience helpers remain available for compatible deployments, but they are not current public inventory. No API keys. No subscriptions. Sign an EIP-3009 authorization and call the resource.

The SDK wraps the 402-challenge / sign / retry loop so your agent code spends its time writing creative prompts, not encoding typed data.

Install

pip install suede-ai

Requires Python 3.10+. Pulls in httpx, eth-account, and pydantic.

60-second quickstart

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 attestation

The first call returns 402 with the x402-v2 challenge. The SDK signs an EIP-3009 transferWithAuthorization for USDC on Base, replays with PAYMENT-SIGNATURE, and returns the JSON body. You never touch the typed data.

Current paid resources

In the public discovery manifest (/.well-known/x402.json) — deliberately scoped to media-generation offerings only:

Method Endpoint Price (USDC) What it does
create_music POST /create-music 0.50 Rights-aware music generation
agent_video POST /agent/video 4.99 8-second 720p video with native audio
agent_image POST /agent/image 0.15 Rights-aware image generation

Prices are enforced server-side and can change. Call suede.manifest() before signing a payment. Older /v1/* helpers remain in the package for clients using compatible deployments; do not treat them as current public Suede inventory.

How payment works

  1. Client calls POST /create-music.
  2. Server returns 402 Payment Required with a base64 PAYMENT-REQUIRED header and a JSON-body fallback. Its accepts entries declare scheme (exact), network (eip155:8453), asset (USDC on Base), payTo, and atomic amount.
  3. SDK builds an EIP-3009 TransferWithAuthorization typed message and signs it with the configured wallet.
  4. SDK base64-encodes the full x402-v2 payment payload and replays the original request with the PAYMENT-SIGNATURE header.
  5. 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 | jq

Advanced

Reuse an httpx.Client

import httpx
from suede_ai import SuedeClient

http = httpx.Client(http2=True, timeout=120.0)
suede = SuedeClient(wallet_private_key=PRIVATE_KEY, http_client=http)

Direct call to any current resource

result = suede.request("POST", "/agent/image", json={"prompt": "lo-fi rainy afternoon album art"})

Inspect the live manifest

manifest = suede.manifest()  # free — no payment required

Rights and on-chain tools

# 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")

Unconfirmed: guitar rig tools

rig_analyze, rig_oracle, and rig_roast are callable client methods, but rig_analyze returned a plain validation error (not a priced 402 challenge) in the last verification pass — these may not be wired to the payment gate on all deployments. Confirm live before relying on them.

# 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"])

Roadmap

  • Async client (AsyncSuedeClient)
  • Pydantic response models per endpoint
  • examples/ folder: LangChain tool wrappers, CrewAI tasks, agentcash adapter

License

MIT. See LICENSE.


Built by Jason Colapietro · Suede Labs AI · x402 manifest

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

suede_ai-0.4.0.tar.gz (106.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

suede_ai-0.4.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file suede_ai-0.4.0.tar.gz.

File metadata

  • Download URL: suede_ai-0.4.0.tar.gz
  • Upload date:
  • Size: 106.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for suede_ai-0.4.0.tar.gz
Algorithm Hash digest
SHA256 c3fe4df6614cf4b851ed4c831f180e74b3b114bd4c0a50d57fab12c8d8a838e7
MD5 1796e5397ddaeb831761f3071892bdf8
BLAKE2b-256 fb9cb79978bb59f978a526ca2eb3bfd8a04c18adab44c0c4d9ffbc5d37979980

See more details on using hashes here.

Provenance

The following attestation bundles were made for suede_ai-0.4.0.tar.gz:

Publisher: publish.yml on Suede-AI/suede-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file suede_ai-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: suede_ai-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for suede_ai-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5810ff9ff041f9132d9e9ff69faa6c9b4642e2475fbc25f109a5363be8649c4b
MD5 93842e44f1b14e75540864147e83a7f5
BLAKE2b-256 d429a6ec43a72fbe4ddf55e0aa355d7d825d20f504576be9cf5435c41b0f078e

See more details on using hashes here.

Provenance

The following attestation bundles were made for suede_ai-0.4.0-py3-none-any.whl:

Publisher: publish.yml on Suede-AI/suede-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page