{
  "openapi": "3.1.0",
  "info": {
    "title": "Batch API",
    "version": "1",
    "description": "Send egocentric videos in batches, follow their jobs, and download the results. The answers that the API sends before it finds a route are listed on the errors page, not under each operation: a 400 with a null code, a 404 for an unknown path, 405, 408, 417 and 431."
  },
  "servers": [{ "url": "https://batch.micro-agi.com" }],
  "security": [{ "bearer": [] }],
  "paths": {
    "/v1/egocentric/batches": {
      "post": {
        "operationId": "createBatch",
        "summary": "Create a batch",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Your own key for this request. A retry with the same key and body gets the same batch.",
            "schema": { "type": "string", "pattern": "^[!-~]{1,255}$" }
          }
        ],
        "requestBody": {
          "required": true,
          "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EgocentricBatchCreate" } } }
        },
        "responses": {
          "202": {
            "description": "The batch was accepted.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Location": { "$ref": "#/components/headers/Location" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EgocentricBatchCreated" } } }
          },
          "400": {
            "description": "The request is not valid.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestError" } } }
          },
          "401": {
            "description": "The API key is missing or not valid.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" } } }
          },
          "403": {
            "description": "The request was sent in clear text, or your organisation is paused.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpsRequiredOrPausedError" } } }
          },
          "409": {
            "description": "The Idempotency-Key was already used with another body.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IdempotencyConflictError" } } }
          },
          "413": {
            "description": "The body is larger than 8 MiB.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestTooLargeError" } } }
          },
          "429": {
            "description": "Too many requests, full processing capacity, or too little credit.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Retry-After": {
                "description": "Seconds to wait before you retry. Absent with insufficient_quota.",
                "schema": { "type": "integer", "minimum": 1, "maximum": 86400 }
              }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubmitLimitError" } } }
          },
          "500": {
            "description": "The server could not complete the request.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServerError" } } }
          },
          "503": {
            "description": "The service is temporarily unavailable, or it is paused for every organisation.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Retry-After": { "$ref": "#/components/headers/RetryAfter" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableOrPausedError" } } }
          }
        }
      },
      "get": {
        "operationId": "listBatches",
        "summary": "List batches",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "The page size.",
            "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 100 }
          },
          {
            "name": "after",
            "in": "query",
            "description": "The last id of the previous page.",
            "schema": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }
          },
          {
            "name": "order",
            "in": "query",
            "description": "desc, the default, lists the newest first.",
            "schema": { "type": "string", "enum": ["asc", "desc"] }
          },
          {
            "name": "created_after",
            "in": "query",
            "description": "Only batches created at or after this time. Send + as %2B.",
            "schema": { "type": "string", "format": "date-time" }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of batches.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchListResponse" } } }
          },
          "400": {
            "description": "The request is not valid.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestError" } } }
          },
          "401": {
            "description": "The API key is missing or not valid.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" } } }
          },
          "403": {
            "description": "The request was sent in clear text.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpsRequiredError" } } }
          },
          "429": {
            "description": "Too many requests.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Retry-After": { "$ref": "#/components/headers/RetryAfter" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" } } }
          },
          "500": {
            "description": "The server could not complete the request.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServerError" } } }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Retry-After": { "$ref": "#/components/headers/RetryAfter" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableError" } } }
          }
        }
      }
    },
    "/v1/egocentric/batches/{batch_id}": {
      "get": {
        "operationId": "getBatch",
        "summary": "Get a batch",
        "parameters": [
          {
            "name": "batch_id",
            "in": "path",
            "required": true,
            "schema": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }
          }
        ],
        "responses": {
          "200": {
            "description": "The batch.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EgocentricBatch" } } }
          },
          "400": {
            "description": "The request is not valid.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestError" } } }
          },
          "401": {
            "description": "The API key is missing or not valid.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" } } }
          },
          "403": {
            "description": "The request was sent in clear text.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpsRequiredError" } } }
          },
          "404": {
            "description": "No batch has this id.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" } } }
          },
          "429": {
            "description": "Too many requests.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Retry-After": { "$ref": "#/components/headers/RetryAfter" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" } } }
          },
          "500": {
            "description": "The server could not complete the request.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServerError" } } }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Retry-After": { "$ref": "#/components/headers/RetryAfter" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableError" } } }
          }
        }
      }
    },
    "/v1/egocentric/batches/{batch_id}/jobs": {
      "get": {
        "operationId": "listBatchJobs",
        "summary": "List the jobs of a batch",
        "parameters": [
          {
            "name": "batch_id",
            "in": "path",
            "required": true,
            "schema": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The page size.",
            "schema": { "type": "integer", "minimum": 1, "maximum": 1000, "default": 100 }
          },
          {
            "name": "after",
            "in": "query",
            "description": "The last id of the previous page.",
            "schema": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of the batch's jobs.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobListResponse" } } }
          },
          "400": {
            "description": "The request is not valid.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestError" } } }
          },
          "401": {
            "description": "The API key is missing or not valid.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" } } }
          },
          "403": {
            "description": "The request was sent in clear text.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpsRequiredError" } } }
          },
          "404": {
            "description": "No batch has this id.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" } } }
          },
          "429": {
            "description": "Too many requests.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Retry-After": { "$ref": "#/components/headers/RetryAfter" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" } } }
          },
          "500": {
            "description": "The server could not complete the request.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServerError" } } }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Retry-After": { "$ref": "#/components/headers/RetryAfter" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableError" } } }
          }
        }
      }
    },
    "/v1/egocentric/batches/{batch_id}/cancel": {
      "post": {
        "operationId": "cancelBatch",
        "summary": "Cancel a batch",
        "description": "Jobs that are queued or submitted fail with the code cancelled. Processing jobs run to their end.",
        "parameters": [
          {
            "name": "batch_id",
            "in": "path",
            "required": true,
            "schema": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }
          }
        ],
        "requestBody": {
          "required": false,
          "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmptyBody" } } }
        },
        "responses": {
          "200": {
            "description": "The batch after the cancel.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EgocentricBatch" } } }
          },
          "400": {
            "description": "The request is not valid.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestError" } } }
          },
          "401": {
            "description": "The API key is missing or not valid.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" } } }
          },
          "403": {
            "description": "The request was sent in clear text.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpsRequiredError" } } }
          },
          "404": {
            "description": "No batch has this id.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" } } }
          },
          "429": {
            "description": "Too many requests.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Retry-After": { "$ref": "#/components/headers/RetryAfter" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" } } }
          },
          "500": {
            "description": "The server could not complete the request.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServerError" } } }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Retry-After": { "$ref": "#/components/headers/RetryAfter" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableError" } } }
          }
        }
      }
    },
    "/v1/egocentric/jobs": {
      "get": {
        "operationId": "listJobs",
        "summary": "List jobs",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "The page size.",
            "schema": { "type": "integer", "minimum": 1, "maximum": 1000, "default": 100 }
          },
          {
            "name": "after",
            "in": "query",
            "description": "The last id of the previous page.",
            "schema": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }
          },
          {
            "name": "order",
            "in": "query",
            "description": "desc, the default, lists the newest first.",
            "schema": { "type": "string", "enum": ["asc", "desc"] }
          },
          {
            "name": "created_after",
            "in": "query",
            "description": "Only jobs created at or after this time. Send + as %2B.",
            "schema": { "type": "string", "format": "date-time" }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of jobs.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobListResponse" } } }
          },
          "400": {
            "description": "The request is not valid.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestError" } } }
          },
          "401": {
            "description": "The API key is missing or not valid.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" } } }
          },
          "403": {
            "description": "The request was sent in clear text.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpsRequiredError" } } }
          },
          "429": {
            "description": "Too many requests.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Retry-After": { "$ref": "#/components/headers/RetryAfter" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" } } }
          },
          "500": {
            "description": "The server could not complete the request.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServerError" } } }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Retry-After": { "$ref": "#/components/headers/RetryAfter" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableError" } } }
          }
        }
      }
    },
    "/v1/egocentric/jobs/{job_id}": {
      "get": {
        "operationId": "getJob",
        "summary": "Get a job",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }
          }
        ],
        "responses": {
          "200": {
            "description": "The job.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EgocentricJob" } } }
          },
          "400": {
            "description": "The request is not valid.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestError" } } }
          },
          "401": {
            "description": "The API key is missing or not valid.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" } } }
          },
          "403": {
            "description": "The request was sent in clear text.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpsRequiredError" } } }
          },
          "404": {
            "description": "No job has this id.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" } } }
          },
          "429": {
            "description": "Too many requests.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Retry-After": { "$ref": "#/components/headers/RetryAfter" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" } } }
          },
          "500": {
            "description": "The server could not complete the request.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServerError" } } }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Retry-After": { "$ref": "#/components/headers/RetryAfter" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableError" } } }
          }
        }
      }
    },
    "/v1/egocentric/jobs/{job_id}/result": {
      "get": {
        "operationId": "getJobResult",
        "summary": "Get the result of a job",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }
          }
        ],
        "responses": {
          "200": {
            "description": "The result of a completed job.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EgocentricResult" } } }
          },
          "400": {
            "description": "The request is not valid.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestError" } } }
          },
          "401": {
            "description": "The API key is missing or not valid.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" } } }
          },
          "403": {
            "description": "The request was sent in clear text.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpsRequiredError" } } }
          },
          "404": {
            "description": "No job has this id.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" } } }
          },
          "409": {
            "description": "The job has not completed, or it failed.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResultUnavailableError" } } }
          },
          "410": {
            "description": "The result expired or was deleted.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResultGoneError" } } }
          },
          "429": {
            "description": "Too many requests.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Retry-After": { "$ref": "#/components/headers/RetryAfter" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" } } }
          },
          "500": {
            "description": "The server could not complete the request.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServerError" } } }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Retry-After": { "$ref": "#/components/headers/RetryAfter" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableError" } } }
          }
        }
      },
      "delete": {
        "operationId": "deleteJobResult",
        "summary": "Delete the result of a job",
        "description": "The result is marked deleted, and its files are removed afterwards. Reads of the result and its files then get 410 with the code result_deleted.",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }
          }
        ],
        "requestBody": {
          "required": false,
          "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmptyBody" } } }
        },
        "responses": {
          "200": {
            "description": "The job after the delete.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EgocentricJob" } } }
          },
          "400": {
            "description": "The request is not valid.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestError" } } }
          },
          "401": {
            "description": "The API key is missing or not valid.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" } } }
          },
          "403": {
            "description": "The request was sent in clear text.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpsRequiredError" } } }
          },
          "404": {
            "description": "No job has this id.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" } } }
          },
          "409": {
            "description": "The job has not finished.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResultUnavailableError" } } }
          },
          "429": {
            "description": "Too many requests.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Retry-After": { "$ref": "#/components/headers/RetryAfter" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" } } }
          },
          "500": {
            "description": "The server could not complete the request.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServerError" } } }
          },
          "503": {
            "description": "The service is temporarily unavailable.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Retry-After": { "$ref": "#/components/headers/RetryAfter" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableError" } } }
          }
        }
      }
    },
    "/v1/egocentric/jobs/{job_id}/files/{file_id}": {
      "get": {
        "operationId": "getJobFileLink",
        "summary": "Get a download link for a result file",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }
          },
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }
          }
        ],
        "responses": {
          "200": {
            "description": "A signed download link.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileLink" } } }
          },
          "400": {
            "description": "The request is not valid.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestError" } } }
          },
          "401": {
            "description": "The API key is missing or not valid.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" } } }
          },
          "403": {
            "description": "The request was sent in clear text, or your organisation is paused.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpsRequiredOrPausedError" } } }
          },
          "404": {
            "description": "No job, or no file of that job, has this id.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" } } }
          },
          "409": {
            "description": "The job has not completed, or it failed.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResultUnavailableError" } } }
          },
          "410": {
            "description": "The result expired or was deleted.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResultGoneError" } } }
          },
          "429": {
            "description": "Too many requests, or too many links for this file in 24 hours.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Retry-After": { "$ref": "#/components/headers/RetryAfter" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" } } }
          },
          "500": {
            "description": "The server could not complete the request.",
            "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServerError" } } }
          },
          "503": {
            "description": "The service is temporarily unavailable, or it is paused for every organisation.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/RequestId" },
              "Retry-After": { "$ref": "#/components/headers/RetryAfter" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableOrPausedError" } } }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key, sent in the header Authorization: Bearer <key>."
      }
    },
    "headers": {
      "RequestId": {
        "description": "The id of this request. Quote it when you ask for help.",
        "required": true,
        "schema": { "type": "string", "pattern": "^req_[0-9a-f]{24}$" }
      },
      "RetryAfter": {
        "description": "Seconds to wait before you retry.",
        "required": true,
        "schema": { "type": "integer", "minimum": 1, "maximum": 86400 }
      },
      "Location": {
        "description": "The path of the new batch.",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^/v1/egocentric/batches/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
        }
      }
    },
    "schemas": {
      "EgocentricBatchCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": ["inputs"],
        "properties": {
          "inputs": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1000,
            "items": { "$ref": "#/components/schemas/EgocentricInput" }
          },
          "depth": { "type": "boolean", "description": "Ask for depth. Every input then needs a camera." },
          "trajectory": {
            "type": "boolean",
            "description": "Ask for the trajectory. It needs depth, and every input then needs imu and operator_height_m."
          },
          "hand_tracking": { "type": "boolean", "const": false, "description": "Not offered. Omit it or send false." },
          "hand_activity": { "type": "boolean", "const": false, "description": "Not offered. Omit it or send false." }
        }
      },
      "EgocentricInput": {
        "type": "object",
        "additionalProperties": false,
        "required": ["type", "video_url"],
        "properties": {
          "type": { "type": "string", "const": "video_url" },
          "video_url": { "$ref": "#/components/schemas/VideoUrl" },
          "filename": {
            "type": "string",
            "pattern": "^(?!\\.\\.?$)[^\\p{Cc}/\\\\]{1,255}$",
            "description": "1 to 255 characters without control characters, slashes or backslashes, and not . or .."
          },
          "sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "description": "The SHA-256 of the video, in lower-case hex. A video with another digest fails its job with the code video_invalid."
          },
          "camera": { "$ref": "#/components/schemas/Camera" },
          "imu": { "$ref": "#/components/schemas/Imu" },
          "operator_height_m": { "type": "number", "minimum": 0.5, "maximum": 3, "description": "The height of the person who wore the camera." }
        }
      },
      "VideoUrl": {
        "type": "object",
        "additionalProperties": false,
        "required": ["url"],
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 4096,
            "pattern": "^[A-Za-z][A-Za-z0-9+.-]*://[!-\\[\\]-~]*$",
            "description": "The https URL of the video. A URL that is not https, or names a user, a port other than 443, an IP address, a host without a dot, a local host or one of the service's own domains, fails its job with the code video_invalid."
          }
        }
      },
      "Camera": {
        "type": "object",
        "additionalProperties": false,
        "description": "Exactly one of profile and intrinsics.",
        "properties": {
          "profile": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9_.-]{0,63}$",
            "description": "The name of a camera profile."
          },
          "intrinsics": { "$ref": "#/components/schemas/Intrinsics" }
        }
      },
      "Intrinsics": {
        "type": "object",
        "additionalProperties": false,
        "description": "Only for an organisation that may state camera intrinsics.",
        "required": ["model", "width", "height", "fx", "fy", "cx", "cy", "distortion", "rotation_deg"],
        "properties": {
          "model": { "type": "string", "enum": ["pinhole", "fisheye"] },
          "width": { "type": "integer", "minimum": 2 },
          "height": { "type": "integer", "minimum": 2 },
          "fx": { "type": "number", "description": "Above 0." },
          "fy": { "type": "number", "description": "Above 0." },
          "cx": { "type": "number", "minimum": 0, "description": "At most width - 1." },
          "cy": { "type": "number", "minimum": 0, "description": "At most height - 1." },
          "distortion": {
            "type": "array",
            "minItems": 4,
            "maxItems": 5,
            "items": { "type": "number" },
            "description": "5 numbers for pinhole, 4 for fisheye."
          },
          "rotation_deg": { "type": "integer", "enum": [0, 90, 180, 270] }
        }
      },
      "Imu": {
        "type": "object",
        "additionalProperties": false,
        "required": ["source", "clock_offset_s", "imu_in_camera"],
        "properties": {
          "source": { "type": "string", "enum": ["csv", "embedded"] },
          "url": {
            "type": "string",
            "maxLength": 4096,
            "pattern": "^[A-Za-z][A-Za-z0-9+.-]*://[!-\\[\\]-~]*$",
            "description": "The https URL of the CSV file. Required when source is csv, refused when it is embedded."
          },
          "clock_offset_s": { "type": "number", "minimum": -3600, "maximum": 3600 },
          "imu_in_camera": { "$ref": "#/components/schemas/ImuInCamera" }
        }
      },
      "ImuInCamera": {
        "type": "object",
        "additionalProperties": false,
        "required": ["rotation", "translation_m"],
        "properties": {
          "rotation": {
            "type": "array",
            "minItems": 3,
            "maxItems": 3,
            "items": { "type": "array", "minItems": 3, "maxItems": 3, "items": { "type": "number" } },
            "description": "A rotation matrix, as 3 rows of 3 numbers."
          },
          "translation_m": {
            "type": "array",
            "minItems": 3,
            "maxItems": 3,
            "items": { "type": "number", "minimum": -10, "maximum": 10 }
          }
        }
      },
      "EgocentricBatch": {
        "type": "object",
        "additionalProperties": false,
        "required": ["object", "id", "job_count", "options", "counts", "done", "created_at", "started_at", "execution_finished_at", "finished_at"],
        "properties": {
          "object": { "type": "string", "const": "egocentric.batch" },
          "id": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" },
          "job_count": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 1000 },
          "options": { "$ref": "#/components/schemas/EgocentricOptionsV1" },
          "counts": { "$ref": "#/components/schemas/JobCounts" },
          "done": { "type": "boolean" },
          "created_at": { "type": "string", "format": "date-time" },
          "started_at": { "type": ["string", "null"], "format": "date-time" },
          "execution_finished_at": { "type": ["string", "null"], "format": "date-time" },
          "finished_at": { "type": ["string", "null"], "format": "date-time" }
        }
      },
      "EgocentricBatchCreated": {
        "type": "object",
        "additionalProperties": false,
        "description": "The batch, with the ids of its jobs in the order of the inputs.",
        "required": [
          "object",
          "id",
          "job_count",
          "options",
          "counts",
          "done",
          "created_at",
          "started_at",
          "execution_finished_at",
          "finished_at",
          "jobs"
        ],
        "properties": {
          "object": { "type": "string", "const": "egocentric.batch" },
          "id": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" },
          "job_count": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 1000 },
          "options": { "$ref": "#/components/schemas/EgocentricOptionsV1" },
          "counts": { "$ref": "#/components/schemas/JobCounts" },
          "done": { "type": "boolean" },
          "created_at": { "type": "string", "format": "date-time" },
          "started_at": { "type": ["string", "null"], "format": "date-time" },
          "execution_finished_at": { "type": ["string", "null"], "format": "date-time" },
          "finished_at": { "type": ["string", "null"], "format": "date-time" },
          "jobs": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1000,
            "items": { "$ref": "#/components/schemas/JobReference" }
          }
        }
      },
      "EgocentricOptionsV1": {
        "type": "object",
        "additionalProperties": false,
        "required": ["hand_tracking", "hand_activity"],
        "properties": {
          "hand_tracking": { "type": "boolean", "const": false },
          "hand_activity": { "type": "boolean", "const": false },
          "depth": { "type": "boolean", "const": true, "description": "Present only when the batch asked for depth." },
          "trajectory": { "type": "boolean", "const": true, "description": "Present only when the batch asked for the trajectory." }
        }
      },
      "JobCounts": {
        "type": "object",
        "additionalProperties": false,
        "required": ["queued", "submitted", "processing", "completed", "failed"],
        "properties": {
          "queued": { "type": "integer", "format": "int64", "minimum": 0 },
          "submitted": { "type": "integer", "format": "int64", "minimum": 0 },
          "processing": { "type": "integer", "format": "int64", "minimum": 0 },
          "completed": { "type": "integer", "format": "int64", "minimum": 0 },
          "failed": { "type": "integer", "format": "int64", "minimum": 0 }
        }
      },
      "JobReference": {
        "type": "object",
        "additionalProperties": false,
        "required": ["id"],
        "properties": {
          "id": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }
        }
      },
      "EgocentricJob": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "id",
          "batch_id",
          "status",
          "input_metadata",
          "error",
          "created_at",
          "started_at",
          "execution_finished_at",
          "finished_at",
          "expires_at",
          "usage"
        ],
        "properties": {
          "object": { "type": "string", "const": "egocentric.job" },
          "id": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" },
          "batch_id": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" },
          "status": { "type": "string", "enum": ["queued", "submitted", "processing", "completed", "failed"] },
          "input_metadata": { "$ref": "#/components/schemas/InputMetadata" },
          "error": { "$ref": "#/components/schemas/JobError" },
          "created_at": { "type": "string", "format": "date-time" },
          "started_at": { "type": ["string", "null"], "format": "date-time" },
          "execution_finished_at": { "type": ["string", "null"], "format": "date-time" },
          "finished_at": { "type": ["string", "null"], "format": "date-time" },
          "expires_at": { "type": ["string", "null"], "format": "date-time", "description": "When the result expires." },
          "usage": { "$ref": "#/components/schemas/JobUsage" }
        }
      },
      "InputMetadata": {
        "type": "object",
        "additionalProperties": false,
        "required": ["filename", "file_extension", "container", "video_codec"],
        "properties": {
          "filename": { "type": ["string", "null"], "description": "The filename the input stated. null without one, and after the result was deleted or removed at its expiry." },
          "file_extension": { "type": ["string", "null"], "description": "The filename's extension, in lower case." },
          "container": { "type": ["string", "null"], "description": "Known once the video was read." },
          "video_codec": { "type": ["string", "null"], "description": "Known once the video was read." }
        }
      },
      "JobError": {
        "type": ["object", "null"],
        "additionalProperties": false,
        "description": "Why the job failed, or null.",
        "required": ["code", "message", "fault", "retryable"],
        "properties": {
          "code": {
            "type": "string",
            "enum": ["video_invalid", "video_unavailable", "camera_data_invalid", "camera_data_unavailable", "cancelled", "deadline_exceeded", "operation_paused", "processing_failed"],
            "description": "The job error code. Later versions may add codes, so read fault and retryable for a code that you do not know."
          },
          "message": { "type": "string" },
          "fault": { "type": "string", "enum": ["user_error", "system_error"] },
          "retryable": { "type": "boolean", "description": "Whether the same input may succeed when you send it again." }
        }
      },
      "JobUsage": {
        "type": "object",
        "additionalProperties": false,
        "required": ["credits_pending_micro"],
        "properties": {
          "credits_pending_micro": { "type": "integer", "format": "int64", "minimum": 0 }
        }
      },
      "EgocentricResult": {
        "type": "object",
        "additionalProperties": false,
        "required": ["object", "job_id", "expires_at", "outputs", "files"],
        "properties": {
          "object": { "type": "string", "const": "egocentric.result" },
          "job_id": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" },
          "expires_at": { "type": "string", "format": "date-time" },
          "spec_version": { "type": "string", "description": "The version of the delivered file's format." },
          "outputs": { "$ref": "#/components/schemas/ResultOutputs" },
          "output_frame": { "$ref": "#/components/schemas/OutputFrame" },
          "files": {
            "type": "array",
            "maxItems": 32,
            "items": { "$ref": "#/components/schemas/ResultFile" }
          }
        }
      },
      "ResultOutputs": {
        "type": "object",
        "additionalProperties": false,
        "required": ["pii_blur", "depth", "trajectory"],
        "properties": {
          "pii_blur": { "type": "string", "const": "completed" },
          "depth": { "type": "string", "enum": ["completed", "failed", "not_requested"] },
          "trajectory": { "type": "string", "enum": ["completed", "failed", "not_requested"] }
        }
      },
      "OutputFrame": {
        "type": "object",
        "additionalProperties": false,
        "description": "The video frames that the results refer to.",
        "required": ["path", "width", "height", "frames", "base_time_ns", "source_start_ns", "first_frame_ns", "last_frame_ns"],
        "properties": {
          "path": { "type": "string", "enum": ["lens", "blur_only"] },
          "width": { "type": "integer", "minimum": 1 },
          "height": { "type": "integer", "minimum": 1 },
          "frames": { "type": "integer", "format": "int64", "minimum": 0 },
          "base_time_ns": { "type": "integer", "format": "int64", "description": "The message time of the first frame." },
          "source_start_ns": { "type": "integer", "format": "int64", "description": "The presentation time of the first frame in your video." },
          "first_frame_ns": { "type": "integer", "format": "int64" },
          "last_frame_ns": { "type": "integer", "format": "int64" }
        }
      },
      "ResultFile": {
        "type": "object",
        "additionalProperties": false,
        "required": ["id", "name", "media_type", "bytes", "sha256", "md5", "outputs"],
        "properties": {
          "id": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" },
          "name": { "type": "string" },
          "media_type": { "type": "string" },
          "bytes": { "type": "integer", "format": "int64", "minimum": 0 },
          "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
          "md5": { "type": "string", "pattern": "^[0-9a-f]{32}$" },
          "outputs": {
            "type": "array",
            "maxItems": 3,
            "items": { "type": "string", "enum": ["pii_blur", "depth", "trajectory"] },
            "description": "The outputs that this file holds."
          }
        }
      },
      "FileLink": {
        "type": "object",
        "additionalProperties": false,
        "required": ["object", "url", "expires_at", "bytes", "sha256"],
        "properties": {
          "object": { "type": "string", "const": "egocentric.file_link" },
          "url": { "type": "string", "pattern": "^https://storage\\.googleapis\\.com/" },
          "expires_at": { "type": "string", "format": "date-time" },
          "bytes": { "type": "integer", "format": "int64", "minimum": 0 },
          "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
        }
      },
      "BatchListResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": ["object", "data", "first_id", "last_id", "has_more"],
        "properties": {
          "object": { "type": "string", "const": "list" },
          "data": { "type": "array", "maxItems": 100, "items": { "$ref": "#/components/schemas/EgocentricBatch" } },
          "first_id": {
            "type": "string",
            "pattern": "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?$",
            "description": "The id of the first item, or an empty string on an empty page."
          },
          "last_id": {
            "type": "string",
            "pattern": "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?$",
            "description": "The id of the last item, or an empty string on an empty page."
          },
          "has_more": { "type": "boolean" }
        }
      },
      "JobListResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": ["object", "data", "first_id", "last_id", "has_more"],
        "properties": {
          "object": { "type": "string", "const": "list" },
          "data": { "type": "array", "maxItems": 1000, "items": { "$ref": "#/components/schemas/EgocentricJob" } },
          "first_id": {
            "type": "string",
            "pattern": "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?$",
            "description": "The id of the first item, or an empty string on an empty page."
          },
          "last_id": {
            "type": "string",
            "pattern": "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?$",
            "description": "The id of the last item, or an empty string on an empty page."
          },
          "has_more": { "type": "boolean" }
        }
      },
      "EmptyBody": {
        "type": "object",
        "additionalProperties": false,
        "description": "Send no body, or {}."
      },
      "InvalidRequestError": {
        "type": "object",
        "additionalProperties": false,
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": ["message", "type", "param", "code"],
            "properties": {
              "message": { "type": "string" },
              "type": { "type": "string", "const": "invalid_request_error" },
              "param": { "type": ["string", "null"], "description": "The body field, header or query parameter that is not valid, or null." },
              "code": { "type": "string", "enum": ["invalid_request_error"] }
            }
          }
        }
      },
      "AuthenticationError": {
        "type": "object",
        "additionalProperties": false,
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": ["message", "type", "param", "code"],
            "properties": {
              "message": { "type": "string" },
              "type": { "type": "string", "const": "authentication_error" },
              "param": { "type": "null" },
              "code": { "type": "string", "enum": ["authentication_error"] }
            }
          }
        }
      },
      "HttpsRequiredError": {
        "type": "object",
        "additionalProperties": false,
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": ["message", "type", "param", "code"],
            "properties": {
              "message": { "type": "string" },
              "type": { "type": "string", "const": "invalid_request_error" },
              "param": { "type": "null" },
              "code": { "type": "string", "enum": ["https_required"] }
            }
          }
        }
      },
      "HttpsRequiredOrPausedError": {
        "type": "object",
        "additionalProperties": false,
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": ["message", "type", "param", "code"],
            "properties": {
              "message": { "type": "string" },
              "type": { "type": "string", "const": "invalid_request_error" },
              "param": { "type": "null" },
              "code": { "type": "string", "enum": ["https_required", "operation_paused"] }
            }
          }
        }
      },
      "NotFoundError": {
        "type": "object",
        "additionalProperties": false,
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": ["message", "type", "param", "code"],
            "properties": {
              "message": { "type": "string" },
              "type": { "type": "string", "const": "invalid_request_error" },
              "param": { "type": "null" },
              "code": { "type": "null", "enum": [null] }
            }
          }
        }
      },
      "IdempotencyConflictError": {
        "type": "object",
        "additionalProperties": false,
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": ["message", "type", "param", "code"],
            "properties": {
              "message": { "type": "string" },
              "type": { "type": "string", "const": "invalid_request_error" },
              "param": { "type": "null" },
              "code": { "type": "string", "enum": ["idempotency_conflict"] }
            }
          }
        }
      },
      "ResultUnavailableError": {
        "type": "object",
        "additionalProperties": false,
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": ["message", "type", "param", "code"],
            "properties": {
              "message": { "type": "string" },
              "type": { "type": "string", "const": "invalid_request_error" },
              "param": { "type": "null" },
              "code": { "type": "string", "enum": ["result_unavailable"] }
            }
          }
        }
      },
      "ResultGoneError": {
        "type": "object",
        "additionalProperties": false,
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": ["message", "type", "param", "code"],
            "properties": {
              "message": { "type": "string" },
              "type": { "type": "string", "const": "invalid_request_error" },
              "param": { "type": "null" },
              "code": { "type": "string", "enum": ["result_expired", "result_deleted"] }
            }
          }
        }
      },
      "RequestTooLargeError": {
        "type": "object",
        "additionalProperties": false,
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": ["message", "type", "param", "code"],
            "properties": {
              "message": { "type": "string" },
              "type": { "type": "string", "const": "invalid_request_error" },
              "param": { "type": "null" },
              "code": { "type": "string", "enum": ["request_too_large"] }
            }
          }
        }
      },
      "RateLimitError": {
        "type": "object",
        "additionalProperties": false,
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": ["message", "type", "param", "code"],
            "properties": {
              "message": { "type": "string" },
              "type": { "type": "string", "const": "rate_limit_error" },
              "param": { "type": "null" },
              "code": { "type": "string", "enum": ["rate_limit_error"] }
            }
          }
        }
      },
      "SubmitLimitError": {
        "type": "object",
        "additionalProperties": false,
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": ["message", "type", "param", "code"],
            "properties": {
              "message": { "type": "string" },
              "type": { "type": "string", "const": "rate_limit_error" },
              "param": { "type": "null" },
              "code": { "type": "string", "enum": ["rate_limit_error", "capacity_exceeded", "insufficient_quota"] }
            }
          }
        }
      },
      "ServerError": {
        "type": "object",
        "additionalProperties": false,
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": ["message", "type", "param", "code"],
            "properties": {
              "message": { "type": "string" },
              "type": { "type": "string", "const": "server_error" },
              "param": { "type": "null" },
              "code": { "type": "string", "enum": ["server_error"] }
            }
          }
        }
      },
      "ServiceUnavailableError": {
        "type": "object",
        "additionalProperties": false,
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": ["message", "type", "param", "code"],
            "properties": {
              "message": { "type": "string" },
              "type": { "type": "string", "const": "server_error" },
              "param": { "type": "null" },
              "code": { "type": "string", "enum": ["service_unavailable"] }
            }
          }
        }
      },
      "ServiceUnavailableOrPausedError": {
        "type": "object",
        "additionalProperties": false,
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": ["message", "type", "param", "code"],
            "properties": {
              "message": { "type": "string" },
              "type": { "type": "string", "const": "server_error" },
              "param": { "type": "null" },
              "code": { "type": "string", "enum": ["service_unavailable", "operation_paused"] }
            }
          }
        }
      }
    }
  }
}
