{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vixdeo-com/json-schema/vixdeo-com-production-detail-schema.json",
  "title": "ProductionDetail",
  "description": "Full status response for ``GET /v1/productions/{id}``.",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vixdeo-com-openapi.json#/components/schemas/ProductionDetail",
  "properties": {
    "production_id": {
      "type": "string",
      "title": "Production Id",
      "description": "Stable identifier for this production."
    },
    "status": {
      "type": "string",
      "title": "Status",
      "description": "`pending` | `running` | `completed` | `failed` | `cancelled`."
    },
    "worker_status": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Worker Status"
    },
    "error_message": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error Message"
    },
    "final_video_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Final Video Url"
    },
    "youtube_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Youtube Url"
    },
    "created_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Created At"
    },
    "started_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Started At"
    },
    "completed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Completed At"
    },
    "steps": {
      "items": {
        "$ref": "#/$defs/ProductionStepOut"
      },
      "type": "array",
      "title": "Steps"
    },
    "cost": {
      "anyOf": [
        {
          "$ref": "#/$defs/ProductionCostOut"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "production_id",
    "status"
  ],
  "$defs": {
    "ProductionCostOut": {
      "properties": {
        "estimated_cost_usd": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Estimated Cost Usd"
        },
        "actual_cost_usd": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Actual Cost Usd"
        },
        "provider_calls": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Provider Calls"
        }
      },
      "additionalProperties": true,
      "type": "object",
      "title": "ProductionCostOut",
      "description": "Cost summary block. Mirrors the keys returned by\n:func:`core.run_manager.get_run_cost_summary`."
    },
    "ProductionStepOut": {
      "properties": {
        "step_name": {
          "type": "string",
          "title": "Step Name"
        },
        "status": {
          "type": "string",
          "title": "Status"
        },
        "started_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Started At"
        },
        "completed_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Completed At"
        },
        "error_message": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Error Message"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "step_name",
        "status"
      ],
      "title": "ProductionStepOut"
    }
  }
}