{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/proteiniq-io/json-schema/proteiniq-io-job-schema.json",
  "title": "Job",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/proteiniq-io-api-openapi.json#/components/schemas/Job",
  "type": "object",
  "required": [
    "id",
    "object",
    "project_id",
    "status",
    "tool",
    "created_at"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "object": {
      "const": "job"
    },
    "project_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": "string"
    },
    "tool": {
      "type": "string"
    },
    "name": {
      "type": [
        "string",
        "null"
      ]
    },
    "credits_used": {
      "type": "number"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "started_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "completed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "progress": {
      "type": [
        "number",
        "null"
      ]
    },
    "execution_time_seconds": {
      "type": [
        "number",
        "null"
      ]
    },
    "error": {
      "type": [
        "string",
        "null"
      ]
    },
    "billing": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string"
        },
        "reserved_credits": {
          "type": [
            "number",
            "null"
          ]
        },
        "final_credits": {
          "type": [
            "number",
            "null"
          ]
        },
        "rate_credits_per_minute": {
          "type": [
            "number",
            "null"
          ]
        },
        "billable_runtime_seconds": {
          "type": [
            "number",
            "null"
          ]
        },
        "outcome": {
          "type": [
            "string",
            "null"
          ]
        },
        "finalized_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "refund_credits": {
          "type": [
            "number",
            "null"
          ]
        },
        "refund_credits_applied_to_team": {
          "type": [
            "number",
            "null"
          ]
        },
        "refund_deferred_to_workflow_run": {
          "type": [
            "boolean",
            "null"
          ]
        }
      }
    },
    "execution": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "package_id": {
          "type": "string"
        },
        "release_id": {
          "type": "string"
        },
        "release_digest": {
          "type": "string"
        },
        "compatibility_version": {
          "type": [
            "integer",
            "null"
          ]
        },
        "scientific_contract_digest": {
          "type": "string"
        },
        "input_digest": {
          "type": "string"
        },
        "settings_digest": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  }
}