Quick start
Use your API Key and prepare RGB video. Calibration is optional for pinhole or rectified video. All endpoint paths below are relative to this Base URL. Documentation is public; data endpoints require authentication. Ordinary keys access their own data.
https://egoview.alpen-y.top/api/v1Set the environment variable, then check connectivity and current input limits. Request an API Key from the service administrator.
export EGOVIEW_TOKEN="<YOUR_API_KEY>"
curl --fail-with-body https://egoview.alpen-y.top/api/v1/capabilities \
-H "Authorization: Bearer $EGOVIEW_TOKEN"Workflow: normalize calibration (if supplied) → create upload → transfer video → complete upload → submit run → download results. A complete runnable Python example is included below.
Prepare inputs and calibration
| Input | Requirements |
|---|---|
| RGB | mp4 / mov / mkv / avi / webm; at least 8 frames, up to 5,000,000,000 bytes (5 GB) per file. No fixed duration or frame-count limit; no automatic trimming or resampling. |
| Calibration JSON | Up to 64 KiB, from the actual camera at the video resolution. Raw fisheye needs distortion calibration; for pinhole or rectified video, omit camera_K and camera_calibration for monocular RGB reconstruction, or supply real K. |
| IMU | The current workflow does not accept a separate IMU time series. Extrinsics in camera/IMU calibration JSON are different from accelerometer or gyroscope samples. |
| Supported combination | input_layout | Camera fields at upload |
|---|---|---|
| Monocular RGB · No calibration | mono | Omit both camera fields |
| Monocular RGB + calibration | mono | camera_K / camera_calibration |
| Stereo SBS · No calibration | sbs_left | Omit both camera fields |
| Stereo SBS + calibration | sbs_left | camera_calibration (mirohand_stereo_calibration_v1) |
With full stereo calibration, both views produce depth for hand reconstruction. Uncalibrated SBS uses left RGB. Stereo depth requires both camera models and a metric baseline. A single K is rejected. Separate IMU samples are unsupported.
When submitting a run, omit the top-level calibration_policy on POST /runs to use recording settings. Use none to skip saved calibration, or required to use supplied or saved parameters. Uncalibrated input requires pinhole or already rectified video.
input_projection: pinhole, rectified (already undistorted), or fisheye (raw fisheye). input_layout: mono (mono or separate left-eye video), or sbs_left (side-by-side, left eye first).
Without calibration, MiroHand 30K uses fixed preset intrinsics and estimates scale. Each frame’s intrinsics are available as estimated_K in hands.tar.
When supplying calibration, call POST /calibrations/normalize with {"calibration": <calibration object>}; it returns {"calibration": <normalized object>}. No idempotency key is required. These numbers illustrate the fields; replace them with actual calibration:
{
"calibration": {
"model": "opencv_fisheye",
"K": [[900, 0, 960], [0, 900, 540], [0, 0, 1]],
"D": [0.01, -0.001, 0.0, 0.0],
"image_size": [1920, 1080]
}
}For pinhole or rectified input, you can normalize {"K": [[fx,0,cx],[0,fy,cy],[0,0,1]]}. If the result contains only K, upload with camera_K=result.calibration.K; if it includes D or schema, use camera_calibration=result.calibration. Do not submit unconverted native cameras objects.
Check dimension order: mono image_size=[width,height]; stereo image_size_hw=[height,width]. Use per-eye dimensions for SBS; stereo translations are in meters. More formats and stereo conventions →
Upload and submit a run
| Step | Request and response |
|---|---|
| 1 | POST /uploads: send file metadata and optional calibration with an Idempotency-Key. Returns upload_id, upload_url and upload_headers. |
| 2 | PUT raw video bytes to upload_url with exactly upload_headers. Do not attach an API token or cookies, or use multipart/form-data. |
| 3 | POST /uploads/{upload_id}/complete: returns a session_id. Preserve it unchanged for run submission. |
| 4 | POST /runs: send a new Idempotency-Key and the body below. Returns a run_id; 202 means accepted, 200 with reused=true means an existing computation was reused. |
For any input combination, set world_trajectory: true inside params in POST /runs to compute full-video camera and wrist trajectories. It defaults to false. Enabling it adds processing time.
{
"session_id": "<session_id from complete>",
"pipeline": "refine-v10",
"params": {}
}params={} inherits camera parameters from the upload. Required upload metadata: filename, actual byte count size, 64 hexadecimal characters for sha256, content_md5, projection and layout. content_md5 is Base64 of the raw 16-byte MD5 digest, not of a hexadecimal string.
| Identifier | Purpose |
|---|---|
upload_id | Upload status, completion and cancellation. |
session_id | Published input used to create runs; an opaque string, never split or construct it yourself. |
run_id | A computation attempt: status, cancellation, retries and results. |
Complete Python example
Prepare rgb.mp4 and optionally set EGOVIEW_CALIBRATION to a calibration JSON file, set the environment variable above, install the dependency and run. Adjust PROJECTION and LAYOUT to your camera. The example submits a compute run, saves request keys and IDs, and hashes transfers in chunks.
python -m pip install httpx
python egoview-reconstruct.pyShow complete code (97 lines)
import base64, hashlib, json, os, time, uuid
from pathlib import Path
import httpx
BASE = "https://egoview.alpen-y.top/api/v1"
TOKEN = os.environ["EGOVIEW_TOKEN"]
VIDEO = Path("rgb.mp4")
CALIBRATION = os.getenv("EGOVIEW_CALIBRATION")
PROJECTION = "pinhole" # pinhole / rectified / fisheye
LAYOUT = "mono" # mono / sbs_left
def key():
return uuid.uuid4().hex
def call(client, method, path, **kwargs):
response = client.request(method, BASE + path, **kwargs)
response.raise_for_status()
return response.json()
# Hash in chunks so long videos do not need to fit in memory.
sha, md5 = hashlib.sha256(), hashlib.md5()
with VIDEO.open("rb") as source:
for chunk in iter(lambda: source.read(1024 * 1024), b""):
sha.update(chunk)
md5.update(chunk)
# Separate clients: send Bearer credentials only to the API, never to storage.
with httpx.Client(headers={"Authorization": "Bearer " + TOKEN}, timeout=60) as api, \
httpx.Client(timeout=httpx.Timeout(120, connect=15)) as storage:
metadata = {
"filename": VIDEO.name, "size": VIDEO.stat().st_size,
"sha256": sha.hexdigest(),
"content_md5": base64.b64encode(md5.digest()).decode(),
"input_projection": PROJECTION, "input_layout": LAYOUT,
}
if CALIBRATION:
calibration = call(api, "POST", "/calibrations/normalize", json={
"calibration": json.loads(Path(CALIBRATION).read_text(encoding="utf-8-sig"))
})["calibration"]
if "D" in calibration or "schema" in calibration:
metadata["camera_calibration"] = calibration
else:
metadata["camera_K"] = calibration["K"]
upload_key, run_key = key(), key()
# Retain these keys. Reuse the same key and body when retrying a timed-out request.
Path("request-keys.json").write_text(json.dumps({
"upload_key": upload_key, "run_key": run_key
}))
intent = call(api, "POST", "/uploads", json=metadata,
headers={"Idempotency-Key": upload_key})
upload_id = intent["upload_id"]
Path("upload-id.txt").write_text(upload_id)
with VIDEO.open("rb") as source:
response = storage.put(intent["upload_url"],
headers=intent["upload_headers"], content=source)
response.raise_for_status()
session = call(api, "POST", f"/uploads/{upload_id}/complete")
run = call(api, "POST", "/runs", json={
"session_id": session["session_id"], "pipeline": "refine-v10", "params": {}
}, headers={"Idempotency-Key": run_key})
run_id = run["run_id"]
Path("run-id.txt").write_text(run_id)
print("run_id:", run_id)
deadline = time.monotonic() + 3600
while not run["terminal"]:
if time.monotonic() > deadline:
raise TimeoutError(f"Stopped waiting locally; the remote run continues: {run_id}")
time.sleep(5)
run = call(api, "GET", f"/runs/{run_id}")
print(run["state"], run.get("waiting_reason") or "")
if run["state"] != "succeeded":
raise RuntimeError(run.get("error") or run["state"])
manifest = call(api, "GET", f"/runs/{run_id}/artifacts")
output = Path("outputs").resolve()
output.mkdir(exist_ok=True)
for artifact in manifest["artifacts"]:
name = artifact["name"]
target = (output / name).resolve()
if output not in target.parents:
raise ValueError("Invalid artifact path")
signed = call(api, "POST", f"/runs/{run_id}/artifacts/"
+ artifact["artifact_id"] + "/download", json={})
target.parent.mkdir(parents=True, exist_ok=True)
temporary = target.with_name(target.name + ".part")
digest, size = hashlib.sha256(), 0
with storage.stream("GET", signed["url"]) as response:
response.raise_for_status()
with temporary.open("wb") as destination:
for chunk in response.iter_bytes(1024 * 1024):
destination.write(chunk)
digest.update(chunk)
size += len(chunk)
if size != artifact["bytes"] or (artifact["sha256"] and
digest.hexdigest() != artifact["sha256"]):
temporary.unlink(missing_ok=True)
raise ValueError("Download verification failed: " + name)
temporary.replace(target)
print("Saved:", name)Get and use results
Poll GET /runs/{run_id} every 5 seconds. Use terminal to detect completion; only state="succeeded" means success. This response excerpt shows the fields needed for integration:
{"run_id":"<run_id>","state":"succeeded","terminal":true,"error":null}After success, call GET /runs/{run_id}/artifacts. For each listed artifact_id, call POST /runs/{run_id}/artifacts/{artifact_id}/download with {"ttl_seconds":900}. The response includes url and expires_at; GET it using a client without API credentials and verify size and SHA-256. Renew expired links without recomputing.
{"run_id":"<run_id>","artifacts":[{
"artifact_id":"<artifact_id>","name":"hand_camera.npz",
"bytes":123456,"sha256":"<file SHA-256>"
}]}All four combinations return overlay.mp4, camera-space hands in hand_camera.npz, chunks in hands.tar, and the frame index index.sqlite3. Calibrated SBS also returns per-frame metric depth in depth.tar.
With world trajectories enabled, camera_trajectory.csv has one row per frame and wrist_trajectories.csv has one row per wrist per frame. Coordinates are in metres relative to the first camera. Filter observations using valid. NPZ trajectories, world joints and meshes are also included.
With trajectories enabled, p5_hand_reference.npz contains 21 smoothed world joints per hand. p5_wrist_trajectories.csv and its NPZ counterpart contain smoothed wrists. Original joints, camera trajectories, MANO meshes and video overlays remain available.
Reading geometry
Geometry is in the left-camera coordinate frame, in meters with estimated scale for uncalibrated input. Each frame has two hand slots: 0=left, 1=right. N is the frame count in this file. Use only slots with valid=true; finite values alone do not establish a valid observation.
| NPZ field | Shape / type | Meaning |
|---|---|---|
valid | (N, 2) · bool | Geometry validity mask. |
joints_camera_m | (N, 2, 21, 3) · float32 | Camera coordinates of 21 joints. |
vertices_camera_m | (N, 2, 778, 3) · float32 | 778 hand mesh vertices. |
timestamps_s | (N,) · float64 | Source-video timestamps, in seconds. |
frame_ids | (N,) · int64 | Global source frame IDs in long-video chunks; absent in short-video NPZ, whose rows follow source-frame order. |
Read long videos chunk by chunk instead of concatenating every mesh in memory. Additional arrays and chunk-reading example →
FAQ and recovery
Can a timed-out request create duplicate work?
Creating uploads, runs, batches and execution retries requires an Idempotency-Key (8–128 printable ASCII characters). After a network timeout, resend the same key and same body; do not rerun the entire script blindly. Reusing a key with different content returns 409. Save upload_id / run_id; a replay can contain an older state, so query current status.
What if a video transfer is interrupted?
Query GET /uploads/{upload_id}; if bytes may have arrived, retry complete. Each key allows two pending uploads. PUT links last 15 minutes, followed by a 1-hour completion grace period. If a link expired before a successful PUT, cancel that upload and create another with a new key. Byte-level resumable uploads are unavailable. Completion checks size and metadata; actual hashing and decoding are validated before computation.
How do waiting, cancellation and retries work?
States normally follow queued → claimed → downloading → running → uploading → succeeded, with failed or cancelled as alternatives. Check waiting_reason while queued; progress does not guarantee a completion time. Stopping local polling does not cancel a remote run. Use POST /runs/{run_id}/cancel and wait for a terminal state. Use POST /runs/{run_id}/retry with a new idempotency key to create a new attempt after failure; previous outputs are preserved.
How should errors be handled?
{"error":{"code":"invalid_request","message":"…","retryable":false,"request_id":"…"}}401: check the key; 403: insufficient permission; 404: missing or inaccessible resource; 409: state or idempotency conflict; 410: artifacts were moved to Trash; 413: limit exceeded; 422: check format and parameters; 429: back off per Retry-After. For 5xx, retain X-Request-ID and follow idempotency rules. JSON requests are limited to 256 KiB; videos use direct signed transfers.