{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/grabbit-live/json-schema/grabbit-live-grab-schema.json",
  "title": "Grab",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/grabbit-live-openapi.json#/components/schemas/Grab",
  "type": "object",
  "properties": {
    "id": {
      "description": "Grab id.",
      "type": "string",
      "format": "uuid"
    },
    "status": {
      "description": "Lifecycle state. Only done grabs have an image_url.",
      "type": "string",
      "enum": [
        "pending",
        "processing",
        "done",
        "failed"
      ]
    },
    "target_url": {
      "description": "The captured URL.",
      "type": "string",
      "format": "uri"
    },
    "image_url": {
      "description": "Hosted image URL once status is done (relative for sk_test_ placeholders).",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "width": {
      "description": "Viewport width in pixels.",
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0
        },
        {
          "type": "null"
        }
      ]
    },
    "height": {
      "description": "Viewport height in pixels (3240 in the response for full_page captures).",
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0
        },
        {
          "type": "null"
        }
      ]
    },
    "format": {
      "description": "Image format.",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "png",
            "jpeg",
            "webp"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "bytes": {
      "description": "Image size in bytes.",
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0
        },
        {
          "type": "null"
        }
      ]
    },
    "execution_ms": {
      "description": "Render time in milliseconds.",
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0
        },
        {
          "type": "null"
        }
      ]
    },
    "error_message": {
      "description": "Why a failed grab failed.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "description": "ISO 8601 creation time.",
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "id",
    "status",
    "created_at"
  ],
  "additionalProperties": {}
}