ψ Vikshep

Docs / API

Compute API reference

The Vikshep Compute API accepts physics analysis jobs, returns job IDs for async polling, and streams results as JSON. All endpoints require a Bearer API key issued through your account.

Base URL: https://api.vikshep.dev

Authentication

Include your API key in every request as an HTTP Bearer token:

Authorization: Bearer vsk_your_key_here

Keys begin with vsk_ and are shown once at creation. A revoked or unknown key returns 401 UNKNOWN_KEY or 401 KEY_REVOKED.

Job endpoints

POST /api/jobs — Submit a job

Submit a recipe for execution. Returns immediately with a job ID.

curl -X POST https://api.vikshep.dev/api/jobs \
  -H "Authorization: Bearer vsk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "recipe": "recipe_tag",
    "input": {
      "manifest_path": "/data/manifest.json",
      "label": "is_signal",
      "protect": "jet_mass"
    },
    "gpu_seconds_requested": 120
  }'

Request body:

FieldTypeRequiredDescription
recipestringyesOne of the supported op names (see table below)
inputobjectyesRecipe-specific parameters
gpu_seconds_requestednumbernoRequested budget (default: 60). Clamped to remaining quota.

Response (202 Accepted):

{
  "job_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "queued",
  "recipe": "recipe_tag",
  "message": "Job queued. Poll /api/jobs/[id] for status."
}

GET /api/jobs/[id] — Poll job status

curl https://api.vikshep.dev/api/jobs/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer vsk_your_key"
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "recipe": "recipe_tag",
  "status": "done",
  "result": {
    "output": { "auc": 0.97, "dcorr2": 0.001, ... },
    "wall_clock_seconds": 14.2
  },
  "gpu_seconds_used": 15,
  "queued_at": "2026-09-10T09:00:00Z",
  "finished_at": "2026-09-10T09:00:15Z"
}

status transitions: queued runningdone or failed. Poll every 2–5 seconds.

Supported recipes (CPU mode)

GPU-accelerated scattering ops are pending hardware provisioning. CPU recipe ops are available now.

RecipeStatusRequired input fieldsDescription
ingest_g4availablecsv_path, schema? (default: komal_v1)Ingest Geant4 CSV → manifest.json
recipe_tagavailablemanifest_path, label, protect, weights?, lambda?Particle tagging with DisCo decorrelation
recipe_calibrateavailablemanifest_path, targetDetector calibration regression
scatterGPU pendingWavelet-scattering feature extraction (GPU required)
sw1-graphGPU pendingSW1 graph pipeline (GPU required)

Error vocabulary

Statuserror codeMeaning
401MISSING_KEYNo Authorization header
401UNKNOWN_KEYKey not found in keystore
401KEY_REVOKEDKey has been revoked
402PAYMENT_REQUIREDNo active entitlement or quota exhausted
402TRIAL_BUDGET_EXHAUSTEDTrial GPU-seconds depleted
400UNSUPPORTED_OPRecipe not in CPU allowlist (GPU_PENDING or UNKNOWN_RECIPE)
400MISSING_FIELDRequired request field absent
429QUOTA_EXHAUSTEDPer-org rate limit exceeded
503KV_UNREACHABLEEntitlement cache unavailable; request denied (fail-closed)

Quota semantics

GPU-seconds are billed by actual wall-clock compute time, clamped to the budget requested in the job. Budget is clamped to your remaining quota at submit time — if remaining is 30s and you request 60s, the job runs with a 30s budget (and the job succeeds if it finishes within 30s).

Trial quota: 900 GPU-seconds per verified email, shared across all trial jobs. A running job is allowed to complete when the budget expires; the next submitted job receives 402 TRIAL_BUDGET_EXHAUSTED.