Provider Revenue API

Access your revenue data programmatically through our REST API endpoints. Get detailed breakdowns of earnings, server performance, and transaction history.

Revenue Data

Access earnings, fees, and balance information programmatically.

Server Breakdown

Get per-server revenue data with instance-level details.

Easy Integration

Simple REST endpoints with Python, JavaScript, and cURL examples.

1

Getting Started

Base URL and authentication setup

Base URL

https://slyd.com/api/provider/revenue

Authentication

All endpoints require API key authentication. You can provide your API key using one of these methods:

Option 1: Custom Header

X-API-Key: slyd_your_api_key_here

Option 2: Authorization Bearer

Authorization: Bearer slyd_your_api_key_here

To generate an API key, visit your account settings and navigate to the API Keys section.

2

Get Comprehensive Revenue Data

GET /api/provider/revenue

GET /api/provider/revenue

Returns a complete overview of your revenue including summary statistics, monthly earnings, and server breakdown.

Example Request

curl -X GET "https://slyd.com/api/provider/revenue" \
  -H "X-API-Key: slyd_your_api_key_here"

Example Response

{
  "summary": {
    "totalEarningsYTD": 12450.75,
    "slydFeesYTD": 1383.42,
    "grossRevenueYTD": 13834.17,
    "currentMonthEarnings": 2890.50,
    "availableBalance": 8750.25
  },
  "monthlyEarnings": [
    {
      "month": "December 2024",
      "monthAbbreviation": "Dec",
      "amount": 2890.50
    },
    {
      "month": "November 2024",
      "monthAbbreviation": "Nov",
      "amount": 3120.75
    }
  ],
  "serverRevenue": [
    {
      "serverId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "serverName": "gpu-server-01",
      "pricePerHour": 2.50,
      "totalEarnings": 4500.00,
      "slydFees": 500.00,
      "grossRevenue": 5000.00,
      "totalHours": 2000.0
    }
  ],
  "recentPayouts": [
    {
      "payoutId": "payout_1234567890",
      "date": "2024-11-30T00:00:00Z",
      "amount": 3700.50,
      "method": "Stripe",
      "status": "Completed"
    }
  ]
}
3

Get Server-Specific Revenue Breakdown

GET /api/provider/revenue/servers

GET /api/provider/revenue/servers

Returns detailed revenue breakdown by server with optional date filtering.

Query Parameters

startDate (optional, ISO 8601) Start date for revenue calculation. Default: 30 days ago
endDate (optional, ISO 8601) End date for revenue calculation. Default: current date

Example Request

curl -X GET "https://slyd.com/api/provider/revenue/servers?startDate=2024-12-01&endDate=2024-12-31" \
  -H "X-API-Key: slyd_your_api_key_here"

Example Response

{
  "startDate": "2024-12-01T00:00:00Z",
  "endDate": "2024-12-31T00:00:00Z",
  "totalServers": 3,
  "activeServers": 2,
  "totalRevenue": 2890.50,
  "totalRentals": 45,
  "activeRentals": 12,
  "servers": [
    {
      "serverId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "serverName": "gpu-server-01",
      "serverType": "NVIDIA_A100",
      "status": "Active",
      "totalRevenue": 1550.00,
      "totalRentals": 20,
      "activeRentals": 5,
      "instances": [
        {
          "instanceId": "inst-001-abc123",
          "instanceName": "ml-training-01",
          "totalRevenue": 850.00,
          "totalRentals": 12,
          "activeRentals": 3
        }
      ]
    }
  ]
}
4

Response Field Descriptions

Detailed field documentation

Summary Object

totalEarningsYTD (decimal) Your earnings year-to-date after SLYD's 10% platform fee
slydFeesYTD (decimal) SLYD's 10% platform fee amount year-to-date
grossRevenueYTD (decimal) Total revenue before fees (earnings + fees)
currentMonthEarnings (decimal) Earnings for the current calendar month
availableBalance (decimal) Current available balance in your wallet

Server Revenue Object

serverId (string UUID) Unique identifier for the server
serverName (string) Display name of the server
pricePerHour (decimal) Hourly rate for the server in USD
totalEarnings (decimal) Provider's earnings from this server (after 10% fee)
slydFees (decimal) SLYD's 10% platform fee from this server
grossRevenue (decimal) Total gross revenue from this server
totalHours (decimal) Estimated total hours of usage
5

Error Responses

HTTP error codes and messages

401

Unauthorized

API key is missing or invalid

{
  "error": "Unauthorized",
  "message": "API key authentication required"
}
500

Internal Server Error

Unexpected server error

{
  "error": "An error occurred while retrieving revenue data"
}
6

Code Examples

Python, JavaScript, and cURL examples

import requests
from datetime import datetime, timedelta

API_KEY = "slyd_your_api_key_here"
BASE_URL = "https://slyd.com/api/provider/revenue"

# Get comprehensive revenue data
response = requests.get(
    BASE_URL,
    headers={"X-API-Key": API_KEY}
)

if response.status_code == 200:
    data = response.json()
    print(f"Total earnings YTD: ${data['summary']['totalEarningsYTD']:.2f}")
    print(f"Current month: ${data['summary']['currentMonthEarnings']:.2f}")
    print(f"Available balance: ${data['summary']['availableBalance']:.2f}")

    # Show server breakdown
    for server in data['serverRevenue']:
        print(f"\nServer: {server['serverName']}")
        print(f"  Earnings: ${server['totalEarnings']:.2f}")
        print(f"  SLYD Fees: ${server['slydFees']:.2f}")
        print(f"  Total Hours: {server['totalHours']}")
else:
    print(f"Error: {response.status_code}")

# Get server revenue for specific date range
start_date = (datetime.now() - timedelta(days=30)).isoformat()
end_date = datetime.now().isoformat()

response = requests.get(
    f"{BASE_URL}/servers",
    params={"startDate": start_date, "endDate": end_date},
    headers={"X-API-Key": API_KEY}
)
const axios = require('axios');

const API_KEY = 'slyd_your_api_key_here';
const BASE_URL = 'https://slyd.com/api/provider/revenue';

async function getRevenueData() {
  try {
    const response = await axios.get(BASE_URL, {
      headers: { 'X-API-Key': API_KEY }
    });

    const data = response.data;
    console.log(`Total earnings YTD: $${data.summary.totalEarningsYTD.toFixed(2)}`);
    console.log(`Current month: $${data.summary.currentMonthEarnings.toFixed(2)}`);
    console.log(`Available balance: $${data.summary.availableBalance.toFixed(2)}`);

    // Show server breakdown
    data.serverRevenue.forEach(server => {
      console.log(`\nServer: ${server.serverName}`);
      console.log(`  Earnings: $${server.totalEarnings.toFixed(2)}`);
      console.log(`  SLYD Fees: $${server.slydFees.toFixed(2)}`);
    });
  } catch (error) {
    console.error('Error:', error.response?.status || error.message);
  }
}

async function getServerRevenue(startDate, endDate) {
  const response = await axios.get(`${BASE_URL}/servers`, {
    params: { startDate, endDate },
    headers: { 'X-API-Key': API_KEY }
  });
  return response.data;
}

getRevenueData();
# Get comprehensive revenue data
curl -X GET "https://slyd.com/api/provider/revenue" \
  -H "X-API-Key: slyd_your_api_key_here" \
  | jq '.'

# Get server revenue for last 30 days
curl -X GET "https://slyd.com/api/provider/revenue/servers?startDate=2024-12-01&endDate=2024-12-31" \
  -H "X-API-Key: slyd_your_api_key_here" \
  | jq '.'

# Using Bearer token format
curl -X GET "https://slyd.com/api/provider/revenue" \
  -H "Authorization: Bearer slyd_your_api_key_here" \
  | jq '.'

Important Notes

Key information about the API

Currency All monetary values are in USD
Platform Fee Earnings shown are after SLYD's 10% platform fee
Historical Data Soft-deleted servers are included in historical revenue data
Timezone All date/time values are in UTC
API Keys API keys can be managed in your account settings