Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.case.dev/llms.txt

Use this file to discover all available pages before exploring further.

Provision a GPU instance for batch OCR, training, inference, or any workload that needs dedicated hardware. Attach one or more vaults at launch and they mount at /mnt/vault/{name}/ — no manual uploads, no long-lived AWS keys. Pricing is per-second with a 1-minute minimum. The pricePerHour on every response already includes the 20% platform fee. Query GET /compute/v1/instance-types for live availability and GET /compute/v1/pricing for a sorted rate sheet.

Launch an instance

curl -X POST https://api.case.dev/compute/v1/instances \
  -H "Authorization: Bearer $CASEDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "ocr-batch",
    "instanceType": "gpu_1x_a10",
    "region": "us-west-1",
    "autoShutdownMinutes": 60,
    "vaultIds": ["<vault_id>"]
  }'
The response includes the instance id, initial status: "booting", and the generated SSH key name. Poll instances.retrieve(id) (any language) until status === "running" and the response includes ssh.privateKey + vaultMounts.setupScript.
Always set autoShutdownMinutes. Instances bill per-second until terminated — auto-shutdown is what saves you from a stalled workload.

After the launch

Boot takes 2–5 minutes. Poll until status === "running", then pull the SSH key and the generated vault-mount script:
RESP=$(curl -s -H "Authorization: Bearer $CASEDEV_API_KEY" \
  https://api.case.dev/compute/v1/instances/<instance_id>)

echo "$RESP" | jq -r '.ssh.privateKey'          > ~/.ssh/case_gpu_key && chmod 600 ~/.ssh/case_gpu_key
echo "$RESP" | jq -r '.vaultMounts.setupScript' > /tmp/setup-vaults.sh && chmod +x /tmp/setup-vaults.sh
IP=$(echo "$RESP" | jq -r '.ip')
SSH in, run the setup script, and your attached vaults mount at /mnt/vault/{vault-name}/:
scp -i ~/.ssh/case_gpu_key /tmp/setup-vaults.sh ubuntu@$IP:~/
ssh -i ~/.ssh/case_gpu_key ubuntu@$IP

# On the VM
./setup-vaults.sh
ls /mnt/vault/
Reads and writes under /mnt/vault/ go through rclone using short-lived, vault-scoped STS credentials — the setup script configures all of that. When you’re done:
curl -X DELETE https://api.case.dev/compute/v1/instances/<instance_id> \
  -H "Authorization: Bearer $CASEDEV_API_KEY"

Credential lifecycle

The setup script contains short-lived AWS STS credentials, not static keys. They’re minted fresh on every GET of the instance via sts:AssumeRoleWithWebIdentity with a SessionPolicy scoped to just your attached vault buckets.
  • 12-hour TTL. After expiry, rclone fails with ExpiredToken. Re-GET the instance for a fresh script and restart the mount.
  • Per-instance scope. Leaked creds can’t reach another instance’s vaults, other S3 buckets, or any non-S3 AWS service.
  • compute:write required to receive the SSH private key and setup script. compute:read keys see instance metadata without that material.
For workloads that run longer than 12 hours, keep autoShutdownMinutes ≤ 720, or script the credential refresh in step 3 against a cron on the VM.

Permissions

ScopeWhat it allows
compute:readList instance types, list your instances, view instance metadata
compute:writeLaunch, terminate, retrieve SSH key + vault setup script