EdgeCloud Client RPC APIs

Below are the API References for the EdgeCloud Client RPC APIs.

1. Query Status

The GetStatus RPC API allows you to query the current status of the edge cloud client. It returns key information such as the client’s wallet address, hourly rental price, recent deployments and jobs, their associated rewards, and other relevant statistics.

  • Request
curl -X POST -H 'Content-Type: application/json' http://localhost:9545/rpc -d '{
  "jsonrpc": "2.0",
  "method": "edgecloud.GetStatus",
  "params": [],
  "id": 1
}'
  • Response example
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "wallet_address": "0xB00904Db42E522810F4E92B7148Cc2CeDdEe3721",
    "machine_id": "48ebb8e2db254a9f9020e4690863c0f8",
    "connection_status": "complete",
    "price_hr": "2000",
    "recent_deployments": [
      {
        "id": "5b3accfd77cb48ee",
        "start_time": "2025-04-17 23:04:45",
        "end_time": "2025-04-17 23:10:25",
        "price_hr": "1800",
        "reward_usd": "0.017000"
      }
    ],
    "recent_jobs": [
      {
        "id": "infr_rqst_rbwd8inwpaf7hu0rhzua7f",
        "success_time": "2025-04-16T17:00:14.507Z",
        "reward_usd": "0.007000"
      }
    ],
    "current_month_deployments_reward": 0.02309,
    "current_month_jobs_reward": 0.014,
    "current_month_total_reward": 0.03709
  }
}

2. Set Rental Price

The SetPrice RPC API lets you define the hourly rental rate for deployments originating from Theta EdgeCloud GPU node product or dedicated model deployment product. Note that this hourly rate applies only to deployments. For jobs originating from Theta EdgeCloud’s on-demand model API, nodes are rewarded based on the number of model inferences performed. Each inference earns a fixed USD-denominated reward, calculated according to the standard rate of the on-demand API product.

  • Request
curl -X POST -H 'Content-Type: application/json' http://localhost:9545/rpc -d '{
  "jsonrpc": "2.0",
  "method": "edgecloud.SetPrice",
  "params": [{"price_hr": "2000"}],
  "id": 1
}'
  • Response example
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "price_hr": "2000"
  }
}

3. List Deployments

The GetDeployments RPC API lists the recent deployments (from the Theta EdgeCloud GPU node product or dedicated model deployment product) running on the node.

  • Request
curl -X POST -H 'Content-Type: application/json' http://localhost:9545/rpc -d '{
  "jsonrpc": "2.0",
  "method": "edgecloud.GetDeployments",
  "params": [{ "page": 0, "size": 5, "start":"2025-04-01T00:00:00Z", "end":"2025-04-18T00:00:00Z" }],
  "id": 1
}'
  • Response example
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "deployments": [
      {
        "nodeName": "48ebb8e2db254a9f9020e4690863c0f8",
        "resourceId": "5b3accfd77cb48ee",
        "gpuRequest": 1,
        "nodeGpuCount": "1",
        "nodeGpuProduct": "Tesla-T4",
        "startTime": "2025-04-17 23:04:45",
        "stopTime": "2025-04-17 23:10:25",
        "shard": "30",
        "walletAddress": "0xB00904Db42E522810F4E92B7148Cc2CeDdEe3721",
        "memoryRequest": "15239844Ki",
        "cpuRequest": "4",
        "storageRequest": "111321479394",
        "gpuMemory": "15360",
        "priceHr": "1800",
        "reward_usd": 0.017
      }
    ],
    "total_reward_usd": 0.023,
    "total": 4,
    "max_page": 0,
    "page": 0,
    "size": 5,
    "last": true,
    "first": true,
    "start": "2025-04-01T00:00:00Z",
    "end": "2025-04-18T00:00:00Z"
  }
}

4. Listing Jobs

The GetJobs RPC API list the recent jobs (model inferences from the EdgeCloud on-demand model APIs) conducted on the node.

  • Request
curl -X POST -H 'Content-Type: application/json' http://localhost:9545/rpc -d '{
  "jsonrpc": "2.0",
  "method": "edgecloud.GetJobs",
  "params": [{ "page": 0, "size": 2, "start":"2025-04-01T00:00:00Z", "end":"2025-04-18T00:00:00Z" }],
  "id": 1
}'

  • Response example
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "jobs": [
      {
        "id": "infr_rqst_rbwd8inwpaf7hu0rhzua7f",
        "reward_usd": 0.007,
        "node_name": "48ebb8e2db254a9f9020e4690863c0f8",
        "wallet_address": "0xB00904Db42E522810F4E92B7148Cc2CeDdEe3721",
        "create_time": "2025-04-16T17:00:06.450Z",
        "update_time": "2025-04-16T17:00:14.507Z",
        "assigned_time": "2025-04-16T17:00:06.521Z",
        "process_time": "2025-04-16T17:00:06.704Z",
        "success_time": "2025-04-16T17:00:14.507Z",
        "error_message": null,
        "error_time": null
      },
      {
        "id": "infr_rqst_qkk4vii9mz0euabxy07reu",
        "reward_usd": 0.007,
        "node_name": "48ebb8e2db254a9f9020e4690863c0f8",
        "wallet_address": "0xB00904Db42E522810F4E92B7148Cc2CeDdEe3721",
        "create_time": "2025-04-16T16:57:46.954Z",
        "update_time": "2025-04-16T16:58:28.015Z",
        "assigned_time": "2025-04-16T16:58:17.887Z",
        "process_time": "2025-04-16T16:58:17.963Z",
        "success_time": "2025-04-16T16:58:28.015Z",
        "error_message": null,
        "error_time": null
      }
    ],
    "total": 2,
    "max_page": 0,
    "page": 0,
    "size": 2,
    "last": true,
    "first": true,
    "total_reward_usd": 0.014,
    "start": "2025-04-01T00:00:00Z",
    "end": "2025-04-18T00:00:00Z"
  }
}

5. Query Rewards

The GetRewards RPC API returns the job and deployment rewards (USD-denominated) for the specified time range.

  • Request
curl -X POST -H 'Content-Type: application/json' http://localhost:9545/rpc -d '{
  "jsonrpc": "2.0",
  "method": "edgecloud.GetRewards",
  "params": [{ "start": "2025-04-10T00:00:00Z", "end": "2025-04-19T00:00:00Z" }],
  "id": 1
}'

  • Response example
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "deployments_reward_usd": 0.02309,
    "jobs_reward_usd": 0.014,
    "total_reward_usd": 0.03709,
    "start": "2025-04-10T00:00:00Z",
    "end": "2025-04-19T00:00:00Z",
    "wallet_address":"0xB00904Db42E522810F4E92B7148Cc2CeDdEe3721",
    "machine_id": "48ebb8e2db254a9f9020e4690863c0f8"
  }
}