Skip to main content

Custom Workloads

Instead of using a preset, you can define arbitrary step DAGs with custom_job in your plan request. The planner handles placement, transfer insertion, and scheduling the same way it does for presets.

Request Structure

Send custom_job instead of preset_id in POST /v1/plan:
{
  "satellite_id": "25544",
  "custom_job": {
    "name": "My Pipeline",
    "steps": [ ... ],
    "security": { ... },
    "policy": { ... }
  }
}

Step Schema

Each step in the steps array:
id
string
required
Unique identifier within the job. Used in depends_on references.
name
string
required
Human-readable step name.
location
string
required
Where the step runs: onboard, ground, or either. When set to either, the planner decides based on data reduction ratio and transfer cost.
duration_s
number
required
Execution duration in seconds. Must be positive.
depends_on
string[]
required
IDs of prerequisite steps. Use [] for steps with no dependencies.
requires
object
required
Resource requirements:
  • power_w — Power consumption in watts
  • compute — Fraction of compute capacity (0.0–1.0)
  • thermal_w — Thermal dissipation in watts
  • memory_mb — Memory required in MB
  • storage_mb — Storage required in MB
input_data_mb
number
default:"0"
Input data size in MB.
output_data_mb
number
default:"0"
Output data size in MB.
data_reduction_ratio
number
Output/input ratio. 0.1 means 10:1 reduction. Set to null for data-generating steps.
checkpoint_interval_s
number
default:"0"
Checkpoint frequency in seconds. 0 disables checkpointing.
retry_policy
string
default:"retry_immediate"
fail, retry_next_window, or retry_immediate.
max_retries
number
default:"1"
Maximum retry attempts.
encryption
string
default:"none"
none, aes128, or aes256. Adds data expansion overhead.
integrity_check
string
default:"none"
none, crc32, or sha256.
degraded_mode
object
default:"null"
Fault tolerance. If set, provide min_data_fraction (0.0–1.0) and reduced_duration_s.

Security Overrides

Optional security object at the job level:
"security": {
  "encryption": "aes256",
  "data_classification": "restricted",
  "require_authenticated_uplink": true,
  "key_rotation_orbits": 24
}
Defaults: AES-256 encryption, restricted classification, authenticated uplink, key rotation every 24 orbits.

Policy

Optional policy object:
"policy": {
  "objective": "balanced",
  "deadline_orbits": 6,
  "max_data_loss_fraction": 0.01,
  "min_delivery_confidence": 0.95
}
FieldOptionsDefault
objectivemin_latency, min_energy, max_reliability, balancedbalanced
deadline_orbitsNumber of orbital periods6
max_data_loss_fraction0.0–1.00.01 (1%)
min_delivery_confidence0.0–1.00.95 (95%)

Validation Rules

  • Every step must have a unique id
  • depends_on references must point to existing step IDs
  • No circular dependencies (validated via DFS)
  • location must be onboard, ground, or either
  • duration_s must be positive
  • requires must include all 5 resource fields
Invalid requests return 400 with a validation_error describing the issue.

Example

A 2-step pipeline: capture sensor data on-board, then process on the ground.
curl -X POST https://rotastellar-cae.subhadip-mitra.workers.dev/v1/plan \
  -H "Content-Type: application/json" \
  -H "Origin: https://rotastellar.com" \
  -d '{
    "satellite_id": "25544",
    "custom_job": {
      "name": "Capture and Process",
      "steps": [
        {
          "id": "capture",
          "name": "Sensor Capture",
          "location": "onboard",
          "duration_s": 30,
          "depends_on": [],
          "requires": {
            "power_w": 40,
            "compute": 0.3,
            "thermal_w": 15,
            "memory_mb": 256,
            "storage_mb": 1024
          },
          "input_data_mb": 0,
          "output_data_mb": 500
        },
        {
          "id": "process",
          "name": "Ground Processing",
          "location": "ground",
          "duration_s": 60,
          "depends_on": ["capture"],
          "requires": {
            "power_w": 100,
            "compute": 1.0,
            "thermal_w": 50,
            "memory_mb": 2048,
            "storage_mb": 2048
          },
          "input_data_mb": 500,
          "output_data_mb": 50,
          "data_reduction_ratio": 0.1
        }
      ]
    }
  }'
The planner automatically inserts transfer steps (downlink/uplink) at space-ground boundaries. Your 2-step job may produce a plan with 3+ segments.