REST API · v0
Stable bearer-auth REST surface. The shapes below are illustrative — full OpenAPI lands at public alpha. Until then, expect minor breaking changes; the version header lets you pin to v0.
X-Compute-API-Version supports v0 today.Authentication
Send the bearer token in the Authorization header. Use either a short-lived OAuth token (tanvrit-compute auth print-token) or an admin-issued PAT for headless workloads.
curl https://api.compute.tanvrit.com/v0/jobs \ -H "Authorization: Bearer $(tanvrit-compute auth print-token)" \ -H "X-Compute-API-Version: v0"
Rate limits
| Plan | Limit | Burst |
|---|---|---|
| Hobby (local only) | n/a (local control plane) | n/a |
| PAYG | 100 req/sec | 200 over 10s |
| Team | 1000 req/sec | 2000 over 10s |
| Enterprise | Custom | Custom |
Jobs
/v0/jobsSubmit a job. Body matches the Job manifest used by `jobs run`.
{
"type": "COMMAND",
"command": "echo hello",
"timeoutSeconds": 30,
"labels": { "arch": "arm64" }
}{
"id": "job_01jt9hello",
"state": "QUEUED",
"createdAt": "2026-04-26T09:13:21Z"
}/v0/jobs/{id}Get a job's current state.
{
"id": "job_01jt9hello",
"state": "SUCCEEDED",
"exitCode": 0,
"runtimeMs": 420,
"agentId": "local-01"
}/v0/jobsList jobs in the active workspace; filter by state, label, time.
/v0/jobs/{id}:cancelCancel a running or queued job. Idempotent.
/v0/jobs/{id}/logsTail the job log buffer; supports `?follow=true` (SSE).
Agents
/v0/agentsList agents registered to the active workspace.
/v0/agents/{id}Get an agent's labels, last heartbeat, current job.
/v0/agents/{id}:drainDrain an agent — finish current jobs, refuse new ones.
/v0/agents/{id}Deregister an agent (requires admin).
Workspaces
/v0/workspacesCreate a workspace. Caller becomes owner.
/v0/workspacesList workspaces the caller has access to.
/v0/workspaces/{id}Update workspace metadata (name, default region).
/v0/workspaces/{id}/membersInvite a member with role owner / admin / member.
/v0/workspaces/{id}/auditQuery the audit log; JSON-Lines export with `?format=jsonl`.
Billing
/v0/billing/usagePer-workspace usage in CPU-seconds, GPU-seconds, GB-seconds.
{
"windowStart": "2026-04-01T00:00:00Z",
"windowEnd": "2026-04-26T00:00:00Z",
"cpuSeconds": 18432,
"gpuSeconds": 0,
"estimateUsd": 0.26
}/v0/billing/invoicesPast invoices (Team / PAYG only).
/v0/billing/limitsRead soft / hard caps configured for the workspace.
/v0/billing/limitsUpdate caps; takes effect at the next meter tick.
Webhooks
/v0/webhooksRegister a webhook; events: job.created, job.transitioned, job.terminal.
/v0/webhooksList configured webhooks for the workspace.
/v0/webhooks/{id}Disable + remove a webhook.
/v0/webhooks/{id}:rotate-secretRotate the HMAC signing secret used by outbound webhook requests.
Stability promise
Once we ship public alpha, v0 freezes for additive changes only. Breaking changes go into v1 with a 90-day deprecation window. See changelog.