{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bitbybit-dev/json-schema/bitbybit-dev-task-results-response-schema.json",
  "title": "TaskResultsResponse",
  "description": "Success envelope containing download links for all result formats",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bitbybit-dev-tasks-api-openapi.yml#/components/schemas/TaskResultsResponse",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean",
      "const": true
    },
    "data": {
      "$ref": "#/$defs/TaskResultsDownload"
    }
  },
  "required": [
    "ok",
    "data"
  ],
  "additionalProperties": false,
  "$defs": {
    "TaskResultsDownload": {
      "type": "object",
      "properties": {
        "downloads": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "format": {
                "type": "string",
                "description": "Result format key (e.g. 'glb', 'step', 'metadata')"
              },
              "downloadUrl": {
                "type": "string",
                "description": "Pre-signed URL to download the result file. Expires after 1 hour.",
                "format": "uri"
              },
              "filename": {
                "type": "string",
                "description": "Suggested filename for the download"
              }
            },
            "required": [
              "format",
              "downloadUrl",
              "filename"
            ],
            "additionalProperties": false
          },
          "description": "Download links for all available result formats"
        }
      },
      "required": [
        "downloads"
      ],
      "additionalProperties": false,
      "description": "Download information for all available result formats of a completed task"
    }
  }
}