Skip to main content
After starting a job, poll its status until it reaches a terminal state (Completed or Failed).

Starting a Job

curl -X POST https://api.bedrock.cv/compare \
  -H "Authorization: Bearer sk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"old_id": "blk_01JABCD100", "new_id": "blk_01JABCD200", "type": "Block", "analyze": ["changes"]}'
Response (202 Accepted):
{
  "job_id": "job_01JABCD123",
  "status": "Queued"
}

Polling for Results

curl https://api.bedrock.cv/jobs/job_01JABCD123 \
  -H "Authorization: Bearer sk_xxx"
Response (in progress):
{
  "job_id": "job_01JABCD123",
  "type": "compare",
  "status": "Started",
  "target": {
    "type": "block",
    "id": "blk_01JABCD100"
  },
  "created_at": "2024-01-15T10:00:00Z"
}
Response (completed):
{
  "job_id": "job_01JABCD123",
  "type": "compare",
  "status": "Completed",
  "target": {
    "type": "block",
    "id": "blk_01JABCD100"
  },
  "results": {
    "overlay": {
      "overlay_id": "ovl_01JABCD456",
      "uri": "https://storage.bedrock.cv/overlays/ovl_01JABCD456/combined.png",
      "score": 0.82
    },
    "changes": [
      {
        "category": "addition",
        "description": "New wall partition added in conference room B",
        "bounds": { "x_min": 120, "y_min": 340, "x_max": 320, "y_max": 390 },
        "severity": "significant"
      }
    ]
  },
  "created_at": "2024-01-15T10:00:00Z",
  "completed_at": "2024-01-15T10:01:30Z"
}