API Reference
Complete REST API documentation for building integrations with USIC.
Base URL
https://usic.app/apiTracks
GET
/tracksGet all tracks with pagination
Query Parameters
page (number) - Page number (default: 1)limit (number) - Items per page (default: 20)genre (string) - Filter by genreResponse
{
"tracks": [
{
"id": "abc123",
"title": "Track Title",
"artist_address": "0x1234...",
"artist_name": "Artist Name",
"genre": "Electronic",
"duration": 180,
"audio_url": "ipfs://...",
"cover_url": "ipfs://...",
"stream_count": 1234,
"created_at": "2025-01-01T00:00:00Z"
}
],
"total": 100,
"page": 1,
"limit": 20
}GET
/tracks/:idGet a specific track by ID
Response
{
"id": "abc123",
"title": "Track Title",
"artist_address": "0x1234...",
"artist_name": "Artist Name",
"genre": "Electronic",
"duration": 180,
"audio_url": "ipfs://...",
"cover_url": "ipfs://...",
"stream_count": 1234,
"created_at": "2025-01-01T00:00:00Z"
}GET
/tracks/trendingGet trending tracks
Query Parameters
limit (number) - Number of tracks (default: 10)Response
{
"tracks": [...]
}Artists
GET
/artists/:addressGet artist profile by wallet address
Response
{
"wallet_address": "0x1234...",
"artist_name": "Artist Name",
"bio": "Artist bio",
"avatar_url": "ipfs://...",
"total_streams": 10000,
"total_revenue": "100.00",
"track_count": 25,
"follower_count": 500
}GET
/artists/:address/tracksGet all tracks by an artist
Response
{
"tracks": [...]
}Streaming
POST
/x402/chunkSubmit a payment chunk during streaming
Request Body
{
"track_id": "abc123",
"chunk_index": 5,
"amount": "10000",
"timestamp": 1234567890,
"signature": "0xdef..."
}Response
{
"success": true,
"chunk_index": 5,
"total_paid": "50000"
}POST
/x402/settleSettle final payment for a stream
Request Body
{
"track_id": "abc123",
"final_amount": "100000",
"signature": "0xabc..."
}Response
{
"success": true,
"tx_hash": "0x123...",
"total_paid": "100000"
}Stats
GET
/stats/platformGet platform-wide statistics
Response
{
"total_streams": 1000000,
"total_revenue": "10000.00",
"total_artists": 500,
"total_tracks": 5000,
"usi_price": "0.000001",
"usi_market_cap": "129490000",
"usi_volume_24h": "7630000"
}GET
/stats/artist/:addressGet artist statistics
Response
{
"total_streams": 10000,
"total_revenue": "100.00",
"streams_24h": 150,
"revenue_24h": "1.50",
"top_track": {
"id": "abc123",
"title": "Track Title",
"streams": 5000
}
}