{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coppica-com/json-schema/coppica-com-job-status-schema.json",
  "title": "JobStatus",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coppica-com-openapi.yml#/components/schemas/JobStatus",
  "type": "object",
  "properties": {
    "output_id": {
      "type": "string",
      "format": "uuid"
    },
    "bot_type": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "processing",
        "complete",
        "needs_revision",
        "failed",
        "error"
      ]
    },
    "output_text": {
      "type": [
        "string",
        "null"
      ],
      "description": "Null until status is complete."
    },
    "tokens_input": {
      "type": "integer"
    },
    "tokens_output": {
      "type": "integer"
    },
    "credits_spent": {
      "type": [
        "number",
        "null"
      ],
      "description": "Credits consumed by this run. Null until status is complete."
    },
    "intake_completeness": {
      "type": [
        "number",
        "null"
      ],
      "description": "Fraction (0–1) of the 15 intake fields populated."
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  },
  "required": [
    "output_id",
    "bot_type",
    "status"
  ]
}