{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/codai-ro/json-schema/codai-ro-studio-export-schema.json",
  "title": "Studio export",
  "description": "An export of a video creative, downloadable once `status` is `succeeded`: an FCPXML zip with `project.fcpxml` and its media (`kind: fcpxml`), or a Lottie JSON / dotLottie file (`kind: lottie`, ready at once).",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/codai-ro-gateway-openapi.yml#/components/schemas/StudioExport",
  "type": "object",
  "required": [
    "id",
    "object",
    "status",
    "creative_id",
    "seq",
    "format",
    "fps",
    "filename",
    "url",
    "expires_at",
    "bytes",
    "rendered_seconds",
    "cost_micro_usd",
    "warnings",
    "error",
    "created_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "object": {
      "type": "string",
      "enum": [
        "studio.export"
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "fcpxml",
        "lottie",
        "carousel_png",
        "carousel_pdf",
        "print_pdf",
        "dawproject"
      ],
      "description": "What was exported: an FCPXML project zip (`export.fcpxml`), a Lottie file (`export.lottie`), a paged build of `POST /v1/studio/creatives/{id}/build`: a carousel PNG zip, a carousel PDF or a print PDF, or a Music Room `.dawproject` (`POST /v1/studio/music-room/{id}/export`)."
    },
    "pages": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Paged builds only: pages in the file; `null` until `succeeded`."
    },
    "boxes": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Print PDF only: TrimBox and BleedBox were written on every page; `null` until `succeeded`."
    },
    "lint": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CreativePrintLintIssue"
      },
      "description": "Paged builds only: prepress issues found at dispatch."
    },
    "container": {
      "type": "string",
      "enum": [
        "json",
        "dotlottie"
      ],
      "description": "Lottie exports only: `json` (Bodymovin JSON, or a zip of JSON files with `formats=all`) or `dotlottie` (a `.lottie` archive)."
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "succeeded",
        "failed"
      ],
      "description": "`queued` and `running` until the zip is uploaded; then `succeeded` or `failed`."
    },
    "creative_id": {
      "type": "string",
      "format": "uuid"
    },
    "seq": {
      "type": "integer",
      "description": "The exported creative version."
    },
    "format": {
      "type": "string",
      "description": "The exported document format id (`all` for a Lottie export with `formats=all`)."
    },
    "fps": {
      "type": "integer",
      "enum": [
        24,
        25,
        30
      ],
      "description": "Frame rate of the project and its segments (the document fps, default 30)."
    },
    "filename": {
      "type": "string",
      "description": "Suggested file name: `<slug of the title>-<format>.fcpxml.zip` (FCPXML), `<slug>-<format>.lottie.json`, `<slug>-<format|all>.lottie` (dotLottie) or `<slug>-lottie.zip` (JSON, all formats)."
    },
    "url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Signed download URL of the zip (attachment, valid 1 h); `null` until `succeeded`."
    },
    "expires_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When `url` expires; `null` until `succeeded`."
    },
    "bytes": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Size of the zip in bytes; `null` until `succeeded`."
    },
    "rendered_seconds": {
      "type": [
        "number",
        "null"
      ],
      "description": "Seconds of video newly rendered for this export (cached segments excluded); `null` until done."
    },
    "cost_micro_usd": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Charge in µUSD (0 when every segment came from the cache); `null` until done."
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Non-fatal problems, e.g. audio assets that were skipped because they are missing or not ready."
    },
    "error": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "description": "Why the export failed (`timeout`, `too_large`, a render error code); `null` otherwise."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "CreativePrintLintIssue": {
      "type": "object",
      "title": "Prepress issue",
      "required": [
        "code",
        "severity",
        "message",
        "target"
      ],
      "properties": {
        "code": {
          "type": "string",
          "description": "`print_in_bleed`, `print_outside_safe`, `print_bleed_short`, `print_low_res`, `print_rgb_color`, `print_text_too_small`, `missing_alt`, `svg_empty`."
        },
        "severity": {
          "type": "string",
          "enum": [
            "error",
            "warning"
          ]
        },
        "message": {
          "type": "string"
        },
        "target": {
          "type": "string",
          "description": "Node or scene id."
        },
        "value": {
          "type": "number",
          "description": "Measured value (pt, dpi, mm) where meaningful."
        },
        "format": {
          "type": "string"
        },
        "fixable": {
          "type": "boolean"
        }
      }
    }
  }
}