USIC Logo
Loading $USI token data...
Back to Documentation

API Reference

Complete REST API documentation for building integrations with USIC.

Base URL

https://usic.app/api

Tracks

GET/tracks

Get all tracks with pagination

Query Parameters

page (number) - Page number (default: 1)
limit (number) - Items per page (default: 20)
genre (string) - Filter by genre

Response

{
  "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/:id

Get 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/trending

Get trending tracks

Query Parameters

limit (number) - Number of tracks (default: 10)

Response

{
  "tracks": [...]
}

Artists

GET/artists/:address

Get 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/tracks

Get all tracks by an artist

Response

{
  "tracks": [...]
}

Streaming

POST/x402/chunk

Submit 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/settle

Settle 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/platform

Get 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/:address

Get 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
  }
}

Need Help?

Join our developer community for API support and discussions.