{
  "openapi": "3.1.0",
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "info": {
    "title": "ForeverLearning Quest API",
    "version": "2026-12-01",
    "description": "Quest integration contract. Availability requires an activated public publication and an explicit workspace assignment. Create a session, upload files separately, then send opaque attachment_ids in quest on /v1/chat. Omitted posture is Guided on every turn. Validate quest_receipt and final done before treating output as committed. Live successful turns and closeout cost $0.05 each; test mode has 20 lifetime attempts per workspace and stable Quest listing. Internal retry and replay add no customer charge or trial unit. Existing private assignments retain their pinned rates."
  },
  "servers": [
    {
      "url": "https://developers-api.foreverlearning.ai",
      "description": "Production; requires assigned availability"
    },
    {
      "url": "https://developers-api-staging.foreverlearning.ai",
      "description": "Staging"
    }
  ],
  "paths": {
    "/v1/quest/catalog": {
      "get": {
        "operationId": "questCatalog",
        "summary": "Read capabilities and the price pinned to this assignment.",
        "security": [
          {
            "DeveloperKey": []
          }
        ],
        "parameters": [
          {
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Assignment-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FL-API-Version",
            "in": "header",
            "required": false,
            "schema": {
              "const": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Saved result. No generation charge or trial unit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/quest-v1.schema.json#/$defs/Catalog"
                }
              }
            }
          },
          "400": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "401": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "403": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "404": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "409": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "410": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "422": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "429": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "503": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/quest/sessions": {
      "post": {
        "operationId": "questSetup",
        "summary": "Prepare immutable task and learner preferences. No generation, charge or trial attempt.",
        "security": [
          {
            "DeveloperKey": []
          }
        ],
        "parameters": [
          {
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Assignment-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FL-API-Version",
            "in": "header",
            "required": false,
            "schema": {
              "const": "2026-12-01"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "./schemas/quest-v1.schema.json#/$defs/CreateSession"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved result. No generation charge or trial unit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/quest-v1.schema.json#/$defs/Session"
                }
              }
            }
          },
          "400": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "401": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "403": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "404": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "409": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "410": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "422": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "429": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "503": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "questList",
        "summary": "List prepared and saved sessions for this learner.",
        "security": [
          {
            "DeveloperKey": []
          }
        ],
        "parameters": [
          {
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Assignment-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FL-API-Version",
            "in": "header",
            "required": false,
            "schema": {
              "const": "2026-12-01"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Saved result. No generation charge or trial unit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/quest-v1.schema.json#/$defs/SessionList"
                }
              }
            }
          },
          "400": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "401": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "403": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "404": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "409": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "410": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "422": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "429": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "503": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/quest/sessions/{session_id}": {
      "get": {
        "operationId": "questSession",
        "summary": "Read saved setup, status, state and closeout summary.",
        "security": [
          {
            "DeveloperKey": []
          }
        ],
        "parameters": [
          {
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Assignment-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FL-API-Version",
            "in": "header",
            "required": false,
            "schema": {
              "const": "2026-12-01"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Saved result. No generation charge or trial unit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/quest-v1.schema.json#/$defs/Session"
                }
              }
            }
          },
          "400": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "401": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "403": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "404": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "409": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "410": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "422": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "429": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "503": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/quest/sessions/{session_id}/state": {
      "get": {
        "operationId": "questState",
        "summary": "Read the latest committed learning-state projection. Unavailable fields remain null.",
        "security": [
          {
            "DeveloperKey": []
          }
        ],
        "parameters": [
          {
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Assignment-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FL-API-Version",
            "in": "header",
            "required": false,
            "schema": {
              "const": "2026-12-01"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Saved result. No generation charge or trial unit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/quest-v1.schema.json#/$defs/State"
                }
              }
            }
          },
          "400": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "401": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "403": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "404": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "409": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "410": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "422": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "429": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "503": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/quest/sessions/{session_id}/summary": {
      "get": {
        "operationId": "questSummary",
        "summary": "Read the saved closeout summary without regeneration.",
        "security": [
          {
            "DeveloperKey": []
          }
        ],
        "parameters": [
          {
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Assignment-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FL-API-Version",
            "in": "header",
            "required": false,
            "schema": {
              "const": "2026-12-01"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Saved result. No generation charge or trial unit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/quest-v1.schema.json#/$defs/Summary"
                }
              }
            }
          },
          "400": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "401": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "403": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "404": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "409": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "410": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "422": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "429": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "503": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/quest/learners/{user_id}/profile": {
      "get": {
        "operationId": "questProfile",
        "summary": "Read seeded preferences separately from saved observed signals and support history.",
        "security": [
          {
            "DeveloperKey": []
          }
        ],
        "parameters": [
          {
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Assignment-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FL-API-Version",
            "in": "header",
            "required": false,
            "schema": {
              "const": "2026-12-01"
            }
          },
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Saved result. No generation charge or trial unit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/quest-v1.schema.json#/$defs/Profile"
                }
              }
            }
          },
          "400": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "401": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "403": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "404": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "409": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "410": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "422": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "429": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "503": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/quest/data/export": {
      "post": {
        "operationId": "questExport",
        "summary": "Export this learner’s paginated sessions, profile and attachment inventory with data:export scope.",
        "security": [
          {
            "DeveloperKey": []
          }
        ],
        "parameters": [
          {
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Assignment-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FL-API-Version",
            "in": "header",
            "required": false,
            "schema": {
              "const": "2026-12-01"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved result. No generation charge or trial unit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/quest-v1.schema.json#/$defs/Export"
                }
              }
            }
          },
          "400": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "401": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "403": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "404": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "409": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "410": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "422": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "429": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "503": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/quest/data/export/attachments/{attachment_id}": {
      "post": {
        "operationId": "questAttachmentExport",
        "summary": "Export the private uploaded bytes with data:export scope.",
        "security": [
          {
            "DeveloperKey": []
          }
        ],
        "parameters": [
          {
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Assignment-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FL-API-Version",
            "in": "header",
            "required": false,
            "schema": {
              "const": "2026-12-01"
            }
          },
          {
            "name": "attachment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized private bytes. Expiry is fixed at upload and reads do not extend it.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store"
                }
              },
              "X-Content-Type-Options": {
                "schema": {
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "401": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "403": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "404": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "409": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "410": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "422": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "429": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "503": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/quest/attachments": {
      "post": {
        "operationId": "questUpload",
        "summary": "Upload one PNG, JPEG, WebP, UTF-8 text or Markdown file. The opaque handle is scoped to this learner and assignment.",
        "security": [
          {
            "DeveloperKey": []
          }
        ],
        "parameters": [
          {
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Assignment-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FL-API-Version",
            "in": "header",
            "required": false,
            "schema": {
              "const": "2026-12-01"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "./schemas/quest-v1.schema.json#/$defs/Upload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved result. No generation charge or trial unit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/quest-v1.schema.json#/$defs/Attachment"
                }
              }
            }
          },
          "400": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "401": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "403": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "404": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "409": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "410": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "422": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "429": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "503": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          }
        },
        "x-max-body-bytes": 11201196
      }
    },
    "/v1/quest/attachments/{attachment_id}": {
      "get": {
        "operationId": "questAttachment",
        "summary": "Download the private uploaded bytes with sessions:read scope.",
        "security": [
          {
            "DeveloperKey": []
          }
        ],
        "parameters": [
          {
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Assignment-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FL-API-Version",
            "in": "header",
            "required": false,
            "schema": {
              "const": "2026-12-01"
            }
          },
          {
            "name": "attachment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized private bytes. Expiry is fixed at upload and reads do not extend it.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store"
                }
              },
              "X-Content-Type-Options": {
                "schema": {
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "401": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "403": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "404": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "409": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "410": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "422": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "429": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "503": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "questAttachmentDelete",
        "summary": "Idempotently remove uploaded bytes. Existing committed turn receipts remain unchanged.",
        "security": [
          {
            "DeveloperKey": []
          }
        ],
        "parameters": [
          {
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Assignment-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FL-API-Version",
            "in": "header",
            "required": false,
            "schema": {
              "const": "2026-12-01"
            }
          },
          {
            "name": "attachment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Saved result. No generation charge or trial unit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/quest-v1.schema.json#/$defs/AttachmentDelete"
                }
              }
            }
          },
          "400": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "401": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "403": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "404": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "409": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "410": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "422": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "429": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          },
          "503": {
            "description": "Safe operation error. Preserve the original operation identity for retries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas/developer-runtime.schema.json#/$defs/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat": {
      "$ref": "./developer-runtime.openapi.json#/paths/~1v1~1chat"
    },
    "/v1/requests/{request_id}": {
      "$ref": "./developer-runtime.openapi.json#/paths/~1v1~1requests~1{request_id}"
    },
    "/v1/sessions": {
      "$ref": "./developer-runtime.openapi.json#/paths/~1v1~1sessions"
    },
    "/v1/session/status": {
      "$ref": "./developer-runtime.openapi.json#/paths/~1v1~1session~1status"
    },
    "/v1/sessions/{session_id}/history": {
      "$ref": "./developer-runtime.openapi.json#/paths/~1v1~1sessions~1{session_id}~1history"
    },
    "/v1/sessions/{session_id}/end": {
      "$ref": "./developer-runtime.openapi.json#/paths/~1v1~1sessions~1{session_id}~1end"
    },
    "/v1/sessions/{session_id}/discard": {
      "$ref": "./developer-runtime.openapi.json#/paths/~1v1~1sessions~1{session_id}~1discard"
    },
    "/v1/sessions/{session_id}": {
      "$ref": "./developer-runtime.openapi.json#/paths/~1v1~1sessions~1{session_id}"
    },
    "/v1/data/export": {
      "$ref": "./developer-runtime.openapi.json#/paths/~1v1~1data~1export"
    },
    "/v1/data/erase": {
      "$ref": "./developer-runtime.openapi.json#/paths/~1v1~1data~1erase"
    }
  },
  "components": {
    "securitySchemes": {
      "DeveloperKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Scoped server key. Keep it out of browsers and mobile bundles."
      }
    },
    "schemas": {
      "Limits": {
        "$ref": "./schemas/quest-v1.schema.json#/$defs/Limits"
      },
      "Catalog": {
        "$ref": "./schemas/quest-v1.schema.json#/$defs/Catalog"
      },
      "Task": {
        "$ref": "./schemas/quest-v1.schema.json#/$defs/Task"
      },
      "LearnerPreferences": {
        "$ref": "./schemas/quest-v1.schema.json#/$defs/LearnerPreferences"
      },
      "Setup": {
        "$ref": "./schemas/quest-v1.schema.json#/$defs/Setup"
      },
      "CreateSession": {
        "$ref": "./schemas/quest-v1.schema.json#/$defs/CreateSession"
      },
      "Upload": {
        "$ref": "./schemas/quest-v1.schema.json#/$defs/Upload"
      },
      "Attachment": {
        "$ref": "./schemas/quest-v1.schema.json#/$defs/Attachment"
      },
      "Source": {
        "$ref": "./schemas/quest-v1.schema.json#/$defs/Source"
      },
      "Signal": {
        "$ref": "./schemas/quest-v1.schema.json#/$defs/Signal"
      },
      "State": {
        "$ref": "./schemas/quest-v1.schema.json#/$defs/State"
      },
      "Summary": {
        "$ref": "./schemas/quest-v1.schema.json#/$defs/Summary"
      },
      "SupportObservation": {
        "$ref": "./schemas/quest-v1.schema.json#/$defs/SupportObservation"
      },
      "Profile": {
        "$ref": "./schemas/quest-v1.schema.json#/$defs/Profile"
      },
      "Session": {
        "$ref": "./schemas/quest-v1.schema.json#/$defs/Session"
      },
      "SessionList": {
        "$ref": "./schemas/quest-v1.schema.json#/$defs/SessionList"
      },
      "Export": {
        "$ref": "./schemas/quest-v1.schema.json#/$defs/Export"
      },
      "AttachmentDelete": {
        "$ref": "./schemas/quest-v1.schema.json#/$defs/AttachmentDelete"
      }
    }
  }
}
