Skip to main content

Overview

Per-user; requires Authorization: Bearer nv_sk_…. Naïve owns the cluster and the cloud credentials — your agents never hold a cloud key. A workload has one of three types: service (long-running, optional public URL, scale-to-zero), job (run-to-completion), or schedule (cron/rate — runs the image on a cadence). Routes are available both company-scoped (/v1/compute/..., acting as the account’s default agent profile) and per-user (/v1/users/:user_id/compute/...). Gated by the compute primitive in the user’s AccountKit. Billed by running time (vCPU-seconds + GB-seconds) in credits; a stopped service accrues ~nothing.
POST /v1/compute (create) and POST /v1/compute/:id/exec + POST /v1/compute/:id/shell are approval-gated by default. An agent (API-key) call may return 202 { "status": "pending_approval", "approval_id" }; a human approves it via Approvals and the action runs on replay.

Endpoints

Create body

port (services) exposes a public URL via the compute ALB. If the ALB is not configured (NAIVE_COMPUTE_ALB_LISTENER_ARN / NAIVE_COMPUTE_VPC_ID), create with port returns feature_not_configured (501) — omit port for a headless service. schedule_expr is required for type: "schedule". The image must contain /bin/sh to support exec/shell.

Shell sessions

POST /v1/compute/:id/shell returns a short-lived, task-scoped exec session — { session: { sessionId, streamUrl, tokenValue }, region }. The client connects the WebSocket directly to streamUrl with tokenValue (the CLI’s naive compute ssh does this via the session-manager-plugin). No cloud credentials are returned to the client. Sessions are transcript-logged. See the Compute guide and the SDK sub-client.