{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quantifyme-ai/json-schema/quantifyme-ai-one-shot-sse-events-schema.json",
  "title": "OneShotSseEvents",
  "description": "Server-Sent Events stream (text/event-stream). See `description` for event types.",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quantifyme-ai-openapi.json#/components/schemas/OneShotSseEvents",
  "properties": {
    "_event_done": {
      "description": "Event: done. Terminal success.",
      "properties": {
        "channels": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "live_url": {
          "type": "string"
        },
        "model": {
          "type": "string"
        },
        "stem": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "_event_error": {
      "description": "Event: error. Terminal failure: `code` is a fixed word for a program, `message` the sentence for the user; a credit refusal adds credits_remaining, credits_required and top_up_url, a cap or rate refusal retry_after_s.",
      "properties": {
        "code": {
          "type": "string"
        },
        "error": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "_event_step": {
      "description": "Event: step. Coarse progress between phases.",
      "properties": {
        "msg": {
          "type": "string"
        },
        "pct": {
          "type": "integer"
        },
        "stage": {
          "enum": [
            "generate",
            "train",
            "deploy"
          ],
          "type": "string"
        }
      },
      "type": "object"
    },
    "_event_token": {
      "description": "Event: token. Streamed during code generation.",
      "properties": {
        "text": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}