{
  "openapi": "3.1.0",
  "info": {
    "title": "Artifact storage",
    "version": "2026-10-22",
    "description": "Private, immutable artifacts for agents. Your backend or browser uploads files directly to S3, and authorized clients download them with short-lived presigned URLs, and Motor manages metadata, checksum verification, expiry, billing, and deletion. Uploads up to 8 MiB use one `PUT`; larger files upload in resumable parts, up to 10,000 parts of 5 GiB. Completion verifies SHA-256 checksums before an artifact is `ready`. Download URLs are reusable bearer credentials until they expire, and their observed usage is billed later, from S3's server access logs.\n\nEvery mutating request needs an `Idempotency-Key`, and endpoints that require `If-Match` need the current resource ETag in quotes. Asynchronous work returns an operation to poll. Rates: $0.04 per GB-month of storage, metered while an artifact is stored, with a 128 KiB minimum; $30 per million writes; $3 per million reads; $0.18 per GB delivered. Creating a download URL costs one read, and each download with it costs another read."
  },
  "servers": [
    {
      "url": "https://api.motor.dev/artifact_storage"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "tags": [
    {
      "name": "Uploads",
      "description": "Upload sessions and their presigned URLs."
    },
    {
      "name": "Artifacts",
      "description": "Ready artifacts: labels, expiry, billing keys, and deletion."
    },
    {
      "name": "Grants",
      "description": "Presigned download URLs and their observed usage."
    },
    {
      "name": "Operations",
      "description": "Operations that run in the background. Poll their status to check completion."
    },
    {
      "name": "Limits and pricing",
      "description": "Rates, sizes, and estimates."
    }
  ],
  "paths": {
    "/uploads": {
      "post": {
        "operationId": "createUpload",
        "tags": [
          "Uploads"
        ],
        "summary": "Create an upload",
        "description": "Costs one write, and returns the upload. The artifact's storage is metered once it's ready. A single upload of at most 8 MiB returns its presigned `PUT` in `grant`: send the bytes straight to S3 with every header of `required_headers`, then complete the upload. A larger upload is multipart: register each part to get its URL. If Motor can't immediately confirm multipart creation at S3, the response is `202` with an operation, and the upload's `provider_state` is `creating` until a reconciliation finishes it. Costs one write. Storage is metered for `max(size, 128 KiB)` bytes while the artifact is ready.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadCreate"
              },
              "example": {
                "size_bytes": 3,
                "content_type": "text/plain",
                "filename": "result.txt",
                "sha256": "ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0=",
                "expires_at": "2026-10-24T09:00:00Z",
                "run_id": "run_42",
                "metadata": {
                  "stage": "final"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The upload, with its first `PUT` for a single upload.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "description": "The URL of the new resource.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Upload"
                },
                "example": {
                  "id": "aup_5dMQVQFzdmYHPBV3rcQ25H",
                  "object": "upload",
                  "artifact_id": "art_MAhBep7JB6wMAsAY63cEPM",
                  "status": "open",
                  "transport": "single",
                  "size_bytes": 3,
                  "part_size_bytes": 3,
                  "part_count": 1,
                  "content_type": "text/plain",
                  "provider_state": "ready",
                  "observed_at": null,
                  "operation_id": null,
                  "expires_at": "2026-10-18T09:00:00.000Z",
                  "artifact_expires_at": "2026-10-24T09:00:00.000Z",
                  "last_url_expires_at": "2026-10-17T09:01:00.000Z",
                  "version": "1",
                  "etag": "aup_5dMQVQFzdmYHPBV3rcQ25H:1",
                  "created_at": "2026-10-17T09:00:00.000Z",
                  "completed_at": null,
                  "grant": {
                    "id": "agr_4m6yyjwaqkpJfPwCB62bV2",
                    "object": "grant",
                    "method": "PUT",
                    "url": "https://motor-galadriel-blobs-prod.s3.us-east-1.amazonaws.com/artifact_storage/content/42/art_MAhBep7JB6wMAsAY63cEPM/body?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20261017%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20261017T090000Z&X-Amz-Expires=60&X-Amz-SignedHeaders=content-length%3Bcontent-type%3Bhost%3Bif-none-match%3Bx-amz-checksum-sha256%3Bx-amz-server-side-encryption&x-motor-grant=agr_4m6yyjwaqkpJfPwCB62bV2&X-Amz-Signature=5b1f6c3e0a8d4e2f9c7b1a0d3e6f8a2b4c6d8e0f1a3b5c7d9e1f3a5b7c9d1e3f",
                    "required_headers": {
                      "content-length": "3",
                      "content-type": "text/plain",
                      "if-none-match": "*",
                      "x-amz-checksum-sha256": "ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0=",
                      "x-amz-server-side-encryption": "AES256"
                    },
                    "expires_at": "2026-10-17T09:01:00.000Z",
                    "size_bytes": 3,
                    "part_number": 1
                  },
                  "operation": null,
                  "cost": {
                    "rate_version": "2026-10-22",
                    "charged_usd": "0.00003",
                    "meter_quantities": {
                      "writes": 1,
                      "reads": 0,
                      "storage_byte_days": 0,
                      "delivery_bytes": 0
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "A multipart upload that Motor is still creating at S3. Poll the upload or the operation.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "description": "The URL of the new resource.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Upload"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/uploads/{upload_id}": {
      "get": {
        "operationId": "getUpload",
        "tags": [
          "Uploads"
        ],
        "summary": "Get an upload",
        "description": "Returns the upload's state, without any URL. Costs one read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/UploadId"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "responses": {
          "200": {
            "description": "The upload.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "`0.000003`: one read.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Upload"
                },
                "example": {
                  "id": "aup_5dMQVQFzdmYHPBV3rcQ25H",
                  "object": "upload",
                  "artifact_id": "art_MAhBep7JB6wMAsAY63cEPM",
                  "status": "open",
                  "transport": "single",
                  "size_bytes": 3,
                  "part_size_bytes": 3,
                  "part_count": 1,
                  "content_type": "text/plain",
                  "provider_state": "ready",
                  "observed_at": null,
                  "operation_id": null,
                  "expires_at": "2026-10-18T09:00:00.000Z",
                  "artifact_expires_at": "2026-10-24T09:00:00.000Z",
                  "last_url_expires_at": "2026-10-17T09:01:00.000Z",
                  "version": "1",
                  "etag": "aup_5dMQVQFzdmYHPBV3rcQ25H:1",
                  "created_at": "2026-10-17T09:00:00.000Z",
                  "completed_at": null,
                  "parts_registered": 1,
                  "active_grants": 1
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/uploads/{upload_id}/parts": {
      "post": {
        "operationId": "createPartGrant",
        "tags": [
          "Uploads"
        ],
        "summary": "Register a part and get its URL",
        "description": "Registers a part's immutable length and SHA-256 and returns a presigned `UploadPart` for it. Parts can go in any order and in parallel; we suggest at most 8 at once. A replacement URL must use the part's original length and checksum. For a single upload, part 1 reissues its `PUT`. Each newly issued upload URL costs one write, even if unused. Replaying the same idempotent request doesn't add a charge. It advances the upload's version, so read the upload again before you complete or abort it.",
        "parameters": [
          {
            "$ref": "#/components/parameters/UploadId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartGrantCreate"
              },
              "example": {
                "part_number": 3,
                "size_bytes": 3222784,
                "sha256": "LXEWQrcmsEQBYnyp+6wy9chTD7GQPMTbAiWHF5IaSIE=",
                "lifetime_seconds": 300
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The part's presigned URL.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "`0.00003`: one write.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartGrant"
                },
                "example": {
                  "object": "upload_part_grant",
                  "upload_id": "aup_5dMQVQFzdmYHPBV3rcQ25H",
                  "part": {
                    "number": 1,
                    "size_bytes": 3,
                    "sha256": "ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0="
                  },
                  "grant": {
                    "id": "agr_8iXoRA7o4TbZV8Q671iCTJ",
                    "object": "grant",
                    "method": "PUT",
                    "url": "https://motor-galadriel-blobs-prod.s3.us-east-1.amazonaws.com/artifact_storage/content/42/art_MAhBep7JB6wMAsAY63cEPM/body?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20261017%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20261017T090000Z&X-Amz-Expires=60&X-Amz-SignedHeaders=content-length%3Bcontent-type%3Bhost%3Bif-none-match%3Bx-amz-checksum-sha256%3Bx-amz-server-side-encryption&x-motor-grant=agr_8iXoRA7o4TbZV8Q671iCTJ&X-Amz-Signature=5b1f6c3e0a8d4e2f9c7b1a0d3e6f8a2b4c6d8e0f1a3b5c7d9e1f3a5b7c9d1e3f",
                    "required_headers": {
                      "content-length": "3",
                      "content-type": "text/plain",
                      "if-none-match": "*",
                      "x-amz-checksum-sha256": "ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0=",
                      "x-amz-server-side-encryption": "AES256"
                    },
                    "expires_at": "2026-10-17T09:01:00.000Z",
                    "size_bytes": 3,
                    "part_number": 1
                  },
                  "cost": {
                    "rate_version": "2026-10-22",
                    "charged_usd": "0.00003",
                    "meter_quantities": {
                      "writes": 1,
                      "reads": 0,
                      "storage_byte_days": 0,
                      "delivery_bytes": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "410": {
            "$ref": "#/components/responses/Gone"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      },
      "get": {
        "operationId": "listUploadParts",
        "tags": [
          "Uploads"
        ],
        "summary": "List an upload's parts",
        "description": "Returns the registered parts in order, with what S3 reported at the last reconciliation. After a crash, reconcile the upload and wait for that operation to succeed, then upload any missing parts. Costs one read for each page.",
        "parameters": [
          {
            "$ref": "#/components/parameters/UploadId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of parts.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "`0.000003`: one read.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartList"
                },
                "example": {
                  "data": [
                    {
                      "number": 1,
                      "size_bytes": 3,
                      "sha256": "ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0=",
                      "observed": null,
                      "last_grant_id": "agr_8iXoRA7o4TbZV8Q671iCTJ"
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null,
                  "observed_at": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/uploads/{upload_id}/reconcile": {
      "post": {
        "operationId": "reconcileUpload",
        "tags": [
          "Uploads"
        ],
        "summary": "Reconcile an upload with S3",
        "description": "Checks S3 for the parts and bytes already uploaded. A pending reconciliation, or one that observed the upload in the last 60 seconds, is returned instead of a new one. Included in the upload's price.",
        "parameters": [
          {
            "$ref": "#/components/parameters/UploadId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              },
              "example": {}
            }
          }
        },
        "responses": {
          "202": {
            "description": "The reconciliation.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                },
                "example": {
                  "id": "aop_VrECHafG8pjo1mGQYQFGnN",
                  "object": "operation",
                  "kind": "reconcile",
                  "status": "pending",
                  "phase": "observe",
                  "artifact_id": "art_MAhBep7JB6wMAsAY63cEPM",
                  "upload_id": "aup_5dMQVQFzdmYHPBV3rcQ25H",
                  "retryable": false,
                  "error": null,
                  "cost": {
                    "rate_version": "2026-10-22",
                    "charged_usd": "0.00",
                    "meter_quantities": {
                      "writes": 0,
                      "reads": 0,
                      "storage_byte_days": 0,
                      "delivery_bytes": 0
                    }
                  },
                  "usage_reporting": "delayed",
                  "deadline_at": "2026-10-18T09:00:00.000Z",
                  "created_at": "2026-10-17T09:00:00.000Z",
                  "updated_at": "2026-10-17T09:00:00.000Z",
                  "finished_at": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/uploads/{upload_id}/complete": {
      "post": {
        "operationId": "completeUpload",
        "tags": [
          "Uploads"
        ],
        "summary": "Complete an upload",
        "description": "Freezes the manifest and starts verification: Motor reads the object's checksum at S3 (after completing the multipart upload) and publishes the artifact as `ready`. Poll the operation, and use the artifact only after it's `ready`. Bytes that didn't arrive fail the operation as retryable and reopen the upload. Included in the upload's price.",
        "parameters": [
          {
            "$ref": "#/components/parameters/UploadId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              },
              "example": {}
            }
          }
        },
        "responses": {
          "202": {
            "description": "The verification, and the upload.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Completion"
                },
                "example": {
                  "operation": {
                    "id": "aop_QD8pYT1vdYyMTDkDWgKPM1",
                    "object": "operation",
                    "kind": "finalize",
                    "status": "pending",
                    "phase": "verify",
                    "artifact_id": "art_MAhBep7JB6wMAsAY63cEPM",
                    "upload_id": "aup_5dMQVQFzdmYHPBV3rcQ25H",
                    "retryable": false,
                    "error": null,
                    "cost": {
                      "rate_version": "2026-10-22",
                      "charged_usd": "0.00",
                      "meter_quantities": {
                        "writes": 0,
                        "reads": 0,
                        "storage_byte_days": 0,
                        "delivery_bytes": 0
                      }
                    },
                    "usage_reporting": "delayed",
                    "deadline_at": "2026-10-18T09:00:01.000Z",
                    "created_at": "2026-10-17T09:00:01.000Z",
                    "updated_at": "2026-10-17T09:00:01.000Z",
                    "finished_at": null
                  },
                  "artifact_id": "art_MAhBep7JB6wMAsAY63cEPM",
                  "upload": {
                    "id": "aup_5dMQVQFzdmYHPBV3rcQ25H",
                    "object": "upload",
                    "artifact_id": "art_MAhBep7JB6wMAsAY63cEPM",
                    "status": "completing",
                    "transport": "single",
                    "size_bytes": 3,
                    "part_size_bytes": 3,
                    "part_count": 1,
                    "content_type": "text/plain",
                    "provider_state": "ready",
                    "observed_at": "2026-10-17T09:00:01.000Z",
                    "operation_id": "aop_QD8pYT1vdYyMTDkDWgKPM1",
                    "expires_at": "2026-10-18T09:00:00.000Z",
                    "artifact_expires_at": "2026-10-24T09:00:00.000Z",
                    "last_url_expires_at": "2026-10-17T09:01:00.000Z",
                    "version": "3",
                    "etag": "aup_5dMQVQFzdmYHPBV3rcQ25H:3",
                    "created_at": "2026-10-17T09:00:00.000Z",
                    "completed_at": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "410": {
            "$ref": "#/components/responses/Gone"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "428": {
            "$ref": "#/components/responses/PreconditionRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/uploads/{upload_id}/abort": {
      "post": {
        "operationId": "abortUpload",
        "tags": [
          "Uploads"
        ],
        "summary": "Abort an upload",
        "description": "Stops new URLs and starts the erasure of whatever S3 received. Included in the upload's price.",
        "parameters": [
          {
            "$ref": "#/components/parameters/UploadId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              },
              "example": {}
            }
          }
        },
        "responses": {
          "202": {
            "description": "The erasure, and the upload.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Completion"
                },
                "example": {
                  "operation": {
                    "id": "aop_76NR3WaFxkBv4QpNZnjkGS",
                    "object": "operation",
                    "kind": "abort",
                    "status": "pending",
                    "phase": "uploads",
                    "artifact_id": "art_9zugjD6c5aeRNXzv5SvUmP",
                    "upload_id": "aup_BS2XfdVt7An32SmNKxunJh",
                    "retryable": false,
                    "error": null,
                    "cost": {
                      "rate_version": "2026-10-22",
                      "charged_usd": "0.00",
                      "meter_quantities": {
                        "writes": 0,
                        "reads": 0,
                        "storage_byte_days": 0,
                        "delivery_bytes": 0
                      }
                    },
                    "usage_reporting": "delayed",
                    "deadline_at": "2026-10-18T09:00:12.000Z",
                    "created_at": "2026-10-17T09:00:12.000Z",
                    "updated_at": "2026-10-17T09:00:12.000Z",
                    "finished_at": null
                  },
                  "artifact_id": "art_9zugjD6c5aeRNXzv5SvUmP",
                  "upload": {
                    "id": "aup_BS2XfdVt7An32SmNKxunJh",
                    "object": "upload",
                    "artifact_id": "art_9zugjD6c5aeRNXzv5SvUmP",
                    "status": "aborted",
                    "transport": "multipart",
                    "size_bytes": 20000000,
                    "part_size_bytes": 8388608,
                    "part_count": 3,
                    "content_type": "application/zip",
                    "provider_state": "ready",
                    "observed_at": "2026-10-17T09:00:11.000Z",
                    "operation_id": "aop_76NR3WaFxkBv4QpNZnjkGS",
                    "expires_at": "2026-10-18T09:00:11.000Z",
                    "artifact_expires_at": "2026-10-24T09:00:00.000Z",
                    "last_url_expires_at": "2026-10-17T09:05:11.000Z",
                    "version": "4",
                    "etag": "aup_BS2XfdVt7An32SmNKxunJh:4",
                    "created_at": "2026-10-17T09:00:11.000Z",
                    "completed_at": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "410": {
            "$ref": "#/components/responses/Gone"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "428": {
            "$ref": "#/components/responses/PreconditionRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/artifacts": {
      "get": {
        "operationId": "listArtifacts",
        "tags": [
          "Artifacts"
        ],
        "summary": "List artifacts",
        "description": "Artifacts newest first. Without `status`, artifacts in `deleting` or `deleted` state are excluded. Pagination is live, not a snapshot. Costs one read for each page.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "uploading",
                "verifying",
                "ready",
                "deleting",
                "deleted",
                "failed",
                "expired",
                "aborted"
              ]
            }
          },
          {
            "name": "run_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner_service",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_after",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Time"
            }
          },
          {
            "name": "created_before",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Time"
            }
          },
          {
            "name": "metadata_key",
            "in": "query",
            "required": false,
            "description": "With `metadata_value`: an exact match of one metadata pair.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "metadata_value",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of artifacts.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "`0.000003`: one read.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactList"
                },
                "example": {
                  "data": [
                    {
                      "id": "art_MAhBep7JB6wMAsAY63cEPM",
                      "object": "artifact",
                      "status": "ready",
                      "size_bytes": 3,
                      "billable_bytes": 131072,
                      "content_type": "text/plain",
                      "filename": "result.txt",
                      "checksum": {
                        "algorithm": "SHA256",
                        "type": "FULL_OBJECT",
                        "value": "ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0=",
                        "part_count": 1
                      },
                      "metadata": {
                        "stage": "final"
                      },
                      "run_id": "run_42",
                      "owner": null,
                      "reference_count": 0,
                      "upload_id": "aup_5dMQVQFzdmYHPBV3rcQ25H",
                      "billing_key_id": "key_JDyuT92k9U2Q54apCc8EgT",
                      "created_at": "2026-10-17T09:00:00.000Z",
                      "ready_at": "2026-10-17T09:00:02.000Z",
                      "expires_at": "2026-10-24T09:00:00.000Z",
                      "deletion": null,
                      "failure": null,
                      "last_operation_id": "aop_QD8pYT1vdYyMTDkDWgKPM1",
                      "cost": {
                        "rate_version": "2026-10-22",
                        "charged_usd": "0.000031223338"
                      },
                      "version": "3",
                      "etag": "art_MAhBep7JB6wMAsAY63cEPM:3"
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/artifacts/{artifact_id}": {
      "get": {
        "operationId": "getArtifact",
        "tags": [
          "Artifacts"
        ],
        "summary": "Get an artifact",
        "description": "Returns the artifact. An unavailable artifact with a deletion record returns `410` with details in `error.artifact`; check its deletion status to distinguish pending cleanup from confirmed erasure. Costs one read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ArtifactId"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "responses": {
          "200": {
            "description": "The artifact.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "`0.000003`: one read.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Artifact"
                },
                "example": {
                  "id": "art_MAhBep7JB6wMAsAY63cEPM",
                  "object": "artifact",
                  "status": "ready",
                  "size_bytes": 3,
                  "billable_bytes": 131072,
                  "content_type": "text/plain",
                  "filename": "result.txt",
                  "checksum": {
                    "algorithm": "SHA256",
                    "type": "FULL_OBJECT",
                    "value": "ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0=",
                    "part_count": 1
                  },
                  "metadata": {
                    "stage": "final"
                  },
                  "run_id": "run_42",
                  "owner": null,
                  "reference_count": 0,
                  "upload_id": "aup_5dMQVQFzdmYHPBV3rcQ25H",
                  "billing_key_id": "key_JDyuT92k9U2Q54apCc8EgT",
                  "created_at": "2026-10-17T09:00:00.000Z",
                  "ready_at": "2026-10-17T09:00:02.000Z",
                  "expires_at": "2026-10-24T09:00:00.000Z",
                  "deletion": null,
                  "failure": null,
                  "last_operation_id": "aop_QD8pYT1vdYyMTDkDWgKPM1",
                  "cost": {
                    "rate_version": "2026-10-22",
                    "charged_usd": "0.000031223338"
                  },
                  "version": "3",
                  "etag": "art_MAhBep7JB6wMAsAY63cEPM:3"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "410": {
            "$ref": "#/components/responses/Gone"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateArtifact",
        "tags": [
          "Artifacts"
        ],
        "summary": "Update an artifact's labels",
        "description": "Updates `filename`, `content_type`, `metadata`, `run_id`, and `expires_at`. Bytes never change. A new media type applies to later download URLs. Costs one write.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ArtifactId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ArtifactUpdate"
              },
              "example": {
                "filename": "final.txt",
                "metadata": {
                  "stage": "published"
                },
                "expires_at": "2026-11-17T09:00:00Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The artifact.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "`0.00003`: one write.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Artifact"
                },
                "example": {
                  "id": "art_MAhBep7JB6wMAsAY63cEPM",
                  "object": "artifact",
                  "status": "ready",
                  "size_bytes": 3,
                  "billable_bytes": 131072,
                  "content_type": "text/plain",
                  "filename": "final.txt",
                  "checksum": {
                    "algorithm": "SHA256",
                    "type": "FULL_OBJECT",
                    "value": "ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0=",
                    "part_count": 1
                  },
                  "metadata": {
                    "stage": "published"
                  },
                  "run_id": "run_42",
                  "owner": null,
                  "reference_count": 0,
                  "upload_id": "aup_5dMQVQFzdmYHPBV3rcQ25H",
                  "billing_key_id": "key_JDyuT92k9U2Q54apCc8EgT",
                  "created_at": "2026-10-17T09:00:00.000Z",
                  "ready_at": "2026-10-17T09:00:02.000Z",
                  "expires_at": "2026-11-17T09:00:00.000Z",
                  "deletion": null,
                  "failure": null,
                  "last_operation_id": "aop_QD8pYT1vdYyMTDkDWgKPM1",
                  "cost": {
                    "rate_version": "2026-10-22",
                    "charged_usd": "0.000046223338"
                  },
                  "version": "4",
                  "etag": "art_MAhBep7JB6wMAsAY63cEPM:4"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "410": {
            "$ref": "#/components/responses/Gone"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "428": {
            "$ref": "#/components/responses/PreconditionRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteArtifact",
        "tags": [
          "Artifacts"
        ],
        "summary": "Delete an artifact",
        "description": "Denies new URLs at once and starts the erasure, which the operation confirms. Existing download URLs may remain usable until they expire or S3 deletes the object. Downloads already in progress may finish. Poll the deletion operation for confirmation; billing records remain after content deletion. An artifact that Motor services reference answers `409 artifact_in_use`. Included in the upload's price.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ArtifactId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "responses": {
          "202": {
            "description": "The erasure.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletionAccepted"
                },
                "example": {
                  "operation": {
                    "id": "aop_NK2eo56rsu9WmkjUfRGg4w",
                    "object": "operation",
                    "kind": "delete",
                    "status": "pending",
                    "phase": "uploads",
                    "artifact_id": "art_MAhBep7JB6wMAsAY63cEPM",
                    "upload_id": "aup_5dMQVQFzdmYHPBV3rcQ25H",
                    "retryable": false,
                    "error": null,
                    "cost": {
                      "rate_version": "2026-10-22",
                      "charged_usd": "0.00",
                      "meter_quantities": {
                        "writes": 0,
                        "reads": 0,
                        "storage_byte_days": 0,
                        "delivery_bytes": 0
                      }
                    },
                    "usage_reporting": "delayed",
                    "deadline_at": "2026-10-18T09:00:17.000Z",
                    "created_at": "2026-10-17T09:00:17.000Z",
                    "updated_at": "2026-10-17T09:00:17.000Z",
                    "finished_at": null
                  },
                  "artifact": {
                    "id": "art_MAhBep7JB6wMAsAY63cEPM",
                    "object": "artifact",
                    "status": "deleting",
                    "deletion": {
                      "reason": "customer",
                      "requested_at": "2026-10-17T09:00:17.000Z",
                      "state": "erasure_pending",
                      "erased_at": null,
                      "operation_id": "aop_NK2eo56rsu9WmkjUfRGg4w"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "410": {
            "$ref": "#/components/responses/Gone"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "428": {
            "$ref": "#/components/responses/PreconditionRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/artifacts/{artifact_id}/parts": {
      "get": {
        "operationId": "getArtifactManifest",
        "tags": [
          "Artifacts"
        ],
        "summary": "Get an artifact's integrity manifest",
        "description": "Returns each part's length and SHA-256. A single upload is one part; a multipart artifact's `checksum` is the composite of its parts. Costs one read for each page.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ArtifactId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of the manifest.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "`0.000003`: one read.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Manifest"
                },
                "example": {
                  "data": [
                    {
                      "number": 1,
                      "size_bytes": 3,
                      "sha256": "ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0="
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null,
                  "checksum": "ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0=",
                  "checksum_type": "FULL_OBJECT",
                  "part_count": 1
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/artifacts/{artifact_id}/grants": {
      "post": {
        "operationId": "createDownloadGrant",
        "tags": [
          "Grants"
        ],
        "summary": "Get a download URL",
        "description": "Issues a presigned `GET` or `HEAD` straight to S3, for 15 to 300 seconds and never past the artifact's `expires_at`. It's a bearer credential that can be reused until it expires. Creating a download URL costs one read, charged at once to the artifact's billing key, and a key at its spending limit gets `402`; an unused URL costs only that read. Each successful GET or HEAD request recorded in S3's access logs is another read, including retries, 206 responses, and 304 responses. Recorded bytes on successful GET requests incur delivery charges; HEAD and 304 responses do not. Duplicate records aren't charged twice, and missing records aren't charged. Usage may be charged up to 30 days later. The charge uses whichever key was the artifact’s billing key when the URL was issued, even if that key is later revoked or replaced. `accept_delayed_usage: true` is required.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ArtifactId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GrantCreate"
              },
              "example": {
                "method": "GET",
                "accept_delayed_usage": true,
                "lifetime_seconds": 120,
                "range": [
                  0,
                  1
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The download URL.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "description": "The URL of the new resource.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "`0.000003`: one read.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadGrant"
                },
                "example": {
                  "id": "agr_KqdusJoZHmSTdZXkxVCGd3",
                  "object": "grant",
                  "method": "GET",
                  "url": "https://motor-galadriel-blobs-prod.s3.us-east-1.amazonaws.com/artifact_storage/content/42/art_MAhBep7JB6wMAsAY63cEPM/body?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20261017%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20261017T090005Z&X-Amz-Expires=120&X-Amz-SignedHeaders=host%3Brange&response-cache-control=private%2C%20no-store&response-content-disposition=attachment%3B%20filename%3D%22final.txt%22%3B%20filename%2A%3DUTF-8%27%27final.txt&response-content-type=text%2Fplain&x-motor-grant=agr_KqdusJoZHmSTdZXkxVCGd3&X-Amz-Signature=5b1f6c3e0a8d4e2f9c7b1a0d3e6f8a2b4c6d8e0f1a3b5c7d9e1f3a5b7c9d1e3f",
                  "required_headers": {
                    "range": "bytes=0-1"
                  },
                  "expires_at": "2026-10-17T09:02:05.000Z",
                  "size_bytes": 3,
                  "part_number": null,
                  "artifact_id": "art_MAhBep7JB6wMAsAY63cEPM",
                  "range": [
                    0,
                    1
                  ],
                  "disposition": "attachment",
                  "provider_url_valid_until": "2026-10-17T09:02:05.000Z",
                  "reusable": true,
                  "usage_reporting": "delayed",
                  "budget_enforcement": "issuance_only",
                  "cost": {
                    "rate_version": "2026-10-22",
                    "issuance_usd": "0.000003",
                    "estimated_single_use_usd": "0.00000300036"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "410": {
            "$ref": "#/components/responses/Gone"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/artifacts/{artifact_id}/billing_key": {
      "post": {
        "operationId": "setArtifactBillingKey",
        "tags": [
          "Artifacts"
        ],
        "summary": "Update the billing key",
        "description": "Assigns another active key from your team to pay for the artifact's storage from now on, and for downloads through newly issued URLs. Existing download URLs keep their original billing key. Costs one write.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ArtifactId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingKeyChange"
              },
              "example": {
                "key_id": "key_8Fq2RkV7xYz3LmN4pQs9Td"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The artifact.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "`0.00003`: one write.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Artifact"
                },
                "example": {
                  "id": "art_MAhBep7JB6wMAsAY63cEPM",
                  "object": "artifact",
                  "status": "ready",
                  "size_bytes": 3,
                  "billable_bytes": 131072,
                  "content_type": "text/plain",
                  "filename": "final.txt",
                  "checksum": {
                    "algorithm": "SHA256",
                    "type": "FULL_OBJECT",
                    "value": "ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0=",
                    "part_count": 1
                  },
                  "metadata": {
                    "stage": "published"
                  },
                  "run_id": "run_42",
                  "owner": null,
                  "reference_count": 0,
                  "upload_id": "aup_5dMQVQFzdmYHPBV3rcQ25H",
                  "billing_key_id": "key_1bdzEY5E2uzM13vhCQbPv7",
                  "created_at": "2026-10-17T09:00:00.000Z",
                  "ready_at": "2026-10-17T09:00:02.000Z",
                  "expires_at": "2026-11-23T09:00:00.000Z",
                  "deletion": null,
                  "failure": null,
                  "last_operation_id": "aop_QD8pYT1vdYyMTDkDWgKPM1",
                  "cost": {
                    "rate_version": "2026-10-22",
                    "charged_usd": "0.000096466218"
                  },
                  "version": "7",
                  "etag": "art_MAhBep7JB6wMAsAY63cEPM:7"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "410": {
            "$ref": "#/components/responses/Gone"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "428": {
            "$ref": "#/components/responses/PreconditionRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/artifacts/{artifact_id}/adopt": {
      "post": {
        "operationId": "adoptArtifact",
        "tags": [
          "Artifacts"
        ],
        "summary": "Take over a service's artifact",
        "description": "Changes a service-managed artifact to customer-managed after all service references have been released. Your team already owns the artifact; adoption transfers responsibility for its expiry and deletion without copying the content. Costs one write.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ArtifactId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "The artifact.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "`0.00003`: one write.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Artifact"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "410": {
            "$ref": "#/components/responses/Gone"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "428": {
            "$ref": "#/components/responses/PreconditionRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/grants/{grant_id}": {
      "get": {
        "operationId": "getGrant",
        "tags": [
          "Grants"
        ],
        "summary": "Get a grant",
        "description": "Returns the grant's state and the usage that S3's logs showed so far, without its URL. Usage arrives later than the requests. Costs one read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/GrantId"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "responses": {
          "200": {
            "description": "The grant.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "`0.000003`: one read.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Grant"
                },
                "example": {
                  "id": "agr_KqdusJoZHmSTdZXkxVCGd3",
                  "object": "grant",
                  "artifact_id": "art_MAhBep7JB6wMAsAY63cEPM",
                  "upload_id": null,
                  "part_number": null,
                  "method": "GET",
                  "purpose": "download",
                  "range": [
                    0,
                    1
                  ],
                  "disposition": "attachment",
                  "status": "active",
                  "issued_at": "2026-10-17T09:00:05.000Z",
                  "expires_at": "2026-10-17T09:02:05.000Z",
                  "revoked_at": null,
                  "provider_url_valid_until": "2026-10-17T09:02:05.000Z",
                  "payer_key_id": "key_JDyuT92k9U2Q54apCc8EgT",
                  "reusable": true,
                  "usage_reporting": "delayed",
                  "budget_enforcement": "issuance_only",
                  "observed": {
                    "requests": 0,
                    "bytes": 0,
                    "observed_through": null
                  },
                  "rate_version": "2026-10-22",
                  "version": "1",
                  "etag": "agr_KqdusJoZHmSTdZXkxVCGd3:1"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/grants/{grant_id}/revoke": {
      "post": {
        "operationId": "revokeGrant",
        "tags": [
          "Grants"
        ],
        "summary": "Revoke a grant",
        "description": "Prevents Motor from replaying this grant's URL. The existing S3 URL may remain usable until `provider_url_valid_until`; revocation does not prevent new grants for the artifact. Included in the service price.",
        "parameters": [
          {
            "$ref": "#/components/parameters/GrantId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "The grant.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Grant"
                },
                "example": {
                  "id": "agr_KqdusJoZHmSTdZXkxVCGd3",
                  "object": "grant",
                  "artifact_id": "art_MAhBep7JB6wMAsAY63cEPM",
                  "upload_id": null,
                  "part_number": null,
                  "method": "GET",
                  "purpose": "download",
                  "range": [
                    0,
                    1
                  ],
                  "disposition": "attachment",
                  "status": "revoked",
                  "issued_at": "2026-10-17T09:00:05.000Z",
                  "expires_at": "2026-10-17T09:02:05.000Z",
                  "revoked_at": "2026-10-17T09:00:06.000Z",
                  "provider_url_valid_until": "2026-10-17T09:02:05.000Z",
                  "payer_key_id": "key_JDyuT92k9U2Q54apCc8EgT",
                  "reusable": true,
                  "usage_reporting": "delayed",
                  "budget_enforcement": "issuance_only",
                  "observed": {
                    "requests": 0,
                    "bytes": 0,
                    "observed_through": null
                  },
                  "rate_version": "2026-10-22",
                  "version": "2",
                  "etag": "agr_KqdusJoZHmSTdZXkxVCGd3:2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "428": {
            "$ref": "#/components/responses/PreconditionRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/deletions": {
      "post": {
        "operationId": "deleteArtifacts",
        "tags": [
          "Artifacts"
        ],
        "summary": "Delete artifacts in bulk",
        "description": "Deletes up to 100 artifacts, each at its expected version. Each item is accepted or refused on its own. The operation succeeds when every accepted item is erased. Included in the uploads' price.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkDeletionCreate"
              },
              "example": {
                "artifacts": [
                  {
                    "id": "art_KmfnmrWSi9FirysMYsAS7Q",
                    "version": "3"
                  },
                  {
                    "id": "art_unknown",
                    "version": "1"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The bulk deletion with each item's result.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "description": "The URL of the new resource.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                },
                "example": {
                  "id": "aop_5aEzmK7rkpvXq9C1Kbywvq",
                  "object": "operation",
                  "kind": "bulk_delete",
                  "status": "pending",
                  "phase": "erasing",
                  "artifact_id": null,
                  "upload_id": null,
                  "retryable": false,
                  "error": null,
                  "cost": {
                    "rate_version": "2026-10-22",
                    "charged_usd": "0.00",
                    "meter_quantities": {
                      "writes": 0,
                      "reads": 0,
                      "storage_byte_days": 0,
                      "delivery_bytes": 0
                    }
                  },
                  "usage_reporting": "delayed",
                  "deadline_at": "2026-10-18T09:00:16.000Z",
                  "created_at": "2026-10-17T09:00:16.000Z",
                  "updated_at": "2026-10-17T09:00:16.000Z",
                  "finished_at": null,
                  "items": [
                    {
                      "artifact_id": "art_KmfnmrWSi9FirysMYsAS7Q",
                      "result": "accepted",
                      "state": "pending",
                      "message": null
                    },
                    {
                      "artifact_id": "art_unknown",
                      "result": "not_found",
                      "state": "skipped",
                      "message": "The artifact doesn't exist."
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/operations/{operation_id}": {
      "get": {
        "operationId": "getOperation",
        "tags": [
          "Operations"
        ],
        "summary": "Get an operation",
        "description": "Returns the operation's status, its resources, its error, and what it charged. Costs one read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OperationId"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "responses": {
          "200": {
            "description": "The operation.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "`0.000003`: one read.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                },
                "example": {
                  "id": "aop_QD8pYT1vdYyMTDkDWgKPM1",
                  "object": "operation",
                  "kind": "finalize",
                  "status": "pending",
                  "phase": "verify",
                  "artifact_id": "art_MAhBep7JB6wMAsAY63cEPM",
                  "upload_id": "aup_5dMQVQFzdmYHPBV3rcQ25H",
                  "retryable": false,
                  "error": null,
                  "cost": {
                    "rate_version": "2026-10-22",
                    "charged_usd": "0.00",
                    "meter_quantities": {
                      "writes": 0,
                      "reads": 0,
                      "storage_byte_days": 0,
                      "delivery_bytes": 0
                    }
                  },
                  "usage_reporting": "delayed",
                  "deadline_at": "2026-10-18T09:00:01.000Z",
                  "created_at": "2026-10-17T09:00:01.000Z",
                  "updated_at": "2026-10-17T09:00:01.000Z",
                  "finished_at": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/limits": {
      "get": {
        "operationId": "getLimits",
        "tags": [
          "Limits and pricing"
        ],
        "summary": "Get limits and rates",
        "description": "Returns the sizes, the request rates, and the published rates. Costs one read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "responses": {
          "200": {
            "description": "The limits.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "`0.000003`: one read.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Limits"
                },
                "example": {
                  "object": "limits",
                  "rates": {
                    "rate_version": "2026-10-22",
                    "storage_usd_per_gb_month": "0.04",
                    "writes_usd_per_million": "30",
                    "reads_usd_per_million": "3",
                    "delivery_usd_per_gb": "0.18",
                    "download_url_reads": 1,
                    "minimum_billable_bytes": 131072,
                    "storage_billing": "metered per second while an artifact is ready, and recorded per key each UTC day",
                    "download_usage_reporting": "delayed",
                    "next": null
                  },
                  "sizes": {
                    "max_object_bytes": 53687091200000,
                    "single_upload_max_bytes": 8388608,
                    "max_parts": 10000,
                    "max_part_bytes": 5368709120,
                    "min_part_bytes": 8388608,
                    "upload_session_hours": 24,
                    "url_lifetime_seconds": {
                      "default": 60,
                      "min": 15,
                      "max": 300
                    },
                    "storage_grace_days": 30,
                    "max_metadata_pairs": 16,
                    "max_metadata_bytes": 4096,
                    "max_bulk_deletions": 100
                  },
                  "request_rates": {
                    "team_per_second": 100,
                    "team_burst": 200,
                    "key_per_second": 50,
                    "key_burst": 100,
                    "uploads_per_second": 10,
                    "uploads_burst": 20
                  },
                  "downloads_paused": false,
                  "usage_feed": {
                    "reporting": "delayed",
                    "observed_through": null,
                    "logs_listed_at": null,
                    "typical_delay": "S3 delivers access logs within a few hours, sometimes later; Motor settles records up to 30 days late."
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/estimates": {
      "post": {
        "operationId": "createEstimate",
        "tags": [
          "Limits and pricing"
        ],
        "summary": "Estimate a workload",
        "description": "Prices an upload, its storage for `storage_days` days (30 by default), its reads, its download URLs, and its downloads with every meter, at the rates of now. An estimate doesn't reserve anything or authorize a later transfer; the estimate expires after five minutes and does not lock in a price. Costs one read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EstimateCreate"
              },
              "example": {
                "size_bytes": 1000000,
                "storage_days": 7,
                "downloads": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The estimate.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "`0.000003`: one read.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Estimate"
                },
                "example": {
                  "object": "estimate",
                  "transport": "single",
                  "billable_bytes": 1000000,
                  "lines": [
                    {
                      "meter": "writes",
                      "quantity": 1,
                      "cost_usd": "0.00003"
                    },
                    {
                      "meter": "reads",
                      "quantity": 2,
                      "cost_usd": "0.000006"
                    },
                    {
                      "meter": "storage_byte_days",
                      "quantity": 7000000,
                      "cost_usd": "0.000009333334"
                    },
                    {
                      "meter": "delivery_bytes",
                      "quantity": 1000000,
                      "cost_usd": "0.00018"
                    }
                  ],
                  "total_usd": "0.000225333334",
                  "estimate_cost_usd": "0.000003",
                  "meter_quantities": {
                    "writes": 1,
                    "reads": 2,
                    "storage_byte_days": 7000000,
                    "delivery_bytes": 1000000
                  },
                  "rates": {
                    "rate_version": "2026-10-22",
                    "storage_usd_per_gb_month": "0.04",
                    "writes_usd_per_million": "30",
                    "reads_usd_per_million": "3",
                    "delivery_usd_per_gb": "0.18",
                    "download_url_reads": 1,
                    "minimum_billable_bytes": 131072,
                    "storage_billing": "metered per second while an artifact is ready, and recorded per key each UTC day",
                    "download_usage_reporting": "delayed",
                    "next": null
                  },
                  "quote_expires_at": "2026-10-17T09:05:10.000Z",
                  "note": "An estimate reserves nothing. Download usage is observed and billed later; a URL can be reused until it expires."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "A secret key, `motor_sk_...`, that may use Artifact storage."
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "description": "1 to 128 printable ASCII characters: a new value for each operation, and the same value when you retry it. Records last 35 days.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        }
      },
      "IfMatch": {
        "name": "If-Match",
        "in": "header",
        "required": true,
        "description": "The resource's entity tag in quotes, such as `\"art_...:3\"`.",
        "schema": {
          "type": "string"
        }
      },
      "MotorMode": {
        "name": "Motor-Mode",
        "in": "header",
        "required": false,
        "description": "Artifact storage is live-only: omit it or send `live`.",
        "schema": {
          "enum": [
            "live"
          ]
        }
      },
      "Limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "description": "1 to 100 items, 50 by default.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        }
      },
      "Cursor": {
        "name": "cursor",
        "in": "query",
        "required": false,
        "description": "`next_cursor` of the previous page. It works for 24 hours, with the same filters.",
        "schema": {
          "type": "string"
        }
      },
      "UploadId": {
        "name": "upload_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "ArtifactId": {
        "name": "artifact_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "GrantId": {
        "name": "grant_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "OperationId": {
        "name": "operation_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The body isn't valid JSON, or an `Idempotency-Key` is missing.",
        "headers": {
          "Request-Id": {
            "description": "Motor's ID of the request, for support.",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            },
            "example": {
              "error": {
                "code": "invalid_json",
                "message": "The request body isn't valid JSON. Expected a JSON value at byte 0.",
                "retryable": false
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "The key is missing, invalid, or revoked.",
        "headers": {
          "Request-Id": {
            "description": "Motor's ID of the request, for support.",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            },
            "example": {
              "error": {
                "code": "unauthorized",
                "message": "This API key is invalid or has been revoked.",
                "retryable": false
              }
            }
          }
        }
      },
      "PaymentRequired": {
        "description": "The work would pass the paying key's spending limit, or your team doesn't have a payment card.",
        "headers": {
          "Request-Id": {
            "description": "Motor's ID of the request, for support.",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            },
            "example": {
              "error": {
                "code": "spending_limit",
                "message": "This work would exceed the paying API key's monthly spending limit. Raise the limit on the API keys page, or wait until the next billing month starts at 00:00 UTC.",
                "retryable": false
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "A publishable key, a key that can't use Artifact storage, or a suspended team.",
        "headers": {
          "Request-Id": {
            "description": "Motor's ID of the request, for support.",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            },
            "example": {
              "error": {
                "code": "forbidden",
                "message": "This publishable key cannot access this API. Check the key's allowed APIs. For server-side requests, use the secret key.",
                "retryable": false
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "The resource doesn't exist for your team.",
        "headers": {
          "Request-Id": {
            "description": "Motor's ID of the request, for support.",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            },
            "example": {
              "error": {
                "code": "not_found",
                "message": "The grant doesn't exist.",
                "retryable": false
              }
            }
          }
        }
      },
      "Conflict": {
        "description": "A state, idempotency, rate, or reference conflict, such as `upload_completed`, `artifact_in_use`, `idempotency_conflict`, or `rate_changed`.",
        "headers": {
          "Request-Id": {
            "description": "Motor's ID of the request, for support.",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            },
            "example": {
              "error": {
                "code": "upload_completed",
                "message": "The upload is complete. Use its artifact.",
                "artifact_id": "art_MAhBep7JB6wMAsAY63cEPM",
                "retryable": false
              }
            }
          }
        }
      },
      "Gone": {
        "description": "The artifact was deleted or expired, or the upload session expired.",
        "headers": {
          "Request-Id": {
            "description": "Motor's ID of the request, for support.",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            },
            "example": {
              "error": {
                "code": "artifact_deleted",
                "message": "The artifact is no longer available. Check its deletion status for cleanup progress.",
                "retryable": false,
                "artifact": {
                  "id": "art_MAhBep7JB6wMAsAY63cEPM",
                  "object": "artifact",
                  "status": "deleting",
                  "deletion": {
                    "reason": "customer",
                    "requested_at": "2026-10-17T09:00:17.000Z",
                    "state": "erasure_pending",
                    "erased_at": null,
                    "operation_id": "aop_NK2eo56rsu9WmkjUfRGg4w"
                  }
                }
              }
            }
          }
        }
      },
      "PreconditionFailed": {
        "description": "`If-Match` names an older version. Read the resource again.",
        "headers": {
          "Request-Id": {
            "description": "Motor's ID of the request, for support.",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            },
            "example": {
              "error": {
                "code": "precondition_failed",
                "message": "The resource changed since you read it. Read it again and retry with its new ETag.",
                "resource_id": "aup_5dMQVQFzdmYHPBV3rcQ25H",
                "retryable": false
              }
            }
          }
        }
      },
      "TooLarge": {
        "description": "The request body is larger than 64 KiB.",
        "headers": {
          "Request-Id": {
            "description": "Motor's ID of the request, for support.",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            },
            "example": {
              "error": {
                "code": "body_too_large",
                "message": "The request body must be at most 65536 bytes.",
                "retryable": false
              }
            }
          }
        }
      },
      "UnsupportedMediaType": {
        "description": "The body isn't `application/json`.",
        "headers": {
          "Request-Id": {
            "description": "Motor's ID of the request, for support.",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            },
            "example": {
              "error": {
                "code": "unsupported_media_type",
                "message": "Send the request body as application/json.",
                "retryable": false
              }
            }
          }
        }
      },
      "Invalid": {
        "description": "A field, the cursor, or `Motor-Mode` isn't valid.",
        "headers": {
          "Request-Id": {
            "description": "Motor's ID of the request, for support.",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            },
            "example": {
              "error": {
                "code": "invalid_field",
                "message": "`status` must be uploading, verifying, ready, deleting, deleted, failed, expired, or aborted.",
                "retryable": false
              }
            }
          }
        }
      },
      "PreconditionRequired": {
        "description": "`If-Match` is missing.",
        "headers": {
          "Request-Id": {
            "description": "Motor's ID of the request, for support.",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            },
            "example": {
              "error": {
                "code": "precondition_required",
                "message": "Send the ETag of the resource in the If-Match header, such as If-Match: \"ff:ffe_...:7\". Read the resource to get its current ETag.",
                "retryable": false
              }
            }
          }
        }
      },
      "RateLimited": {
        "description": "Too many requests; retry after `Retry-After`.",
        "headers": {
          "Request-Id": {
            "description": "Motor's ID of the request, for support.",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            },
            "example": {
              "error": {
                "code": "rate_limited",
                "message": "Too many requests. Retry after 1 seconds.",
                "retryable": true,
                "retry_after_seconds": 1
              }
            }
          }
        }
      },
      "Unavailable": {
        "description": "The provider or Motor is temporarily unavailable, or download URLs are paused. Wait for `Retry-After` when present; otherwise retry after a few seconds.",
        "headers": {
          "Request-Id": {
            "description": "Motor's ID of the request, for support.",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            },
            "example": {
              "error": {
                "code": "provider_unavailable",
                "message": "Artifact storage isn't configured in this environment.",
                "retryable": true,
                "retry_after_seconds": 5
              }
            }
          }
        }
      }
    },
    "schemas": {
      "Time": {
        "type": "string",
        "description": "A time in RFC 3339, UTC, to the millisecond, such as `2026-10-17T09:00:00.000Z`.",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"
      },
      "Money": {
        "type": "string",
        "description": "An exact amount of US dollars as a decimal string, such as `0.00003`.",
        "pattern": "^\\d+\\.\\d{2,12}$"
      },
      "Version": {
        "type": "string",
        "description": "The resource's version, a decimal integer in a string. It's part of the entity tag.",
        "pattern": "^\\d+$"
      },
      "Sha256": {
        "type": "string",
        "description": "The Base64 of a 32-byte SHA-256 digest, as S3's `x-amz-checksum-sha256` takes it.",
        "pattern": "^[A-Za-z0-9+/]{43}=$"
      },
      "Metadata": {
        "type": "object",
        "description": "At most 16 string pairs: keys of 1 to 64 UTF-8 bytes, values of at most 256, and at most 4 KiB in all. Metadata never grants access.",
        "additionalProperties": {
          "type": "string"
        },
        "maxProperties": 16
      },
      "Problem": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "A stable code for programs, such as `precondition_failed`."
              },
              "message": {
                "type": "string",
                "description": "What happened and what to do, for people."
              },
              "retryable": {
                "type": "boolean",
                "description": "Whether the same request can work later. A `429` or `503` is retryable."
              },
              "retry_after_seconds": {
                "type": "integer",
                "minimum": 0,
                "description": "The seconds to wait before a retry, when Motor knows them."
              },
              "resource_id": {
                "type": "string",
                "description": "The resource that the problem concerns."
              },
              "field": {
                "type": "string",
                "description": "The request field that caused the error, such as `cursor`."
              }
            },
            "required": [
              "code",
              "message",
              "retryable"
            ],
            "additionalProperties": true
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false,
        "description": "An error. The `error` object may have more members, such as `references` of `artifact_in_use`, `missing_parts` of `parts_missing`, or `artifact` of a deleted artifact's `410`."
      },
      "MeterQuantities": {
        "type": "object",
        "properties": {
          "writes": {
            "type": "integer",
            "minimum": 0,
            "description": "Accepted uploads, issued part or replacement upload URLs, and changes."
          },
          "reads": {
            "type": "integer",
            "minimum": 0,
            "description": "Control reads and pages, estimates, created download URLs, and observed downloads."
          },
          "storage_byte_days": {
            "type": "integer",
            "minimum": 0,
            "description": "Billable bytes times stored days."
          },
          "delivery_bytes": {
            "type": "integer",
            "minimum": 0,
            "description": "Observed bytes delivered by downloads."
          }
        },
        "required": [
          "writes",
          "reads",
          "storage_byte_days",
          "delivery_bytes"
        ],
        "additionalProperties": false
      },
      "Cost": {
        "type": "object",
        "properties": {
          "rate_version": {
            "type": "string",
            "description": "The published rates of the charges."
          },
          "charged_usd": {
            "$ref": "#/components/schemas/Money"
          },
          "meter_quantities": {
            "$ref": "#/components/schemas/MeterQuantities"
          }
        },
        "required": [
          "rate_version",
          "charged_usd",
          "meter_quantities"
        ],
        "additionalProperties": false,
        "description": "What a request or an operation charged, and the meters' quantities."
      },
      "IssuedGrant": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The grant's ID, `agr_...`. The URL carries it as `x-motor-grant`."
          },
          "object": {
            "const": "grant"
          },
          "method": {
            "enum": [
              "PUT",
              "GET",
              "HEAD"
            ]
          },
          "url": {
            "anyOf": [
              {
                "type": "string",
                "description": "The presigned S3 URL. It's `null` in a replay after the grant expired or was revoked, and for another key than the one that issued it."
              },
              {
                "type": "null"
              }
            ]
          },
          "required_headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Headers that the request must send with exactly these values. The signature covers them."
          },
          "expires_at": {
            "$ref": "#/components/schemas/Time"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "part_number": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "object",
          "method",
          "url",
          "required_headers",
          "expires_at",
          "size_bytes",
          "part_number"
        ],
        "additionalProperties": false,
        "description": "A presigned S3 request. Send it straight to S3, without your Motor key."
      },
      "Upload": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "`aup_...`"
          },
          "object": {
            "const": "upload"
          },
          "artifact_id": {
            "type": "string",
            "description": "The artifact that the upload fills, `art_...`."
          },
          "status": {
            "enum": [
              "open",
              "completing",
              "completed",
              "aborted",
              "expired",
              "failed"
            ]
          },
          "transport": {
            "enum": [
              "single",
              "multipart"
            ],
            "description": "`single` for at most 8 MiB, with one presigned `PUT`; `multipart` above it, with presigned parts."
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "part_size_bytes": {
            "type": "integer",
            "minimum": 0,
            "description": "Every part but the last has this size."
          },
          "part_count": {
            "type": "integer",
            "minimum": 0
          },
          "content_type": {
            "type": "string"
          },
          "provider_state": {
            "enum": [
              "ready",
              "creating"
            ],
            "description": "`creating` while Motor creates the multipart upload at S3; register parts once it's `ready`."
          },
          "observed_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ]
          },
          "operation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "$ref": "#/components/schemas/Time"
          },
          "artifact_expires_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When Motor deletes the artifact, or `null` to keep it until it's deleted."
          },
          "last_url_expires_at": {
            "$ref": "#/components/schemas/Time"
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          },
          "etag": {
            "type": "string",
            "description": "The entity tag without quotes. Send it in quotes as `If-Match`."
          },
          "created_at": {
            "$ref": "#/components/schemas/Time"
          },
          "completed_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ]
          },
          "grant": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IssuedGrant"
              },
              {
                "type": "null"
              }
            ]
          },
          "operation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Operation"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost": {
            "$ref": "#/components/schemas/Cost"
          },
          "parts_registered": {
            "type": "integer",
            "minimum": 0
          },
          "active_grants": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "id",
          "object",
          "artifact_id",
          "status",
          "transport",
          "size_bytes",
          "part_size_bytes",
          "part_count",
          "content_type",
          "provider_state",
          "observed_at",
          "operation_id",
          "expires_at",
          "artifact_expires_at",
          "last_url_expires_at",
          "version",
          "etag",
          "created_at",
          "completed_at"
        ],
        "additionalProperties": false,
        "description": "An upload session. Creating it returns `grant`, `operation`, and `cost` too."
      },
      "UploadCreate": {
        "type": "object",
        "properties": {
          "size_bytes": {
            "type": "integer",
            "minimum": 0,
            "description": "The exact size: 0 to 53,687,091,200,000 bytes (10,000 parts of 5 GiB)."
          },
          "sha256": {
            "$ref": "#/components/schemas/Sha256"
          },
          "content_type": {
            "type": "string",
            "description": "A media type of at most 127 bytes. Default `application/octet-stream`."
          },
          "filename": {
            "type": "string",
            "description": "A label of at most 255 bytes, not a path."
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "run_id": {
            "type": "string",
            "description": "At most 128 bytes, for the list's filter."
          },
          "expires_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When Motor deletes the artifact, a time in the future. Leave it out or send `null` to keep the artifact until you delete it."
          },
          "lifetime_seconds": {
            "type": "integer",
            "minimum": 15,
            "maximum": 300,
            "description": "The first `PUT` URL's lifetime. Default 60."
          },
          "rate_version": {
            "type": "string",
            "description": "The rates that you expect; an older one is refused with `409 rate_changed`."
          }
        },
        "required": [
          "size_bytes"
        ],
        "additionalProperties": false,
        "description": "`sha256` is required for a single upload of at most 8 MiB, and refused for a multipart upload."
      },
      "PartGrantCreate": {
        "type": "object",
        "properties": {
          "part_number": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0,
            "description": "The part's exact size: `part_size_bytes`, or the rest for the last part."
          },
          "sha256": {
            "$ref": "#/components/schemas/Sha256"
          },
          "lifetime_seconds": {
            "type": "integer",
            "minimum": 15,
            "maximum": 300
          },
          "rate_version": {
            "type": "string"
          }
        },
        "required": [
          "part_number",
          "size_bytes",
          "sha256"
        ],
        "additionalProperties": false
      },
      "PartGrant": {
        "type": "object",
        "properties": {
          "object": {
            "const": "upload_part_grant"
          },
          "upload_id": {
            "type": "string"
          },
          "part": {
            "type": "object",
            "properties": {
              "number": {
                "type": "integer",
                "minimum": 0
              },
              "size_bytes": {
                "type": "integer",
                "minimum": 0
              },
              "sha256": {
                "$ref": "#/components/schemas/Sha256"
              }
            },
            "required": [
              "number",
              "size_bytes",
              "sha256"
            ],
            "additionalProperties": false
          },
          "grant": {
            "$ref": "#/components/schemas/IssuedGrant"
          },
          "cost": {
            "$ref": "#/components/schemas/Cost"
          }
        },
        "required": [
          "object",
          "upload_id",
          "part",
          "grant",
          "cost"
        ],
        "additionalProperties": false
      },
      "Part": {
        "type": "object",
        "properties": {
          "number": {
            "type": "integer",
            "minimum": 0
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "sha256": {
            "$ref": "#/components/schemas/Sha256"
          },
          "observed": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "provider_tag": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "S3's opaque tag of the part. It isn't a hash."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sha256": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "size_bytes": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "observed_at": {
                    "$ref": "#/components/schemas/Time"
                  }
                },
                "required": [
                  "provider_tag",
                  "sha256",
                  "size_bytes",
                  "observed_at"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "last_grant_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "number",
          "size_bytes",
          "sha256",
          "observed",
          "last_grant_id"
        ],
        "additionalProperties": false
      },
      "PartList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Part"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "observed_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor",
          "observed_at"
        ],
        "additionalProperties": false
      },
      "ManifestPart": {
        "type": "object",
        "properties": {
          "number": {
            "type": "integer",
            "minimum": 0
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "sha256": {
            "$ref": "#/components/schemas/Sha256"
          }
        },
        "required": [
          "number",
          "size_bytes",
          "sha256"
        ],
        "additionalProperties": false
      },
      "Manifest": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ManifestPart"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "checksum": {
            "anyOf": [
              {
                "type": "string",
                "description": "The artifact's checksum: a full-object SHA-256, or a composite `...=-N` of N parts."
              },
              {
                "type": "null"
              }
            ]
          },
          "checksum_type": {
            "enum": [
              "FULL_OBJECT",
              "COMPOSITE"
            ]
          },
          "part_count": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor",
          "checksum",
          "checksum_type",
          "part_count"
        ],
        "additionalProperties": false
      },
      "OperationItem": {
        "type": "object",
        "properties": {
          "artifact_id": {
            "type": "string"
          },
          "result": {
            "enum": [
              "accepted",
              "conflict",
              "not_found",
              "in_use",
              "already_deleted"
            ]
          },
          "state": {
            "enum": [
              "pending",
              "erased",
              "skipped"
            ]
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "artifact_id",
          "result",
          "state",
          "message"
        ],
        "additionalProperties": false
      },
      "Operation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "`aop_...`"
          },
          "object": {
            "const": "operation"
          },
          "kind": {
            "enum": [
              "finalize",
              "reconcile",
              "abort",
              "delete",
              "bulk_delete",
              "expire",
              "erase"
            ]
          },
          "status": {
            "enum": [
              "pending",
              "running",
              "succeeded",
              "failed"
            ]
          },
          "phase": {
            "type": "string",
            "description": "The current step, such as `verify`, `parts`, `complete`, `uploads`, or `delete`."
          },
          "artifact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "upload_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "retryable": {
            "type": "boolean",
            "description": "For a failed operation: whether the client can try again, such as by uploading the bytes and completing again."
          },
          "error": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "cost": {
            "$ref": "#/components/schemas/Cost"
          },
          "usage_reporting": {
            "const": "delayed"
          },
          "deadline_at": {
            "$ref": "#/components/schemas/Time"
          },
          "created_at": {
            "$ref": "#/components/schemas/Time"
          },
          "updated_at": {
            "$ref": "#/components/schemas/Time"
          },
          "finished_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OperationItem"
            },
            "description": "The items of a bulk deletion."
          }
        },
        "required": [
          "id",
          "object",
          "kind",
          "status",
          "phase",
          "artifact_id",
          "upload_id",
          "retryable",
          "error",
          "cost",
          "usage_reporting",
          "deadline_at",
          "created_at",
          "updated_at",
          "finished_at"
        ],
        "additionalProperties": false,
        "description": "An operation running in the background. Poll its status until it succeeds or fails; accepting the request does not mean the work is complete."
      },
      "Completion": {
        "type": "object",
        "properties": {
          "operation": {
            "$ref": "#/components/schemas/Operation"
          },
          "artifact_id": {
            "type": "string"
          },
          "upload": {
            "$ref": "#/components/schemas/Upload"
          }
        },
        "required": [
          "operation",
          "artifact_id",
          "upload"
        ],
        "additionalProperties": false
      },
      "Deletion": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "description": "Such as `customer`, `expired`, `upload_aborted`, `upload_expired`, `failed`, `released`, or `team_closed`."
          },
          "requested_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "enum": [
              "erasure_pending",
              "erased"
            ]
          },
          "erased_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ]
          },
          "operation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "reason",
          "requested_at",
          "state",
          "erased_at",
          "operation_id"
        ],
        "additionalProperties": false
      },
      "DeletedArtifact": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "const": "artifact"
          },
          "status": {
            "enum": [
              "deleting",
              "deleted"
            ]
          },
          "deletion": {
            "$ref": "#/components/schemas/Deletion"
          }
        },
        "required": [
          "id",
          "object",
          "status",
          "deletion"
        ],
        "additionalProperties": false
      },
      "Artifact": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "`art_...`"
          },
          "object": {
            "const": "artifact"
          },
          "status": {
            "enum": [
              "uploading",
              "verifying",
              "ready",
              "deleting",
              "deleted",
              "failed",
              "expired",
              "aborted"
            ]
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "billable_bytes": {
            "type": "integer",
            "minimum": 0,
            "description": "At least 131,072 bytes (128 KiB)."
          },
          "content_type": {
            "type": "string"
          },
          "filename": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "checksum": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "algorithm": {
                    "const": "SHA256"
                  },
                  "type": {
                    "enum": [
                      "FULL_OBJECT",
                      "COMPOSITE"
                    ]
                  },
                  "value": {
                    "type": "string"
                  },
                  "part_count": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "algorithm",
                  "type",
                  "value",
                  "part_count"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "owner": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "service": {
                    "type": "string"
                  },
                  "resource_type": {
                    "type": "string"
                  },
                  "resource_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "service",
                  "resource_type",
                  "resource_id"
                ],
                "additionalProperties": false,
                "description": "The Motor service that manages the artifact, or `null` when your team manages it directly. The artifact always belongs to your team."
              },
              {
                "type": "null"
              }
            ]
          },
          "reference_count": {
            "type": "integer",
            "minimum": 0,
            "description": "Active Motor service references that prevent customer-requested deletion. They can't outlast `expires_at`, and they don't prevent cleanup after expiry, an unpaid grace period, or team closure."
          },
          "upload_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "billing_key_id": {
            "type": "string",
            "description": "The key that pays for the artifact's storage and for downloads through newly issued URLs."
          },
          "created_at": {
            "$ref": "#/components/schemas/Time"
          },
          "ready_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When Motor deletes the artifact, or `null` to keep it until it's deleted. Motor issues no URLs after it."
          },
          "deletion": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Deletion"
              },
              {
                "type": "null"
              }
            ]
          },
          "failure": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "last_operation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost": {
            "type": "object",
            "properties": {
              "rate_version": {
                "type": "string"
              },
              "charged_usd": {
                "$ref": "#/components/schemas/Money"
              }
            },
            "required": [
              "rate_version",
              "charged_usd"
            ],
            "additionalProperties": false
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          },
          "etag": {
            "type": "string",
            "description": "The entity tag without quotes. Send it in quotes as `If-Match`."
          },
          "cost_of_request": {
            "$ref": "#/components/schemas/Cost"
          }
        },
        "required": [
          "id",
          "object",
          "status",
          "size_bytes",
          "billable_bytes",
          "content_type",
          "filename",
          "checksum",
          "metadata",
          "run_id",
          "owner",
          "reference_count",
          "upload_id",
          "billing_key_id",
          "created_at",
          "ready_at",
          "expires_at",
          "deletion",
          "failure",
          "last_operation_id",
          "cost",
          "version",
          "etag"
        ],
        "additionalProperties": false
      },
      "ArtifactList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Artifact"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "description": "Pass it as `cursor` for the next page. It works for 24 hours, with the same filters."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ArtifactUpdate": {
        "type": "object",
        "properties": {
          "filename": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "content_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "metadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              },
              {
                "type": "null"
              }
            ]
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When Motor deletes the artifact, a time in the future, or `null` to keep it until you delete it. It can't come before the end of a Motor service's reference."
          },
          "rate_version": {
            "type": "string"
          }
        },
        "required": [],
        "additionalProperties": false,
        "description": "Labels and the expiry to change. `null` clears a label or the expiry; `content_type: null` restores `application/octet-stream`."
      },
      "BillingKeyChange": {
        "type": "object",
        "properties": {
          "key_id": {
            "type": "string",
            "description": "`key_...`, an active key of your team that can use Artifact storage."
          },
          "rate_version": {
            "type": "string"
          }
        },
        "required": [
          "key_id"
        ],
        "additionalProperties": false
      },
      "Empty": {
        "type": "object",
        "properties": {},
        "required": [],
        "additionalProperties": false,
        "description": "An empty object, or no body."
      },
      "GrantCreate": {
        "type": "object",
        "properties": {
          "method": {
            "enum": [
              "GET",
              "HEAD"
            ],
            "description": "Default `GET`."
          },
          "accept_delayed_usage": {
            "const": true,
            "description": "Required: the URL can be reused until it expires, and Motor bills its observed requests and bytes later. A spending limit stops new URLs, not a URL already issued."
          },
          "lifetime_seconds": {
            "type": "integer",
            "minimum": 15,
            "maximum": 300
          },
          "disposition": {
            "enum": [
              "attachment",
              "inline"
            ],
            "description": "Default `attachment`; `inline` only for `text/plain` and `application/octet-stream`."
          },
          "range": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0
            },
            "minItems": 2,
            "maxItems": 2,
            "description": "Inclusive byte offsets `[start, end]`, signed as the `Range` header."
          },
          "rate_version": {
            "type": "string"
          }
        },
        "required": [
          "accept_delayed_usage"
        ],
        "additionalProperties": false
      },
      "DownloadGrant": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "const": "grant"
          },
          "method": {
            "enum": [
              "GET",
              "HEAD"
            ]
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "required_headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "expires_at": {
            "$ref": "#/components/schemas/Time"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "part_number": {
            "type": "null"
          },
          "artifact_id": {
            "type": "string"
          },
          "range": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "disposition": {
            "enum": [
              "attachment",
              "inline"
            ]
          },
          "provider_url_valid_until": {
            "$ref": "#/components/schemas/Time"
          },
          "reusable": {
            "const": true
          },
          "usage_reporting": {
            "const": "delayed"
          },
          "budget_enforcement": {
            "const": "issuance_only"
          },
          "cost": {
            "type": "object",
            "properties": {
              "rate_version": {
                "type": "string"
              },
              "issuance_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "estimated_single_use_usd": {
                "$ref": "#/components/schemas/Money"
              }
            },
            "required": [
              "rate_version",
              "issuance_usd",
              "estimated_single_use_usd"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "object",
          "method",
          "url",
          "required_headers",
          "expires_at",
          "size_bytes",
          "part_number",
          "artifact_id",
          "range",
          "disposition",
          "provider_url_valid_until",
          "reusable",
          "usage_reporting",
          "budget_enforcement",
          "cost"
        ],
        "additionalProperties": false,
        "description": "A presigned download. It's a bearer credential that anyone who holds it can use until it expires."
      },
      "Grant": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "const": "grant"
          },
          "artifact_id": {
            "type": "string"
          },
          "upload_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "part_number": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "method": {
            "enum": [
              "PUT",
              "GET",
              "HEAD"
            ]
          },
          "purpose": {
            "enum": [
              "upload",
              "part",
              "download"
            ]
          },
          "range": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "disposition": {
            "anyOf": [
              {
                "enum": [
                  "attachment",
                  "inline"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "enum": [
              "active",
              "expired",
              "revoked"
            ]
          },
          "issued_at": {
            "$ref": "#/components/schemas/Time"
          },
          "expires_at": {
            "$ref": "#/components/schemas/Time"
          },
          "revoked_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ]
          },
          "provider_url_valid_until": {
            "$ref": "#/components/schemas/Time"
          },
          "payer_key_id": {
            "type": "string"
          },
          "reusable": {
            "const": true
          },
          "usage_reporting": {
            "const": "delayed"
          },
          "budget_enforcement": {
            "const": "issuance_only"
          },
          "observed": {
            "type": "object",
            "properties": {
              "requests": {
                "type": "integer",
                "minimum": 0
              },
              "bytes": {
                "type": "integer",
                "minimum": 0
              },
              "observed_through": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "requests",
              "bytes",
              "observed_through"
            ],
            "additionalProperties": false
          },
          "rate_version": {
            "type": "string"
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          },
          "etag": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "artifact_id",
          "upload_id",
          "part_number",
          "method",
          "purpose",
          "range",
          "disposition",
          "status",
          "issued_at",
          "expires_at",
          "revoked_at",
          "provider_url_valid_until",
          "payer_key_id",
          "reusable",
          "usage_reporting",
          "budget_enforcement",
          "observed",
          "rate_version",
          "version",
          "etag"
        ],
        "additionalProperties": false,
        "description": "A grant without its URL, with usage recorded so far. `observed.observed_through` is the latest recorded request time, not a guarantee that all earlier records have arrived. Totals can increase after expiry or revocation."
      },
      "BulkDeletionCreate": {
        "type": "object",
        "properties": {
          "artifacts": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "version": {
                  "$ref": "#/components/schemas/Version"
                }
              },
              "required": [
                "id",
                "version"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "artifacts"
        ],
        "additionalProperties": false
      },
      "DeletionAccepted": {
        "type": "object",
        "properties": {
          "operation": {
            "$ref": "#/components/schemas/Operation"
          },
          "artifact": {
            "$ref": "#/components/schemas/DeletedArtifact"
          }
        },
        "required": [
          "operation",
          "artifact"
        ],
        "additionalProperties": false
      },
      "Rates": {
        "type": "object",
        "properties": {
          "rate_version": {
            "type": "string"
          },
          "storage_usd_per_gb_month": {
            "type": "string"
          },
          "writes_usd_per_million": {
            "type": "string"
          },
          "reads_usd_per_million": {
            "type": "string"
          },
          "delivery_usd_per_gb": {
            "type": "string"
          },
          "download_url_reads": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1,
            "description": "Reads that creating a download URL costs. Each download with the URL is another read."
          },
          "minimum_billable_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "storage_billing": {
            "type": "string"
          },
          "download_usage_reporting": {
            "type": "string"
          },
          "next": {
            "description": "The rates that start next, or `null` when no change is scheduled.",
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "properties": {
                  "effective_at": {
                    "$ref": "#/components/schemas/Time"
                  },
                  "rate_version": {
                    "type": "string"
                  },
                  "writes_usd_per_million": {
                    "type": "string"
                  },
                  "download_url_reads": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "effective_at",
                  "rate_version",
                  "writes_usd_per_million",
                  "download_url_reads"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "rate_version",
          "storage_usd_per_gb_month",
          "writes_usd_per_million",
          "reads_usd_per_million",
          "delivery_usd_per_gb",
          "download_url_reads",
          "minimum_billable_bytes",
          "storage_billing",
          "download_usage_reporting",
          "next"
        ],
        "additionalProperties": false
      },
      "Limits": {
        "type": "object",
        "properties": {
          "object": {
            "const": "limits"
          },
          "rates": {
            "$ref": "#/components/schemas/Rates"
          },
          "sizes": {
            "type": "object",
            "properties": {
              "max_object_bytes": {
                "type": "integer",
                "minimum": 0
              },
              "single_upload_max_bytes": {
                "type": "integer",
                "minimum": 0
              },
              "max_parts": {
                "type": "integer",
                "minimum": 0
              },
              "max_part_bytes": {
                "type": "integer",
                "minimum": 0
              },
              "min_part_bytes": {
                "type": "integer",
                "minimum": 0
              },
              "upload_session_hours": {
                "type": "integer",
                "minimum": 0
              },
              "url_lifetime_seconds": {
                "type": "object",
                "properties": {
                  "default": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "min": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "max": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "default",
                  "min",
                  "max"
                ],
                "additionalProperties": false
              },
              "storage_grace_days": {
                "type": "integer",
                "minimum": 0,
                "description": "How long Motor keeps the artifacts of a key that can't pay, without charge, before it deletes them."
              },
              "max_metadata_pairs": {
                "type": "integer",
                "minimum": 0
              },
              "max_metadata_bytes": {
                "type": "integer",
                "minimum": 0
              },
              "max_bulk_deletions": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "max_object_bytes",
              "single_upload_max_bytes",
              "max_parts",
              "max_part_bytes",
              "min_part_bytes",
              "upload_session_hours",
              "url_lifetime_seconds",
              "storage_grace_days",
              "max_metadata_pairs",
              "max_metadata_bytes",
              "max_bulk_deletions"
            ],
            "additionalProperties": false
          },
          "request_rates": {
            "type": "object",
            "properties": {
              "team_per_second": {
                "type": "integer",
                "minimum": 0
              },
              "team_burst": {
                "type": "integer",
                "minimum": 0
              },
              "key_per_second": {
                "type": "integer",
                "minimum": 0
              },
              "key_burst": {
                "type": "integer",
                "minimum": 0
              },
              "uploads_per_second": {
                "type": "integer",
                "minimum": 0
              },
              "uploads_burst": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "team_per_second",
              "team_burst",
              "key_per_second",
              "key_burst",
              "uploads_per_second",
              "uploads_burst"
            ],
            "additionalProperties": false
          },
          "downloads_paused": {
            "type": "boolean",
            "description": "Whether Motor stopped issuing download URLs while its usage records from S3 are delayed."
          },
          "usage_feed": {
            "type": "object",
            "properties": {
              "reporting": {
                "const": "delayed"
              },
              "observed_through": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "logs_listed_at": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "typical_delay": {
                "type": "string"
              }
            },
            "required": [
              "reporting",
              "observed_through",
              "logs_listed_at",
              "typical_delay"
            ],
            "additionalProperties": false,
            "description": "Download usage arrives later than the requests. `observed_through` is the latest canary request seen in the logs, not a guarantee that all customer usage through that time has arrived."
          }
        },
        "required": [
          "object",
          "rates",
          "sizes",
          "request_rates",
          "downloads_paused",
          "usage_feed"
        ],
        "additionalProperties": false
      },
      "EstimateCreate": {
        "type": "object",
        "properties": {
          "size_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "storage_days": {
            "type": "integer",
            "minimum": 0,
            "maximum": 36500,
            "description": "Days of storage to price. Default 30."
          },
          "upload_part_urls": {
            "type": "integer",
            "minimum": 0,
            "description": "Part URLs to issue; default the upload's part count."
          },
          "reads": {
            "type": "integer",
            "minimum": 0,
            "description": "Control reads."
          },
          "downloads": {
            "type": "integer",
            "minimum": 0,
            "description": "Successful downloads."
          },
          "download_urls": {
            "type": "integer",
            "minimum": 0,
            "description": "Download URLs to create; default one for each download. Each costs a read."
          },
          "download_bytes": {
            "type": "integer",
            "minimum": 0,
            "description": "Delivered bytes; default `size_bytes` for each download."
          },
          "rate_version": {
            "type": "string"
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "Estimate": {
        "type": "object",
        "properties": {
          "object": {
            "const": "estimate"
          },
          "transport": {
            "enum": [
              "single",
              "multipart"
            ]
          },
          "billable_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "meter": {
                  "enum": [
                    "writes",
                    "reads",
                    "storage_byte_days",
                    "delivery_bytes"
                  ]
                },
                "quantity": {
                  "type": "integer",
                  "minimum": 0
                },
                "cost_usd": {
                  "$ref": "#/components/schemas/Money"
                }
              },
              "required": [
                "meter",
                "quantity",
                "cost_usd"
              ],
              "additionalProperties": false
            }
          },
          "total_usd": {
            "$ref": "#/components/schemas/Money"
          },
          "estimate_cost_usd": {
            "$ref": "#/components/schemas/Money"
          },
          "meter_quantities": {
            "$ref": "#/components/schemas/MeterQuantities"
          },
          "rates": {
            "$ref": "#/components/schemas/Rates"
          },
          "quote_expires_at": {
            "$ref": "#/components/schemas/Time"
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "transport",
          "billable_bytes",
          "lines",
          "total_usd",
          "estimate_cost_usd",
          "meter_quantities",
          "rates",
          "quote_expires_at",
          "note"
        ],
        "additionalProperties": false
      }
    }
  }
}
