SDK CLI

Shell-first quickstart for renter workflows, job submission, and status verification.

Set environment variables

export DCP_RENTER_KEY="dc1-renter-xxxx"
export API_BASE="https://api.dcp.sa"

Check account access

curl "$API_BASE/api/renters/me?key=$DCP_RENTER_KEY"

Expected: renter profile JSON with `renter` object containing email and balance fields.

Submit a sample job (container-aware)

curl -X POST "$API_BASE/api/jobs/submit" \
  -H "Content-Type: application/json" \
  -H "x-renter-key: $DCP_RENTER_KEY" \
  -d &#;{
    "provider_id": ,
    "job_type": "llm_inference",
    "duration_minutes": ,
    "params": {
      "model": "meta-llama/Llama--8B",
      "prompt": "Return the phrase: DCP CLI smoke test"
    }
  }&#;

Expected: response contains `job.job_id`, and `status` as `queued` or `pending` while waiting for dispatch.

Poll job status

curl "$API_BASE/api/jobs/<job_id>/output" -H "x-renter-key: $DCP_RENTER_KEY"

Status lifecycle: `pending` → `queued` → `running` → `completed` (or `failed` / `cancelled`).

Fetch output

curl "$API_BASE/api/jobs/<job_id>/output" -H "x-renter-key: $DCP_RENTER_KEY"

Expected: output payload with `result` object and final settlement-related billing fields.