API Reference

May 30, 2026 | 5 min read

Authentication

Most endpoints require a license key in the Authorization header:

Authorization: Bearer PYV-XXXX-XXXX-XXXX

Health & Status

GET /health

Returns API health and version.

curl https://api.pyvorin.com/health

License API

POST /v1/license/check

Validate a license key. The raw key is hashed (SHA-256) before transmission.

POST /v1/license/summary

Get a summary of the stored license.

Compile API

POST /v1/compile

Submit a compile job. Returns a job_id for async polling.

FieldTypeRequiredDescription
sourcestringYes*Raw Python source (only if upload enabled).
workload_hashstringYes*SHA-256 hash of source.
function_namestringNoFunction to compile. Empty = whole module.
backendstringNoDefault: native.
opt_levelintNo0–3. Default: 3.
strictboolNoFail on warnings. Default: false.
bundleobjectNoProject bundle for local imports.

* Either source or workload_hash must be provided.

GET /v1/compile/jobs/{job_id}

Poll compile job status. Status values: queued, compiling, complete, failed, timeout.

GET /v1/compile/jobs

List recent jobs. Query params: limit, status.

GET /v1/artifacts/{artifact_id}/download

Download compiled artifact ZIP.

Usage API

POST /v1/usage/event

Send a usage event. Events are non-billable if correctness_match=false, fallback_used=true, or backend_used != "native".

Response Codes

CodeMeaning
200Success.
202Accepted (compile job queued).
400Bad request.
401Unauthorized.
403Forbidden.
422Unprocessable entity.
429Rate limited.