{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nicheangle-com/json-schema/nicheangle-com-session-response-schema.json",
  "title": "SessionResponse",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nicheangle-com-openapi.json#/components/schemas/SessionResponse",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "status": {
      "$ref": "#/$defs/SessionStatus"
    },
    "niche_input": {
      "type": "string",
      "title": "Niche Input"
    },
    "target_platforms": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Target Platforms"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "chat_thread_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Chat Thread Id"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At"
    },
    "filed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Filed At"
    },
    "reel_render": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Reel Render"
    },
    "iron": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Iron"
    },
    "niche_profile": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Niche Profile"
    },
    "selected_story": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Selected Story"
    },
    "selected_story_signals": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array",
      "title": "Selected Story Signals",
      "default": []
    },
    "selected_story_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Selected Story Id"
    },
    "selected_angle_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Selected Angle Id"
    },
    "angles": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array",
      "title": "Angles",
      "default": []
    },
    "ranked_stories": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array",
      "title": "Ranked Stories",
      "default": []
    },
    "news_peg": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "News Peg"
    },
    "recommended_story_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Recommended Story Id"
    },
    "recommendation_reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Recommendation Reason"
    },
    "pool_thin_note": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Pool Thin Note"
    },
    "pool_narrow_note": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Pool Narrow Note"
    },
    "credits_spent": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Credits Spent"
    },
    "error_message": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error Message"
    },
    "outcome": {
      "type": "string",
      "title": "Outcome",
      "description": "Finer ending than raw status (N1): complete / expired / interrupted /\ncancelled / failed / running. Lets the archive show a walk-away (a slate\nWAS produced) distinctly from a real error, instead of a blanket 'Failed'.",
      "readOnly": true
    }
  },
  "type": "object",
  "required": [
    "id",
    "status",
    "niche_input",
    "target_platforms",
    "created_at",
    "updated_at",
    "outcome"
  ],
  "$defs": {
    "SessionStatus": {
      "type": "string",
      "enum": [
        "initializing",
        "expanding_niche",
        "planning_search",
        "discovering_signals",
        "clustering",
        "ranking",
        "cp1_awaiting_story",
        "extracting_signal",
        "generating_angles",
        "cp2_awaiting_angle",
        "applying_voice",
        "generating_content",
        "rendering_static",
        "rendering_video",
        "cp3_awaiting_review",
        "awaiting_forge",
        "complete",
        "failed"
      ],
      "title": "SessionStatus"
    }
  }
}