{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/antfly/json-schema/antfly-inference-document-job-schema.json",
  "title": "InferenceDocumentJob",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/antfly-documents-api-openapi.yml#/components/schemas/InferenceDocumentJob",
  "type": "object",
  "required": [
    "id",
    "operation",
    "state",
    "attempt",
    "sequence",
    "expires_at_ms",
    "usage"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "operation": {
      "type": "string",
      "enum": [
        "read",
        "extract"
      ]
    },
    "state": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "succeeded",
        "failed",
        "cancelled"
      ]
    },
    "attempt": {
      "type": "integer",
      "format": "int64"
    },
    "sequence": {
      "type": "integer",
      "format": "int64"
    },
    "expires_at_ms": {
      "type": "integer",
      "format": "int64"
    },
    "usage": {
      "type": "object",
      "additionalProperties": true
    },
    "error": {
      "type": "string"
    }
  }
}