Quickstart
Make your first successful Power Oracle compute request, handle the 402 challenge, and interpret the response.
Power Oracle is a split-aware work and power analysis API. It turns structured workouts into machine-readable session metrics, split metrics, movement rollups, and denominator notes so software can reason about output instead of relying on scores alone.
What success looks like: you can discover supported movements, send a valid split-aware request, handle the
402challenge with x402 or L402, and understand the response fields that come back.
1. Inspect Supported Movements
Call GET /v1/movements before building a compute payload.
curl https://api.workcapacity.io/v1/movementsThis tells you:
- which movements exist
- which inputs are required
- which alternative inputs are allowed
- which overrides are supported
- which assumptions the compute model uses
Sample fragment:
{
"air_squat": {
"required_inputs": [],
"supported_overrides": ["height_coefficient"]
},
"thruster": {
"required_inputs": [
{
"name": "external_load",
"allowed_units": ["kg", "lb"]
}
]
},
"row": {
"alternative_inputs": [
{
"description": "Provide either rowing distance or displayed calories.",
"options": [
{ "name": "travel_distance", "allowed_units": ["m", "ft"] },
{ "name": "calories", "allowed_units": ["kcal"] }
]
}
]
}
}2. Build A Minimal Split-Aware Request
This example uses distinct movement chunks as separate splits. Top-level duration_seconds is session elapsed time, while each split duration_seconds is active time only.
{
"athlete_uuid": "11111111-1111-1111-1111-111111111111",
"evaluation_context": "completed",
"performed_date": "2026-03-20",
"duration_seconds": 133,
"user": {
"height": { "value": 70, "unit": "in" },
"body_mass": { "value": 180, "unit": "lb" },
"age_years": 35,
"sex": "male"
},
"splits": [
{
"label": "21 thrusters",
"duration_seconds": 33,
"work": {
"movements": [
{
"movement": "thruster",
"reps": 21,
"inputs": {
"external_load": { "value": 95, "unit": "lb" }
},
"spec_overrides": {}
}
]
}
},
{
"label": "21 pull-ups",
"duration_seconds": 27,
"work": {
"movements": [
{
"movement": "pull_up",
"reps": 21,
"spec_overrides": {}
}
]
}
},
{
"label": "15 thrusters",
"duration_seconds": 24,
"work": {
"movements": [
{
"movement": "thruster",
"reps": 15,
"inputs": {
"external_load": { "value": 95, "unit": "lb" }
},
"spec_overrides": {}
}
]
}
},
{
"label": "15 pull-ups",
"duration_seconds": 20,
"work": {
"movements": [
{
"movement": "pull_up",
"reps": 15,
"spec_overrides": {}
}
]
}
}
]
}3. Call The Paid Endpoint
First request:
curl https://api.workcapacity.io/v1/compute-power \
-H 'Content-Type: application/json' \
-d @payload.jsonIn production, POST /v1/compute-power is a paid route. The first response may be:
HTTP/1.1 402 Payment Required
PAYMENT-REQUIRED: <x402 payment requirement payload>
WWW-Authenticate: L402 macaroon="<token>", invoice="<lightning invoice>"4. Pay And Retry
If your client supports x402, send the proof in:
PAYMENT-SIGNATURE: <x402 proof>Successful x402 responses also include:
PAYMENT-RESPONSE: <x402 settlement payload>If your client supports L402, pay the Lightning invoice from WWW-Authenticate and retry with:
Authorization: L402 <token>:<preimage>For the current route price and any revision-route pricing, read GET /v1/payment-requirements or inspect the machine-readable metadata in https://api.workcapacity.io/openapi.json. x402 uses the published USD display price directly. L402 invoices are sats derived from that same USD price using a cached live BTC/USD quote.
5. Read The Response
Small response excerpt:
{
"results": {
"session": {
"duration_seconds": 133,
"active_duration_seconds": 104,
"unattributed_duration_seconds": 29,
"total_work": { "value": 33873.0, "unit": "ft·lbf" },
"average_power_elapsed": { "value": 15281.05, "unit": "ft·lbf/min" },
"average_power_active": { "value": 19542.12, "unit": "ft·lbf/min" }
},
"summary": {
"peak_split_power": { "value": 22295.0, "unit": "ft·lbf/min" },
"min_split_power": { "value": 16065.0, "unit": "ft·lbf/min" },
"power_dropoff_percent": 27.94,
"consistency_score": 85.03
}
},
"notes": [
"Session average power uses full session elapsed time (top-level duration_seconds).",
"Split average power uses split duration_seconds only and excludes rest_seconds_after.",
"Top-level duration_seconds exceeds accounted split time by 29 seconds; that remainder is included in session metrics but not assigned to any split."
]
}Interpretation:
results.sessiontells you how the full session behaved.results.splits[]tells you how each work segment behaved in active time.results.summarytells you whether output stayed steady or dropped off.notesexplains denominator semantics and unattributed duration.
What To Read Next
- Worked Examples: see complete benchmark, interval, and hypothetical planning examples.
- Calling Power Oracle from a Client: use curl, pseudocode, and a minimal Python client for the paid flow.
- Compute Model: learn how to decide splits and avoid denominator mistakes.
