{
  "openapi": "3.1.1",
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "info": {
    "title": "Generation API",
    "version": "0.3.0",
    "description": "Compatibility baseline for existing customer generation and browser projection routes. Contracts do not guarantee live ordering or elastic capacity. Structural JSON Schema constraints complement runtime checks for exact identity/link resolution, monetary sums, uniqueness by identifier and qualification."
  },
  "servers": [
    {
      "url": "https://api.reliqua.ai",
      "description": "Canonical customer API origin."
    },
    {
      "url": "https://app.reliqua.ai",
      "description": "Existing application proxy. Browser sessions use their same-origin transport."
    }
  ],
  "tags": [
    {
      "name": "Customer generation",
      "description": "orders:write workspace key; responses omit browser billing."
    },
    {
      "name": "Browser generation",
      "description": "Existing session projection; mutations need approved Origin and matching XSRF. Authorization headers are refused."
    },
    {
      "name": "Customer batch files",
      "description": "OpenAI Batch JSONL inputs for dataset orders on a file."
    }
  ],
  "paths": {
    "/api/v1/generation/catalog": {
      "get": {
        "tags": [
          "Customer generation"
        ],
        "operationId": "keyCatalog",
        "summary": "Read the public generation catalogue",
        "security": [],
        "x-audience": "workspace-api-key",
        "description": "Discovery does not establish account permission, available capacity or ordering eligibility.",
        "responses": {
          "200": {
            "description": "Catalogue and current ordering gates.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationCatalog"
                },
                "examples": {
                  "catalog": {
                    "$ref": "#/components/examples/catalog"
                  }
                }
              }
            }
          },
          "503": {
            "description": "catalog_limit or invalid_catalog",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/dataset-orders/quotes": {
      "post": {
        "tags": [
          "Customer generation"
        ],
        "operationId": "keyQuote",
        "summary": "Create a catalogue or immutable-model quote",
        "security": [
          {
            "workspaceKey": []
          }
        ],
        "x-audience": "workspace-api-key",
        "x-required-api-key-scope": "orders:write",
        "description": "A quote expires after 24 hours. Dataset permission, inputs, source availability, pricing and daily limits are checked. Pinned models additionally undergo metadata, architecture, context and sizing checks. A quote does not reserve credit, procure capacity or launch work.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created quote; review price, limits and expiry.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationQuote"
                },
                "examples": {
                  "catalogQuote": {
                    "$ref": "#/components/examples/catalogQuote"
                  },
                  "pinnedQuote": {
                    "$ref": "#/components/examples/pinnedQuote"
                  },
                  "fileQuote": {
                    "$ref": "#/components/examples/fileQuote"
                  },
                  "fileEvaluationQuote": {
                    "$ref": "#/components/examples/fileEvaluationQuote"
                  }
                }
              }
            }
          },
          "401": {
            "description": "authentication_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope, permission_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request, invalid_quote, unknown_offer, unknown_env, env_not_generatable, thinking_unavailable or greedy_unavailable",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "source_exhausted or pricing_unavailable",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "model_private, model_not_found, model_unsupported, architecture_unsupported, context_too_long, model_too_large or exceeds_generation_deadline",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: daily quote or model lookup admission limit",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "pricing_unavailable, model_lookup_unavailable or architecture_list_unavailable",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/dataset-orders": {
      "get": {
        "tags": [
          "Customer generation"
        ],
        "operationId": "keyOrders",
        "summary": "List the newest 100 owned orders",
        "security": [
          {
            "workspaceKey": []
          }
        ],
        "x-audience": "workspace-api-key",
        "x-required-api-key-scope": "orders:write",
        "description": "Newest 100 across both order modes; created_at descending then id descending. No cursor exists.",
        "responses": {
          "200": {
            "description": "Owned order list.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyOrdersResponse"
                },
                "examples": {
                  "keyOrders": {
                    "$ref": "#/components/examples/keyOrders"
                  }
                }
              }
            }
          },
          "401": {
            "description": "authentication_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "`files` lists orders on batch files too (clients before 0.7 cannot read them, so they are left out by default).",
            "schema": {
              "type": "string",
              "enum": [
                "files"
              ]
            }
          }
        ]
      },
      "post": {
        "tags": [
          "Customer generation"
        ],
        "operationId": "keyCreateOrder",
        "summary": "Confirm one reviewed quote and reserve its price",
        "security": [
          {
            "workspaceKey": []
          }
        ],
        "x-audience": "workspace-api-key",
        "x-required-api-key-scope": "orders:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Confirmation can reserve or spend credits and enqueue work. Permission and dispatch availability are rechecked before replay or placement. Preserve the original quote and key after ambiguous outcomes; inspect owned state before retrying.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "New owned order reserved.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyOrderResponse"
                },
                "examples": {
                  "keyCreatedOrder": {
                    "$ref": "#/components/examples/keyCreatedOrder"
                  }
                }
              }
            }
          },
          "200": {
            "description": "Existing owned order for the same quote and key.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyOrderResponse"
                },
                "examples": {
                  "keyOrder": {
                    "$ref": "#/components/examples/keyOrder"
                  }
                }
              }
            }
          },
          "402": {
            "description": "insufficient_balance includes available balance and quote price.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "examples": {
                  "insufficientBalance": {
                    "$ref": "#/components/examples/insufficientBalance"
                  }
                }
              }
            }
          },
          "401": {
            "description": "authentication_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "not_found: quote missing or not owned",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "orders_unavailable, idempotency_conflict, quote_used, order_limit or source_exhausted",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "410": {
            "description": "quote_expired",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/dataset-orders/{orderId}": {
      "get": {
        "tags": [
          "Customer generation"
        ],
        "operationId": "keyOrder",
        "summary": "Read owned progress and delivery metadata",
        "security": [
          {
            "workspaceKey": []
          }
        ],
        "x-audience": "workspace-api-key",
        "x-required-api-key-scope": "orders:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrderId"
          }
        ],
        "responses": {
          "200": {
            "description": "Owned order detail.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyOrderResponse"
                },
                "examples": {
                  "keyOrder": {
                    "$ref": "#/components/examples/keyOrder"
                  },
                  "keyFileEvaluationOrder": {
                    "$ref": "#/components/examples/keyFileEvaluationOrder"
                  }
                }
              }
            }
          },
          "401": {
            "description": "authentication_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/dataset-orders/{orderId}/cancel": {
      "post": {
        "tags": [
          "Customer generation"
        ],
        "operationId": "keyCancelOrder",
        "summary": "Request cancellation of an owned order",
        "security": [
          {
            "workspaceKey": []
          }
        ],
        "x-audience": "workspace-api-key",
        "x-required-api-key-scope": "orders:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrderId"
          }
        ],
        "description": "Reserved work can release its reservation immediately. Running work can drain and deliver verified output after cancellation is requested. 202 acknowledges acceptance; inspect the returned state. Repeated cancellation is not a generic mutation-retry guarantee.",
        "responses": {
          "202": {
            "description": "Cancellation accepted; resulting owned detail.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyOrderResponse"
                }
              }
            }
          },
          "401": {
            "description": "authentication_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "invalid_state",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/dataset-orders/{orderId}/deliveries/{deliveryId}/files/{fileName}": {
      "get": {
        "tags": [
          "Customer generation"
        ],
        "operationId": "keyDownload",
        "summary": "Read an owned delivery or finite byte range",
        "security": [
          {
            "workspaceKey": []
          }
        ],
        "x-audience": "workspace-api-key",
        "x-required-api-key-scope": "orders:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrderId"
          },
          {
            "$ref": "#/components/parameters/DeliveryId"
          },
          {
            "$ref": "#/components/parameters/FileName"
          },
          {
            "$ref": "#/components/parameters/Range"
          }
        ],
        "description": "Resolve identifiers from owned detail. A range request can receive 200 or 206; validate bytes and Content-Range before assembly. This handler emits no ETag. Browser URLs use the same-origin transport; workspace keys use the customer API origin.",
        "responses": {
          "200": {
            "description": "Whole binary file; apply the client byte bound.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              },
              "Content-Length": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "Accept-Ranges": {
                "schema": {
                  "const": "bytes"
                }
              },
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "206": {
            "description": "Partial binary file.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              },
              "Content-Length": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "Accept-Ranges": {
                "schema": {
                  "const": "bytes"
                }
              },
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store"
                }
              },
              "Content-Range": {
                "schema": {
                  "type": "string",
                  "pattern": "^bytes [0-9]+-[0-9]+/[0-9]+$"
                }
              }
            },
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "authentication_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "file_unavailable",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/batch/catalog": {
      "get": {
        "tags": [
          "Browser generation"
        ],
        "operationId": "browserCatalog",
        "summary": "Read the public generation catalogue",
        "security": [],
        "x-audience": "browser-session",
        "description": "Discovery does not establish account permission, available capacity or ordering eligibility.",
        "responses": {
          "200": {
            "description": "Catalogue and current ordering gates.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationCatalog"
                },
                "examples": {
                  "catalog": {
                    "$ref": "#/components/examples/catalog"
                  }
                }
              }
            }
          },
          "503": {
            "description": "catalog_limit or invalid_catalog",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/batch/quotes": {
      "post": {
        "tags": [
          "Browser generation"
        ],
        "operationId": "browserQuote",
        "summary": "Create a catalogue or immutable-model quote",
        "security": [
          {
            "browserSession": []
          }
        ],
        "x-audience": "browser-session",
        "parameters": [
          {
            "$ref": "#/components/parameters/Origin"
          },
          {
            "$ref": "#/components/parameters/Xsrf"
          }
        ],
        "description": "A quote expires after 24 hours. Dataset permission, inputs, source availability, pricing and daily limits are checked. Pinned models additionally undergo metadata, architecture, context and sizing checks. A quote does not reserve credit, procure capacity or launch work.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created quote; review price, limits and expiry.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationQuote"
                },
                "examples": {
                  "catalogQuote": {
                    "$ref": "#/components/examples/catalogQuote"
                  },
                  "pinnedQuote": {
                    "$ref": "#/components/examples/pinnedQuote"
                  }
                }
              }
            }
          },
          "401": {
            "description": "authentication_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "session_required, invalid_origin, invalid_xsrf, permission_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request, invalid_quote, unknown_offer, unknown_env, env_not_generatable, thinking_unavailable or greedy_unavailable",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "source_exhausted or pricing_unavailable",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "model_private, model_not_found, model_unsupported, architecture_unsupported, context_too_long, model_too_large or exceeds_generation_deadline",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: daily quote or model lookup admission limit",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "pricing_unavailable, model_lookup_unavailable or architecture_list_unavailable",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/batch/orders": {
      "get": {
        "tags": [
          "Browser generation"
        ],
        "operationId": "browserOrders",
        "summary": "List the newest 100 owned orders",
        "security": [
          {
            "browserSession": []
          }
        ],
        "x-audience": "browser-session",
        "description": "Newest 100 across both order modes; created_at descending then id descending. No cursor exists.",
        "responses": {
          "200": {
            "description": "Owned order list.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserOrdersResponse"
                },
                "examples": {
                  "browserOrders": {
                    "$ref": "#/components/examples/browserOrders"
                  }
                }
              }
            }
          },
          "401": {
            "description": "authentication_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "session_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "invalid_order",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Browser generation"
        ],
        "operationId": "browserCreateOrder",
        "summary": "Confirm one reviewed quote and reserve its price",
        "security": [
          {
            "browserSession": []
          }
        ],
        "x-audience": "browser-session",
        "parameters": [
          {
            "$ref": "#/components/parameters/Origin"
          },
          {
            "$ref": "#/components/parameters/Xsrf"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Confirmation can reserve or spend credits and enqueue work. Permission and dispatch availability are rechecked before replay or placement. Preserve the original quote and key after ambiguous outcomes; inspect owned state before retrying.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "New owned order reserved.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserOrderResponse"
                },
                "examples": {
                  "browserCreatedOrder": {
                    "$ref": "#/components/examples/browserCreatedOrder"
                  }
                }
              }
            }
          },
          "200": {
            "description": "Existing owned order for the same quote and key.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserOrderResponse"
                },
                "examples": {
                  "browserOrder": {
                    "$ref": "#/components/examples/browserOrder"
                  }
                }
              }
            }
          },
          "402": {
            "description": "insufficient_balance includes available balance and quote price.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "examples": {
                  "insufficientBalance": {
                    "$ref": "#/components/examples/insufficientBalance"
                  }
                }
              }
            }
          },
          "401": {
            "description": "authentication_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "session_required, invalid_origin, invalid_xsrf",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "not_found: quote missing or not owned",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "orders_unavailable, idempotency_conflict, quote_used, order_limit or source_exhausted",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "410": {
            "description": "quote_expired",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/batch/orders/{orderId}": {
      "get": {
        "tags": [
          "Browser generation"
        ],
        "operationId": "browserOrder",
        "summary": "Read owned progress and delivery metadata",
        "security": [
          {
            "browserSession": []
          }
        ],
        "x-audience": "browser-session",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrderId"
          }
        ],
        "responses": {
          "200": {
            "description": "Owned order detail.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserOrderResponse"
                },
                "examples": {
                  "browserOrder": {
                    "$ref": "#/components/examples/browserOrder"
                  }
                }
              }
            }
          },
          "401": {
            "description": "authentication_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "session_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "invalid_order",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/batch/orders/{orderId}/cancel": {
      "post": {
        "tags": [
          "Browser generation"
        ],
        "operationId": "browserCancelOrder",
        "summary": "Request cancellation of an owned order",
        "security": [
          {
            "browserSession": []
          }
        ],
        "x-audience": "browser-session",
        "parameters": [
          {
            "$ref": "#/components/parameters/Origin"
          },
          {
            "$ref": "#/components/parameters/Xsrf"
          },
          {
            "$ref": "#/components/parameters/OrderId"
          }
        ],
        "description": "Reserved work can release its reservation immediately. Running work can drain and deliver verified output after cancellation is requested. 202 acknowledges acceptance; inspect the returned state. Repeated cancellation is not a generic mutation-retry guarantee.",
        "responses": {
          "202": {
            "description": "Cancellation accepted; resulting owned detail.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserOrderResponse"
                }
              }
            }
          },
          "401": {
            "description": "authentication_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "session_required, invalid_origin, invalid_xsrf",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "invalid_state",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "invalid_order",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/batch/orders/{orderId}/deliveries/{deliveryId}/files/{fileName}": {
      "get": {
        "tags": [
          "Browser generation"
        ],
        "operationId": "browserDownload",
        "summary": "Read an owned delivery or finite byte range",
        "security": [
          {
            "browserSession": []
          }
        ],
        "x-audience": "browser-session",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrderId"
          },
          {
            "$ref": "#/components/parameters/DeliveryId"
          },
          {
            "$ref": "#/components/parameters/FileName"
          },
          {
            "$ref": "#/components/parameters/Range"
          }
        ],
        "description": "Resolve identifiers from owned detail. A range request can receive 200 or 206; validate bytes and Content-Range before assembly. This handler emits no ETag. Browser URLs use the same-origin transport; workspace keys use the customer API origin.",
        "responses": {
          "200": {
            "description": "Whole binary file; apply the client byte bound.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              },
              "Content-Length": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "Accept-Ranges": {
                "schema": {
                  "const": "bytes"
                }
              },
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "206": {
            "description": "Partial binary file.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              },
              "Content-Length": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "Accept-Ranges": {
                "schema": {
                  "const": "bytes"
                }
              },
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store"
                }
              },
              "Content-Range": {
                "schema": {
                  "type": "string",
                  "pattern": "^bytes [0-9]+-[0-9]+/[0-9]+$"
                }
              }
            },
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "authentication_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "session_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "file_unavailable",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/files": {
      "get": {
        "tags": [
          "Customer batch files"
        ],
        "operationId": "keyListFiles",
        "summary": "List recent batch files",
        "security": [
          {
            "workspaceKey": []
          }
        ],
        "x-audience": "workspace-api-key",
        "x-required-api-key-scope": "orders:write",
        "description": "The 100 most recent owned batch files.",
        "parameters": [
          {
            "$ref": "#/components/parameters/FilePurpose"
          }
        ],
        "responses": {
          "200": {
            "description": "Owned batch files.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchFileList"
                },
                "examples": {
                  "batchFileList": {
                    "$ref": "#/components/examples/batchFileList"
                  }
                }
              }
            }
          },
          "401": {
            "description": "authentication_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope, permission_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Customer batch files"
        ],
        "operationId": "keyCreateFile",
        "summary": "Start a batch file upload",
        "security": [
          {
            "workspaceKey": []
          }
        ],
        "x-audience": "workspace-api-key",
        "x-required-api-key-scope": "orders:write",
        "description": "Declares a JSONL file of at most 200 MB; the answer gives the parts to send. Nothing is quoted or charged.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchFileInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Upload started.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchFile"
                },
                "examples": {
                  "batchFile": {
                    "$ref": "#/components/examples/batchFile"
                  }
                }
              }
            }
          },
          "400": {
            "description": "invalid_request, file_too_large",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "authentication_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope, permission_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/files/{fileId}": {
      "get": {
        "tags": [
          "Customer batch files"
        ],
        "operationId": "keyGetFile",
        "summary": "Read a batch file",
        "security": [
          {
            "workspaceKey": []
          }
        ],
        "x-audience": "workspace-api-key",
        "x-required-api-key-scope": "orders:write",
        "description": "An owned batch file's record.",
        "parameters": [
          {
            "$ref": "#/components/parameters/FileId"
          }
        ],
        "responses": {
          "200": {
            "description": "The file.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchFile"
                },
                "examples": {
                  "batchFileProcessed": {
                    "$ref": "#/components/examples/batchFileProcessed"
                  }
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "authentication_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope, permission_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/files/{fileId}/parts/{part}": {
      "put": {
        "tags": [
          "Customer batch files"
        ],
        "operationId": "keyPutFilePart",
        "summary": "Send one part of a batch file",
        "security": [
          {
            "workspaceKey": []
          }
        ],
        "x-audience": "workspace-api-key",
        "x-required-api-key-scope": "orders:write",
        "description": "Raw bytes; every part but the last is exactly part_size bytes. Sending a part again replaces it (idempotent).",
        "parameters": [
          {
            "$ref": "#/components/parameters/FileId"
          },
          {
            "$ref": "#/components/parameters/PartNumber"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Part stored.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchFilePart"
                }
              }
            }
          },
          "400": {
            "description": "invalid_part",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "file_processed",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "authentication_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope, permission_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/files/{fileId}/complete": {
      "post": {
        "tags": [
          "Customer batch files"
        ],
        "operationId": "keyCompleteFile",
        "summary": "Finish a batch file upload",
        "security": [
          {
            "workspaceKey": []
          }
        ],
        "x-audience": "workspace-api-key",
        "x-required-api-key-scope": "orders:write",
        "description": "Assembles the parts and checks the declared size; the file can then be quoted.",
        "parameters": [
          {
            "$ref": "#/components/parameters/FileId"
          }
        ],
        "responses": {
          "200": {
            "description": "Processed file.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchFile"
                },
                "examples": {
                  "batchFileProcessed": {
                    "$ref": "#/components/examples/batchFileProcessed"
                  }
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "parts_missing",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "authentication_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope, permission_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/files/{fileId}/content": {
      "get": {
        "tags": [
          "Customer batch files"
        ],
        "operationId": "keyFileContent",
        "summary": "Read a batch file's bytes",
        "security": [
          {
            "workspaceKey": []
          }
        ],
        "x-audience": "workspace-api-key",
        "x-required-api-key-scope": "orders:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/FileId"
          },
          {
            "$ref": "#/components/parameters/Range"
          }
        ],
        "description": "The uploaded bytes, whole or by Range.",
        "responses": {
          "200": {
            "description": "Whole binary file; apply the client byte bound.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              },
              "Content-Length": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "Accept-Ranges": {
                "schema": {
                  "const": "bytes"
                }
              },
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "206": {
            "description": "Partial binary file.",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              },
              "Content-Length": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "Accept-Ranges": {
                "schema": {
                  "const": "bytes"
                }
              },
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store"
                }
              },
              "Content-Range": {
                "schema": {
                  "type": "string",
                  "pattern": "^bytes [0-9]+-[0-9]+/[0-9]+$"
                }
              }
            },
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "authentication_required",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "file_unavailable",
            "headers": {
              "X-Request-ID": {
                "description": "Safe request reference.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "workspaceKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "rlq_ followed by 48 hexadecimal characters",
        "description": "Account workspace key with orders:write. Expiry, revocation, account access and ownership remain server checks."
      },
      "browserSession": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__Host-reliquary_session",
        "description": "Existing HTTPS session. No workspace key on browser routes. Local HTTP development uses the unprefixed cookie through its configured transport."
      }
    },
    "parameters": {
      "OrderId": {
        "name": "orderId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{1,64}$"
        }
      },
      "DeliveryId": {
        "name": "deliveryId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{1,80}$"
        }
      },
      "FileName": {
        "name": "fileName",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "description": "Flat filename from an owned delivery. Percent-encode the segment; never follow an arbitrary URL."
      },
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{16,80}$"
        },
        "description": "Stable key for this account and exact quote. Preserve quote_id and key after ambiguous outcomes. Another quote with the same key returns 409; successful replay returns 200 and new placement 201. No automatic mutation retry."
      },
      "Origin": {
        "name": "Origin",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uri"
        },
        "description": "Browser mutations require the request origin or a configured approved app origin. Sec-Fetch-Site, when present, must be same-origin."
      },
      "Xsrf": {
        "name": "X-XSRF-TOKEN",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1
        },
        "description": "Must match the XSRF-TOKEN cookie. The existing browser transport supplies it."
      },
      "Range": {
        "name": "Range",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "pattern": "^bytes=[0-9]+-[0-9]+$"
        },
        "description": "Use a finite bytes=start-end interval for bounded client reads. Clients check safe bounds, ordering and their maximum byte limit. This server also supports whole-file responses and delegates range semantics to storage; it imposes no application-level range-size cap."
      },
      "FileId": {
        "name": "fileId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^file-[A-Za-z0-9_-]{1,80}$"
        }
      },
      "PartNumber": {
        "name": "part",
        "in": "path",
        "required": true,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10000
        }
      },
      "FilePurpose": {
        "name": "purpose",
        "in": "query",
        "required": true,
        "schema": {
          "const": "batch"
        }
      }
    },
    "schemas": {
      "GenerationSource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "prompts_available": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "thinking": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "prompts_available",
          "thinking"
        ]
      },
      "CatalogModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "sources": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/GenerationSource"
            }
          },
          "model": {
            "type": "object",
            "properties": {
              "repo": {
                "type": "string",
                "maxLength": 194,
                "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"
              },
              "revision": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              }
            },
            "required": [
              "repo",
              "revision"
            ]
          },
          "price_per_mtok_usd": {
            "type": "number",
            "minimum": 0
          }
        },
        "required": [
          "id",
          "name",
          "sources"
        ]
      },
      "GenerationCatalog": {
        "type": "object",
        "properties": {
          "ordering": {
            "enum": [
              "pilot",
              "disabled"
            ]
          },
          "any_model_ordering": {
            "enum": [
              "pilot",
              "disabled"
            ]
          },
          "envs": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/GenerationSource"
            }
          },
          "models": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/CatalogModel"
            }
          },
          "architectures": {
            "anyOf": [
              {
                "type": "array",
                "maxItems": 100,
                "uniqueItems": true,
                "items": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_]{1,200}$"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Model architectures (config.json architectures[0]) that pinned-model, Batch API and evaluation quotes accept; another architecture is refused with 422 architecture_unsupported. null until the platform has first read the list."
          }
        },
        "required": [
          "ordering",
          "any_model_ordering",
          "envs",
          "models",
          "architectures"
        ],
        "description": "Public qualified catalogue and ordering gates. Discovery, price or a pilot flag does not prove account access, execution capacity or availability at confirmation."
      },
      "Sampling": {
        "type": "object",
        "properties": {
          "temperature": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 2,
            "default": 0.6
          },
          "top_p": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 1,
            "default": 0.95
          },
          "top_k": {
            "oneOf": [
              {
                "const": -1
              },
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000
              }
            ],
            "default": 20
          }
        },
        "required": [
          "temperature",
          "top_p",
          "top_k"
        ],
        "additionalProperties": false
      },
      "SamplingInput": {
        "type": "object",
        "properties": {
          "temperature": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 2,
            "default": 0.6
          },
          "top_p": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 1,
            "default": 0.95
          },
          "top_k": {
            "oneOf": [
              {
                "const": -1
              },
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000
              }
            ],
            "default": 20
          }
        },
        "required": [],
        "additionalProperties": false,
        "description": "Omitted fields use the defaults shown. Generation refuses temperature zero."
      },
      "CatalogQuoteInput": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "Catalogue model id."
          },
          "prompt_count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000
          },
          "samples_per_prompt": {
            "type": "integer",
            "minimum": 1,
            "maximum": 64
          },
          "max_new_tokens": {
            "type": "integer",
            "minimum": 16,
            "maximum": 32768
          },
          "thinking": {
            "type": "boolean"
          },
          "source": {
            "type": "string",
            "description": "Source id belonging to the selected catalogue model."
          }
        },
        "required": [
          "model",
          "prompt_count",
          "samples_per_prompt",
          "max_new_tokens",
          "thinking",
          "source"
        ],
        "additionalProperties": false
      },
      "PinnedQuoteInput": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "maxLength": 194,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}/[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$",
            "description": "Public repository. Runtime validation additionally refuses double-dot segments."
          },
          "prompt_count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000
          },
          "samples_per_prompt": {
            "type": "integer",
            "minimum": 1,
            "maximum": 64
          },
          "max_new_tokens": {
            "type": "integer",
            "minimum": 16,
            "maximum": 131072
          },
          "thinking": {
            "type": "boolean"
          },
          "revision": {
            "type": "string",
            "pattern": "^[0-9a-f]{40}$"
          },
          "env": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.-]{1,64}$"
          },
          "sampling": {
            "$ref": "#/components/schemas/SamplingInput"
          }
        },
        "required": [
          "model",
          "prompt_count",
          "samples_per_prompt",
          "max_new_tokens",
          "thinking",
          "revision",
          "env"
        ],
        "additionalProperties": false
      },
      "QuoteInput": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CatalogQuoteInput"
          },
          {
            "$ref": "#/components/schemas/PinnedQuoteInput"
          },
          {
            "$ref": "#/components/schemas/FileQuoteInput"
          }
        ]
      },
      "QuoteBase": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "prompt_count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000
          },
          "samples_per_prompt": {
            "type": "integer",
            "minimum": 1,
            "maximum": 64
          },
          "max_new_tokens": {
            "type": "integer",
            "minimum": 16,
            "maximum": 131072
          },
          "thinking": {
            "type": "boolean"
          },
          "quote_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,64}$"
          },
          "price_usd": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 1000000,
            "description": "USD to six decimal places. Runtime validation checks precision and monetary arithmetic."
          },
          "est_tokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "eta_hours": {
            "type": "number",
            "minimum": 0
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "maxLength": 40
          }
        },
        "required": [
          "model",
          "prompt_count",
          "samples_per_prompt",
          "max_new_tokens",
          "thinking",
          "quote_id",
          "price_usd",
          "est_tokens",
          "eta_hours",
          "expires_at"
        ]
      },
      "CatalogQuote": {
        "allOf": [
          {
            "$ref": "#/components/schemas/QuoteBase"
          },
          {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "max_new_tokens": {
                "type": "integer",
                "minimum": 16,
                "maximum": 32768
              }
            },
            "required": [
              "source",
              "max_new_tokens"
            ]
          }
        ],
        "not": {
          "anyOf": [
            {
              "required": [
                "revision"
              ]
            },
            {
              "required": [
                "env"
              ]
            }
          ]
        }
      },
      "PinnedQuote": {
        "allOf": [
          {
            "$ref": "#/components/schemas/QuoteBase"
          },
          {
            "type": "object",
            "properties": {
              "model": {
                "type": "string",
                "maxLength": 194,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}/[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$",
                "description": "Public repository. Runtime validation additionally refuses double-dot segments."
              },
              "revision": {
                "type": "string",
                "pattern": "^[0-9a-f]{40}$"
              },
              "env": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              },
              "gpu_count": {
                "type": "integer",
                "minimum": 1,
                "maximum": 8
              },
              "sampling": {
                "$ref": "#/components/schemas/Sampling"
              },
              "architecture": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "est_price_usd": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000,
                "description": "USD to six decimal places. Runtime validation checks precision and monetary arithmetic."
              },
              "max_tokens": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "max_hours": {
                "type": "number",
                "minimum": 0
              },
              "pricing": {
                "type": "object",
                "description": "Server pricing terms. Estimates and the reservation ceiling remain separate; new terms may be added."
              },
              "capacity": {
                "$ref": "#/components/schemas/QuoteCapacity"
              }
            },
            "required": [
              "model",
              "revision",
              "env",
              "gpu_count",
              "sampling",
              "architecture",
              "est_price_usd",
              "max_tokens",
              "max_hours",
              "pricing"
            ]
          }
        ],
        "not": {
          "required": [
            "source"
          ]
        }
      },
      "GenerationQuote": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CatalogQuote"
          },
          {
            "$ref": "#/components/schemas/PinnedQuote"
          },
          {
            "$ref": "#/components/schemas/FileQuote"
          }
        ]
      },
      "CreateOrderInput": {
        "type": "object",
        "properties": {
          "quote_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,64}$"
          }
        },
        "required": [
          "quote_id"
        ],
        "description": "Confirm the reviewed quote. Extra JSON fields are accepted by the current handler but only quote_id is used."
      },
      "OrderProgress": {
        "type": "object",
        "properties": {
          "state": {
            "enum": [
              "open",
              "full",
              "retired",
              "drained"
            ]
          },
          "prompts_total": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "prompts_full": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "submissions_accepted": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "audited": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "passed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "verified_tokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "settled": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "accepted_last_hour": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "counts_complete": {
            "type": "boolean"
          },
          "observed_at": {
            "type": "string",
            "format": "date-time",
            "maxLength": 40
          }
        },
        "required": [
          "state",
          "prompts_total",
          "prompts_full",
          "submissions_accepted",
          "audited",
          "passed",
          "verified_tokens",
          "settled",
          "accepted_last_hour",
          "counts_complete",
          "observed_at"
        ],
        "description": "Published observations. Acceptance, audit, passing, settlement and realized payout are distinct outcomes."
      },
      "OrderBase": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "prompt_count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000
          },
          "samples_per_prompt": {
            "type": "integer",
            "minimum": 1,
            "maximum": 64
          },
          "max_new_tokens": {
            "type": "integer",
            "minimum": 16,
            "maximum": 131072
          },
          "thinking": {
            "type": "boolean"
          },
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,64}$"
          },
          "status": {
            "enum": [
              "reserved",
              "provisioning",
              "qualifying",
              "queued",
              "running",
              "draining",
              "exporting",
              "delivered",
              "cancelled",
              "failed"
            ]
          },
          "price_usd": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000,
            "description": "Nonnegative historical order price in USD, to six decimal places. Quotes retain their separate 0.01 USD minimum; runtime validation checks precision."
          },
          "cancel_requested": {
            "type": "boolean"
          },
          "status_reason": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1000
          },
          "needs_attention": {
            "type": "boolean"
          },
          "progress": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OrderProgress"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "maxLength": 40
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "maxLength": 40
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "maxLength": 40
          },
          "queue_position": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "estimated_start_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "maxLength": 40,
            "description": "Estimated start, or null when the server cannot estimate it."
          }
        },
        "required": [
          "model",
          "prompt_count",
          "samples_per_prompt",
          "max_new_tokens",
          "thinking",
          "id",
          "status",
          "price_usd",
          "cancel_requested",
          "status_reason",
          "needs_attention",
          "progress",
          "created_at",
          "updated_at",
          "finished_at"
        ],
        "dependentRequired": {
          "queue_position": [
            "estimated_start_at"
          ],
          "estimated_start_at": [
            "queue_position"
          ]
        }
      },
      "CatalogOrder": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OrderBase"
          },
          {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "max_new_tokens": {
                "type": "integer",
                "minimum": 16,
                "maximum": 32768
              }
            },
            "required": [
              "source",
              "max_new_tokens"
            ]
          }
        ],
        "not": {
          "anyOf": [
            {
              "required": [
                "revision"
              ]
            },
            {
              "required": [
                "env"
              ]
            }
          ]
        }
      },
      "PinnedOrder": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OrderBase"
          },
          {
            "type": "object",
            "properties": {
              "model": {
                "type": "string",
                "maxLength": 194,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}/[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$",
                "description": "Public repository. Runtime validation additionally refuses double-dot segments."
              },
              "revision": {
                "type": "string",
                "pattern": "^[0-9a-f]{40}$"
              },
              "env": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.-]{1,64}$"
              },
              "gpu_count": {
                "type": "integer",
                "minimum": 1,
                "maximum": 8
              },
              "sampling": {
                "$ref": "#/components/schemas/Sampling"
              }
            },
            "required": [
              "model",
              "revision",
              "env",
              "gpu_count",
              "sampling"
            ]
          }
        ],
        "not": {
          "required": [
            "source"
          ]
        }
      },
      "KeyOrder": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CatalogOrder"
          },
          {
            "$ref": "#/components/schemas/PinnedOrder"
          },
          {
            "$ref": "#/components/schemas/FileOrder"
          }
        ],
        "description": "API-key projection omits browser billing. Do not synthesize a finance receipt from its price/refund fields."
      },
      "BrowserBilling": {
        "type": "object",
        "properties": {
          "status": {
            "enum": [
              "held",
              "settled"
            ]
          },
          "reserved_micro_usd": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000000
          },
          "held_micro_usd": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000000
          },
          "released_micro_usd": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000000
          },
          "charged_micro_usd": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 1000000000000
          }
        },
        "required": [
          "status",
          "reserved_micro_usd",
          "held_micro_usd",
          "released_micro_usd",
          "charged_micro_usd"
        ],
        "description": "Micro-USD receipt. Runtime validators check held+released=reserved while held, charged+released=reserved and held=0 when settled, and reservation versus order price."
      },
      "BrowserOrder": {
        "allOf": [
          {
            "$ref": "#/components/schemas/KeyOrder"
          },
          {
            "type": "object",
            "properties": {
              "billing": {
                "$ref": "#/components/schemas/BrowserBilling"
              },
              "price_usd": {
                "type": "number",
                "minimum": 0.01,
                "maximum": 1000000,
                "description": "Existing browser projection accepts order prices of at least 0.01 USD."
              }
            },
            "required": [
              "billing"
            ]
          }
        ]
      },
      "ApiError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ]
          },
          "balance_usd": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000,
            "description": "USD to six decimal places. Runtime validation checks precision and monetary arithmetic."
          },
          "price_usd": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000,
            "description": "USD to six decimal places. Runtime validation checks precision and monetary arithmetic."
          }
        },
        "required": [
          "error"
        ],
        "description": "Safe server error. Insufficient-balance errors also contain balance_usd and price_usd. Request references use X-Request-ID, not an error-body field."
      },
      "KeyDeliveryFile": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "size": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "sha256": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9a-f]{64}$"
          },
          "url": {
            "type": "string",
            "pattern": "^/api/v1/dataset-orders/[A-Za-z0-9_-]{1,64}/deliveries/[A-Za-z0-9_-]{1,80}/files/.+$",
            "description": "Owned relative download route. Runtime validation binds order id, delivery id and percent-encoded filename."
          }
        },
        "required": [
          "name",
          "size",
          "sha256",
          "url"
        ]
      },
      "KeyDelivery": {
        "type": "object",
        "properties": {
          "delivery_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,80}$"
          },
          "files": {
            "type": "array",
            "maxItems": 1000,
            "items": {
              "$ref": "#/components/schemas/KeyDeliveryFile"
            }
          }
        },
        "required": [
          "delivery_id",
          "files"
        ]
      },
      "KeyOrderDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/KeyOrder"
          },
          {
            "type": "object",
            "properties": {
              "refunded_usd": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000,
                "description": "USD to six decimal places. Runtime validation checks precision and monetary arithmetic."
              },
              "deliveries": {
                "type": "array",
                "maxItems": 100,
                "items": {
                  "$ref": "#/components/schemas/KeyDelivery"
                }
              }
            },
            "required": [
              "refunded_usd",
              "deliveries"
            ]
          }
        ]
      },
      "KeyOrdersResponse": {
        "type": "object",
        "properties": {
          "orders": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/KeyOrder"
            }
          }
        },
        "required": [
          "orders"
        ],
        "description": "Newest 100 owned orders, created_at descending then id descending. No cursor or pagination exists."
      },
      "KeyOrderResponse": {
        "type": "object",
        "properties": {
          "order": {
            "$ref": "#/components/schemas/KeyOrderDetail"
          }
        },
        "required": [
          "order"
        ]
      },
      "BrowserDeliveryFile": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "size": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "sha256": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9a-f]{64}$"
          },
          "url": {
            "type": "string",
            "pattern": "^/api/batch/orders/[A-Za-z0-9_-]{1,64}/deliveries/[A-Za-z0-9_-]{1,80}/files/.+$",
            "description": "Owned relative download route. Runtime validation binds order id, delivery id and percent-encoded filename."
          }
        },
        "required": [
          "name",
          "size",
          "sha256",
          "url"
        ]
      },
      "BrowserDelivery": {
        "type": "object",
        "properties": {
          "delivery_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,80}$"
          },
          "files": {
            "type": "array",
            "maxItems": 1000,
            "items": {
              "$ref": "#/components/schemas/BrowserDeliveryFile"
            }
          }
        },
        "required": [
          "delivery_id",
          "files"
        ]
      },
      "BrowserOrderDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BrowserOrder"
          },
          {
            "type": "object",
            "properties": {
              "refunded_usd": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000,
                "description": "USD to six decimal places. Runtime validation checks precision and monetary arithmetic."
              },
              "deliveries": {
                "type": "array",
                "maxItems": 100,
                "items": {
                  "$ref": "#/components/schemas/BrowserDelivery"
                }
              }
            },
            "required": [
              "refunded_usd",
              "deliveries"
            ]
          }
        ]
      },
      "BrowserOrdersResponse": {
        "type": "object",
        "properties": {
          "orders": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/BrowserOrder"
            }
          }
        },
        "required": [
          "orders"
        ],
        "description": "Newest 100 owned orders, created_at descending then id descending. No cursor or pagination exists."
      },
      "BrowserOrderResponse": {
        "type": "object",
        "properties": {
          "order": {
            "$ref": "#/components/schemas/BrowserOrderDetail"
          }
        },
        "required": [
          "order"
        ]
      },
      "BatchFileInput": {
        "type": "object",
        "properties": {
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "No path separators or control characters."
          },
          "bytes": {
            "type": "integer",
            "minimum": 1,
            "maximum": 209715200
          },
          "purpose": {
            "const": "batch"
          }
        },
        "required": [
          "filename",
          "bytes",
          "purpose"
        ],
        "additionalProperties": false
      },
      "BatchFile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^file-[A-Za-z0-9_-]{1,80}$"
          },
          "object": {
            "const": "file"
          },
          "bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 209715200
          },
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "purpose": {
            "const": "batch"
          },
          "status": {
            "enum": [
              "uploading",
              "processed"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "upload": {
            "type": "object",
            "description": "Present while uploading: send parts 1..parts, every part but the last exactly part_size bytes.",
            "properties": {
              "part_size": {
                "type": "integer",
                "minimum": 1,
                "maximum": 67108864
              },
              "parts": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10000
              }
            },
            "required": [
              "part_size",
              "parts"
            ],
            "additionalProperties": false
          },
          "sha256": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9a-f]{64}$",
            "description": "Present once processed: the SHA-256 of the whole file, or null until the platform has read a file uploaded in parts (its first quote reads it)."
          }
        },
        "required": [
          "id",
          "object",
          "bytes",
          "filename",
          "purpose",
          "status",
          "created_at"
        ],
        "additionalProperties": false
      },
      "BatchFileList": {
        "type": "object",
        "properties": {
          "object": {
            "const": "list"
          },
          "data": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/BatchFile"
            }
          }
        },
        "required": [
          "object",
          "data"
        ],
        "additionalProperties": false
      },
      "BatchFilePart": {
        "type": "object",
        "properties": {
          "part": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          },
          "etag": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        },
        "required": [
          "part",
          "etag"
        ],
        "additionalProperties": false
      },
      "FileQuoteInput": {
        "type": "object",
        "description": "A quote on an uploaded OpenAI Batch JSONL file. Its lines carry their messages and sampling; v1 takes one sampling per file. With grader, each line also carries a reference and the order is an evaluation.",
        "properties": {
          "model": {
            "type": "string",
            "maxLength": 194,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}/[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
          },
          "revision": {
            "type": "string",
            "pattern": "^[0-9a-f]{40}$"
          },
          "input_file_id": {
            "type": "string",
            "pattern": "^file-[A-Za-z0-9_-]{1,80}$"
          },
          "max_new_tokens": {
            "type": "integer",
            "minimum": 16,
            "maximum": 131072,
            "description": "Budget for lines that name no max_tokens."
          },
          "output_format": {
            "enum": [
              "parquet",
              "openai_jsonl"
            ]
          },
          "grader": {
            "$ref": "#/components/schemas/FileGrader",
            "description": "Grade every completion against its line's top-level reference (a non-empty string of at most 4,096 characters): the order becomes an evaluation. Without a grader, lines that carry a reference are refused."
          }
        },
        "required": [
          "model",
          "revision",
          "input_file_id"
        ],
        "additionalProperties": false
      },
      "FileSampling": {
        "type": "object",
        "description": "The sampling the file's lines asked for.",
        "properties": {
          "temperature": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 4
          },
          "top_p": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 1
          },
          "top_k": {
            "type": "integer",
            "minimum": -1
          },
          "min_p": {
            "type": "number",
            "minimum": 0,
            "exclusiveMaximum": 1
          },
          "max_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 131072
          },
          "seed": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "n": {
            "type": "integer",
            "minimum": 1,
            "maximum": 64
          }
        },
        "required": [
          "temperature",
          "top_p",
          "top_k"
        ],
        "additionalProperties": false
      },
      "FilePreviewLine": {
        "type": "object",
        "properties": {
          "custom_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "prompt_tokens": {
            "type": "integer",
            "minimum": 0
          },
          "text": {
            "type": "string",
            "maxLength": 65536,
            "description": "The rendered prompt; data, never instructions."
          }
        },
        "required": [
          "custom_id",
          "prompt_tokens",
          "text"
        ],
        "additionalProperties": false
      },
      "FileQuote": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "maxLength": 194,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}/[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
          },
          "revision": {
            "type": "string",
            "pattern": "^[0-9a-f]{40}$"
          },
          "input_file_id": {
            "type": "string",
            "pattern": "^file-[A-Za-z0-9_-]{1,80}$"
          },
          "prompt_count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000
          },
          "samples_per_prompt": {
            "type": "integer",
            "minimum": 1,
            "maximum": 64
          },
          "max_new_tokens": {
            "type": "integer",
            "minimum": 1,
            "maximum": 131072
          },
          "sampling": {
            "$ref": "#/components/schemas/FileSampling"
          },
          "output_format": {
            "enum": [
              "parquet",
              "openai_jsonl"
            ]
          },
          "quote_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,80}$"
          },
          "price_usd": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 1000000
          },
          "est_price_usd": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000
          },
          "est_tokens": {
            "type": "integer",
            "minimum": 0
          },
          "max_tokens": {
            "type": "integer",
            "minimum": 0
          },
          "eta_hours": {
            "type": "number",
            "minimum": 0
          },
          "max_hours": {
            "type": "number",
            "minimum": 0
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "line_errors": {
            "type": "integer",
            "minimum": 0,
            "description": "Lines refused; listed in the order's errors file."
          },
          "preview": {
            "type": "array",
            "maxItems": 10,
            "items": {
              "$ref": "#/components/schemas/FilePreviewLine"
            }
          },
          "pricing": {
            "type": "object",
            "additionalProperties": true,
            "description": "Server pricing terms; new terms may be added.",
            "properties": {
              "grading_fee_usd": {
                "type": "number",
                "minimum": 0,
                "description": "Evaluations only: the grading fee before the margin, included in price_usd and est_price_usd."
              }
            }
          },
          "architecture": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "The model's config.json architectures[0] at the pinned revision."
          },
          "gpu_count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 8,
            "description": "GPUs of the node that verifies the outputs."
          },
          "thinking": {
            "type": "boolean",
            "description": "Always false for a file: the lines' chat_template_kwargs decide thinking."
          },
          "verification": {
            "const": "draw",
            "description": "Every sample follows the public seeded (forced) draw."
          },
          "seed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "The seed the file's lines set; absent when they set none."
          },
          "purpose": {
            "const": "eval",
            "description": "Present on evaluations only."
          },
          "grader": {
            "$ref": "#/components/schemas/FileGrader"
          },
          "capacity": {
            "$ref": "#/components/schemas/QuoteCapacity"
          }
        },
        "required": [
          "quote_id",
          "price_usd",
          "est_price_usd",
          "est_tokens",
          "max_tokens",
          "eta_hours",
          "max_hours",
          "expires_at",
          "model",
          "revision",
          "input_file_id",
          "prompt_count",
          "samples_per_prompt",
          "max_new_tokens",
          "sampling",
          "line_errors",
          "preview",
          "pricing",
          "architecture",
          "gpu_count",
          "thinking"
        ],
        "additionalProperties": false,
        "dependentRequired": {
          "purpose": [
            "grader"
          ],
          "grader": [
            "purpose"
          ]
        }
      },
      "FileOrder": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OrderBase"
          },
          {
            "type": "object",
            "properties": {
              "model": {
                "type": "string",
                "maxLength": 194,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}/[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
              },
              "revision": {
                "type": "string",
                "pattern": "^[0-9a-f]{40}$"
              },
              "input_file_id": {
                "type": "string",
                "pattern": "^file-[A-Za-z0-9_-]{1,80}$"
              },
              "prompt_count": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000000
              },
              "samples_per_prompt": {
                "type": "integer",
                "minimum": 1,
                "maximum": 64
              },
              "max_new_tokens": {
                "type": "integer",
                "minimum": 1,
                "maximum": 131072
              },
              "sampling": {
                "$ref": "#/components/schemas/FileSampling"
              },
              "output_format": {
                "enum": [
                  "parquet",
                  "openai_jsonl"
                ]
              },
              "gpu_count": {
                "type": "integer",
                "minimum": 1,
                "maximum": 8
              },
              "verification": {
                "const": "draw"
              },
              "seed": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "purpose": {
                "const": "eval",
                "description": "Present on evaluations only, with evaluation."
              },
              "evaluation": {
                "$ref": "#/components/schemas/FileEvaluation"
              }
            },
            "required": [
              "model",
              "revision",
              "input_file_id",
              "sampling"
            ],
            "dependentRequired": {
              "purpose": [
                "evaluation"
              ],
              "evaluation": [
                "purpose"
              ]
            },
            "description": "An order on an uploaded file. An evaluation also delivers its graded files under delivery evaluation (graded.parquet, report.json, manifest.json) beside the completions of delivery dl-{order id}."
          }
        ],
        "not": {
          "anyOf": [
            {
              "required": [
                "source"
              ]
            },
            {
              "required": [
                "env"
              ]
            }
          ]
        }
      },
      "FileGrader": {
        "enum": [
          "boxed_math_v1",
          "exact_match_v1"
        ],
        "description": "Reference grader of an evaluation on a file. boxed_math_v1: the last \\boxed{} of the answer equals the reference by value. exact_match_v1: the answer equals the reference, surrounding whitespace removed. The answer is the completion after its reasoning block."
      },
      "EvaluationMetrics": {
        "type": "object",
        "properties": {
          "n_problems": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "samples": {
            "type": "integer",
            "minimum": 1,
            "maximum": 64
          },
          "complete": {
            "type": "boolean"
          },
          "pass@1": {
            "type": "object",
            "properties": {
              "value": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "ci95": {
                "type": "array",
                "items": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                "minItems": 2,
                "maxItems": 2
              }
            },
            "required": [
              "value",
              "ci95"
            ],
            "additionalProperties": false
          },
          "pass@k": {
            "type": "object",
            "additionalProperties": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            }
          },
          "n_problems_graded": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "missing_problems": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "expected_rows": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "graded_rows": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "ungraded_rows": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "missing_rows": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "requested_samples": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "attempted_samples": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_samples": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "graded_samples": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "tool_calls_total": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "mean_score": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "mean_completion_tokens": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "mean_turns": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "truncation_rate": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "format_failure_rate": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "stop_reasons": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "n_problems",
          "samples",
          "complete",
          "pass@1",
          "pass@k"
        ],
        "additionalProperties": false,
        "description": "mean_score is the native mean of each problem's mean graded score, denominator n_problems_graded. Completion-row counts remain separate. Absent observed turns/tools/attempts are null; never infer them or rename Avg@N as pass@N."
      },
      "EvaluationMacro": {
        "type": "object",
        "properties": {
          "pass@1": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "pass@k": {
            "type": "object",
            "additionalProperties": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            }
          }
        },
        "required": [
          "pass@1",
          "pass@k"
        ],
        "additionalProperties": true
      },
      "EvaluationSummary": {
        "type": "object",
        "properties": {
          "complete": {
            "type": "boolean"
          },
          "envs": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/EvaluationMetrics"
            }
          },
          "macro": {
            "$ref": "#/components/schemas/EvaluationMacro"
          }
        },
        "required": [
          "complete",
          "envs",
          "macro"
        ],
        "additionalProperties": false
      },
      "FileEvaluation": {
        "type": "object",
        "description": "An evaluation on a file. Status is pending while the order waits for grading, graded when it has a summary, or ungraded when the order ends without a grading report. Read the order status, deliveries and refunded_usd separately for its outcome. Complete is null until graded and false when samples are missing from the report. Summary.envs holds one entry named after the grader.",
        "properties": {
          "grader": {
            "$ref": "#/components/schemas/FileGrader"
          },
          "status": {
            "enum": [
              "pending",
              "graded",
              "ungraded"
            ]
          },
          "complete": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "summary": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/EvaluationSummary"
              }
            ]
          }
        },
        "required": [
          "grader",
          "status",
          "complete",
          "summary"
        ],
        "additionalProperties": false
      },
      "QuoteCapacity": {
        "description": "Model-specific estimate for an order placed now. A quote does not reserve capacity.",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "starts": {
                "const": "now"
              }
            },
            "required": [
              "starts"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "starts": {
                "const": "queued"
              },
              "reason": {
                "enum": [
                  "waiting_for_capacity",
                  "daily_capacity_reached"
                ]
              },
              "queue_position": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "estimated_start_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "maxLength": 40,
                "description": "Estimated start, or null when the server cannot estimate it."
              },
              "resets_at": {
                "type": "string",
                "format": "date-time",
                "maxLength": 40,
                "description": "The daily capacity reset at midnight UTC, when applicable."
              }
            },
            "required": [
              "starts",
              "reason",
              "queue_position",
              "estimated_start_at"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "examples": {
      "catalog": {
        "summary": "Illustrative catalog",
        "value": {
          "ordering": "disabled",
          "any_model_ordering": "disabled",
          "envs": [
            {
              "id": "example-source",
              "name": "Example source",
              "prompts_available": 100,
              "thinking": true
            }
          ],
          "models": [
            {
              "id": "example-model",
              "name": "Example model",
              "model": {
                "repo": "example/model",
                "revision": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
              },
              "price_per_mtok_usd": 0.5,
              "sources": [
                {
                  "id": "example-source",
                  "name": "Example source",
                  "prompts_available": 100,
                  "thinking": true
                }
              ]
            }
          ],
          "architectures": [
            "Qwen3ForCausalLM",
            "Qwen3_5ForCausalLM",
            "Qwen3_5ForConditionalGeneration"
          ]
        }
      },
      "catalogQuoteInput": {
        "summary": "Illustrative catalogQuoteInput",
        "value": {
          "model": "example-model",
          "source": "example-source",
          "prompt_count": 1,
          "samples_per_prompt": 1,
          "max_new_tokens": 128,
          "thinking": false
        }
      },
      "pinnedQuoteInput": {
        "summary": "Illustrative pinnedQuoteInput",
        "value": {
          "model": "example/model",
          "prompt_count": 1,
          "samples_per_prompt": 1,
          "max_new_tokens": 128,
          "thinking": false,
          "revision": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
          "env": "example-source",
          "sampling": {
            "temperature": 0.6
          }
        }
      },
      "catalogQuote": {
        "summary": "Illustrative catalogQuote",
        "value": {
          "model": "example-model",
          "source": "example-source",
          "prompt_count": 1,
          "samples_per_prompt": 1,
          "max_new_tokens": 128,
          "thinking": false,
          "quote_id": "example-quote",
          "price_usd": 0.01,
          "est_tokens": 128,
          "eta_hours": 0.01,
          "expires_at": "2026-10-08T00:00:00.000Z"
        }
      },
      "pinnedQuote": {
        "summary": "Illustrative pinnedQuote",
        "value": {
          "model": "example/model",
          "prompt_count": 1,
          "samples_per_prompt": 1,
          "max_new_tokens": 128,
          "thinking": false,
          "quote_id": "example-quote",
          "price_usd": 0.01,
          "est_tokens": 128,
          "eta_hours": 0.01,
          "expires_at": "2026-10-08T00:00:00.000Z",
          "revision": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
          "env": "example-source",
          "sampling": {
            "temperature": 0.6,
            "top_p": 0.95,
            "top_k": 20
          },
          "gpu_count": 1,
          "architecture": "ExampleForCausalLM",
          "est_price_usd": 0.01,
          "max_tokens": 128,
          "max_hours": 0.02,
          "pricing": {}
        }
      },
      "keyOrder": {
        "summary": "Illustrative keyOrder",
        "value": {
          "order": {
            "model": "example-model",
            "source": "example-source",
            "prompt_count": 1,
            "samples_per_prompt": 1,
            "max_new_tokens": 128,
            "thinking": false,
            "id": "example-order",
            "status": "delivered",
            "price_usd": 0.01,
            "cancel_requested": false,
            "status_reason": null,
            "needs_attention": false,
            "progress": null,
            "created_at": "2026-10-07T00:00:00.000Z",
            "updated_at": "2026-10-07T00:00:00.000Z",
            "finished_at": "2026-10-07T00:01:00.000Z",
            "refunded_usd": 0,
            "deliveries": [
              {
                "delivery_id": "example-delivery",
                "files": [
                  {
                    "name": "part-00000.parquet",
                    "size": 128,
                    "sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
                    "url": "/api/v1/dataset-orders/example-order/deliveries/example-delivery/files/part-00000.parquet"
                  }
                ]
              }
            ]
          }
        }
      },
      "browserOrder": {
        "summary": "Illustrative browserOrder",
        "value": {
          "order": {
            "model": "example-model",
            "source": "example-source",
            "prompt_count": 1,
            "samples_per_prompt": 1,
            "max_new_tokens": 128,
            "thinking": false,
            "id": "example-order",
            "status": "delivered",
            "price_usd": 0.01,
            "cancel_requested": false,
            "status_reason": null,
            "needs_attention": false,
            "progress": null,
            "created_at": "2026-10-07T00:00:00.000Z",
            "updated_at": "2026-10-07T00:00:00.000Z",
            "finished_at": "2026-10-07T00:01:00.000Z",
            "refunded_usd": 0,
            "deliveries": [
              {
                "delivery_id": "example-delivery",
                "files": [
                  {
                    "name": "part-00000.parquet",
                    "size": 128,
                    "sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
                    "url": "/api/batch/orders/example-order/deliveries/example-delivery/files/part-00000.parquet"
                  }
                ]
              }
            ],
            "billing": {
              "status": "settled",
              "reserved_micro_usd": 10000,
              "held_micro_usd": 0,
              "charged_micro_usd": 10000,
              "released_micro_usd": 0
            }
          }
        }
      },
      "keyOrders": {
        "summary": "Illustrative keyOrders",
        "value": {
          "orders": [
            {
              "model": "example-model",
              "source": "example-source",
              "prompt_count": 1,
              "samples_per_prompt": 1,
              "max_new_tokens": 128,
              "thinking": false,
              "id": "example-order",
              "status": "reserved",
              "price_usd": 0.01,
              "cancel_requested": false,
              "status_reason": null,
              "needs_attention": false,
              "progress": null,
              "created_at": "2026-10-07T00:00:00.000Z",
              "updated_at": "2026-10-07T00:00:00.000Z",
              "finished_at": null
            }
          ]
        }
      },
      "browserOrders": {
        "summary": "Illustrative browserOrders",
        "value": {
          "orders": [
            {
              "model": "example-model",
              "source": "example-source",
              "prompt_count": 1,
              "samples_per_prompt": 1,
              "max_new_tokens": 128,
              "thinking": false,
              "id": "example-order",
              "status": "reserved",
              "price_usd": 0.01,
              "cancel_requested": false,
              "status_reason": null,
              "needs_attention": false,
              "progress": null,
              "created_at": "2026-10-07T00:00:00.000Z",
              "updated_at": "2026-10-07T00:00:00.000Z",
              "finished_at": null,
              "billing": {
                "status": "held",
                "reserved_micro_usd": 10000,
                "held_micro_usd": 10000,
                "charged_micro_usd": null,
                "released_micro_usd": 0
              }
            }
          ]
        }
      },
      "error": {
        "summary": "Illustrative error",
        "value": {
          "error": {
            "code": "orders_unavailable",
            "message": "Dataset ordering is limited to approved pilot accounts."
          }
        }
      },
      "insufficientBalance": {
        "summary": "Illustrative insufficientBalance",
        "value": {
          "error": {
            "code": "insufficient_balance",
            "message": "Your balance does not cover this quote."
          },
          "balance_usd": 0,
          "price_usd": 0.01
        }
      },
      "keyCreatedOrder": {
        "summary": "Illustrative reserved order",
        "value": {
          "order": {
            "model": "example-model",
            "source": "example-source",
            "prompt_count": 1,
            "samples_per_prompt": 1,
            "max_new_tokens": 128,
            "thinking": false,
            "id": "example-order",
            "status": "reserved",
            "price_usd": 0.01,
            "cancel_requested": false,
            "status_reason": null,
            "needs_attention": false,
            "progress": null,
            "created_at": "2026-10-07T00:00:00.000Z",
            "updated_at": "2026-10-07T00:00:00.000Z",
            "finished_at": null,
            "refunded_usd": 0,
            "deliveries": []
          }
        }
      },
      "browserCreatedOrder": {
        "summary": "Illustrative reserved order",
        "value": {
          "order": {
            "model": "example-model",
            "source": "example-source",
            "prompt_count": 1,
            "samples_per_prompt": 1,
            "max_new_tokens": 128,
            "thinking": false,
            "id": "example-order",
            "status": "reserved",
            "price_usd": 0.01,
            "cancel_requested": false,
            "status_reason": null,
            "needs_attention": false,
            "progress": null,
            "created_at": "2026-10-07T00:00:00.000Z",
            "updated_at": "2026-10-07T00:00:00.000Z",
            "finished_at": null,
            "refunded_usd": 0,
            "deliveries": [],
            "billing": {
              "status": "held",
              "reserved_micro_usd": 10000,
              "held_micro_usd": 10000,
              "charged_micro_usd": null,
              "released_micro_usd": 0
            }
          }
        }
      },
      "keyHistoricalOrder": {
        "summary": "Illustrative historical one-micro-USD key order",
        "value": {
          "order": {
            "model": "example-model",
            "source": "example-source",
            "prompt_count": 1,
            "samples_per_prompt": 1,
            "max_new_tokens": 128,
            "thinking": false,
            "id": "example-historical-order",
            "status": "reserved",
            "price_usd": 1e-06,
            "cancel_requested": false,
            "status_reason": null,
            "needs_attention": false,
            "progress": null,
            "created_at": "2026-10-07T00:00:00.000Z",
            "updated_at": "2026-10-07T00:00:00.000Z",
            "finished_at": null,
            "refunded_usd": 0,
            "deliveries": []
          }
        }
      },
      "batchFile": {
        "summary": "A file being uploaded",
        "value": {
          "id": "file-example",
          "object": "file",
          "bytes": 40000000,
          "filename": "requests.jsonl",
          "purpose": "batch",
          "status": "uploading",
          "created_at": "2026-11-02T00:00:00Z",
          "upload": {
            "part_size": 16777216,
            "parts": 3
          }
        }
      },
      "fileQuoteInput": {
        "summary": "A quote on an uploaded file",
        "value": {
          "model": "example/model",
          "revision": "cccccccccccccccccccccccccccccccccccccccc",
          "input_file_id": "file-example",
          "output_format": "openai_jsonl"
        }
      },
      "fileQuote": {
        "summary": "A file quote",
        "value": {
          "quote_id": "quote-file-example",
          "price_usd": 12.5,
          "est_price_usd": 7.25,
          "est_tokens": 2000000,
          "max_tokens": 4000000,
          "eta_hours": 3.5,
          "max_hours": 6,
          "expires_at": "2026-11-03T00:00:00Z",
          "model": "example/model",
          "revision": "cccccccccccccccccccccccccccccccccccccccc",
          "input_file_id": "file-example",
          "prompt_count": 1000,
          "samples_per_prompt": 1,
          "max_new_tokens": 4096,
          "sampling": {
            "temperature": 1,
            "top_p": 0.95,
            "top_k": 20,
            "min_p": 0,
            "max_tokens": 4096,
            "seed": 7,
            "n": 1
          },
          "line_errors": 2,
          "preview": [
            {
              "custom_id": "request-1",
              "prompt_tokens": 24,
              "text": "<|im_start|>user\nExample<|im_end|>\n<|im_start|>assistant\n"
            }
          ],
          "pricing": {
            "mode": "any_model"
          },
          "output_format": "openai_jsonl",
          "architecture": "Qwen3ForCausalLM",
          "gpu_count": 1,
          "thinking": false,
          "verification": "draw",
          "seed": 7
        }
      },
      "batchFileProcessed": {
        "summary": "A processed file",
        "value": {
          "id": "file-11111111-2222-4333-8444-555555555555",
          "object": "file",
          "bytes": 660,
          "created_at": "2026-11-09T11:43:22.000Z",
          "filename": "eval.jsonl",
          "purpose": "batch",
          "status": "processed",
          "sha256": "1111111111111111111111111111111111111111111111111111111111111111"
        }
      },
      "batchFileList": {
        "summary": "Owned files",
        "value": {
          "object": "list",
          "data": [
            {
              "id": "file-11111111-2222-4333-8444-555555555555",
              "object": "file",
              "bytes": 660,
              "created_at": "2026-11-09T11:43:22.000Z",
              "filename": "eval.jsonl",
              "purpose": "batch",
              "status": "processed",
              "sha256": "1111111111111111111111111111111111111111111111111111111111111111"
            },
            {
              "id": "file-example",
              "object": "file",
              "bytes": 40000000,
              "filename": "requests.jsonl",
              "purpose": "batch",
              "status": "uploading",
              "created_at": "2026-11-02T00:00:00Z",
              "upload": {
                "part_size": 16777216,
                "parts": 3
              }
            }
          ]
        }
      },
      "fileEvaluationQuoteInput": {
        "summary": "An evaluation on a file",
        "value": {
          "model": "Qwen/Qwen3-8B",
          "revision": "b968826d9c46dd6066d109eabc6255188de91218",
          "input_file_id": "file-11111111-2222-4333-8444-555555555555",
          "output_format": "openai_jsonl",
          "grader": "boxed_math_v1"
        }
      },
      "fileEvaluationQuote": {
        "summary": "An evaluation quote on a file",
        "value": {
          "quote_id": "22222222-3333-4444-8555-666666666666",
          "price_usd": 2.925146,
          "est_price_usd": 2.92508,
          "est_tokens": 64,
          "max_tokens": 128,
          "eta_hours": 0.02,
          "max_hours": 0.03,
          "expires_at": "2026-11-10T11:43:30.000Z",
          "model": "Qwen/Qwen3-8B",
          "revision": "b968826d9c46dd6066d109eabc6255188de91218",
          "architecture": "Qwen3ForCausalLM",
          "gpu_count": 1,
          "prompt_count": 2,
          "samples_per_prompt": 1,
          "max_new_tokens": 64,
          "thinking": false,
          "sampling": {
            "temperature": 0.6,
            "top_p": 0.95,
            "top_k": 20,
            "max_tokens": 64,
            "seed": 7,
            "n": 1
          },
          "verification": "draw",
          "seed": 7,
          "input_file_id": "file-11111111-2222-4333-8444-555555555555",
          "output_format": "openai_jsonl",
          "line_errors": 0,
          "preview": [
            {
              "custom_id": "m1",
              "prompt_tokens": 30,
              "text": "<|im_start|>user\nWhat is 7 times 8? Put the final answer in \\boxed{}.<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n"
            }
          ],
          "purpose": "eval",
          "grader": "boxed_math_v1",
          "pricing": {
            "mode": "any_model",
            "verification": "draw",
            "grading_fee_usd": 1
          }
        }
      },
      "keyFileEvaluationOrder": {
        "summary": "A graded evaluation on a file",
        "value": {
          "order": {
            "id": "33333333-4444-4555-8666-777777777777",
            "status": "delivered",
            "model": "Qwen/Qwen3-8B",
            "revision": "b968826d9c46dd6066d109eabc6255188de91218",
            "input_file_id": "file-11111111-2222-4333-8444-555555555555",
            "output_format": "openai_jsonl",
            "verification": "draw",
            "seed": 7,
            "gpu_count": 1,
            "prompt_count": 2,
            "samples_per_prompt": 1,
            "max_new_tokens": 64,
            "thinking": false,
            "sampling": {
              "temperature": 0.6,
              "top_p": 0.95,
              "top_k": 20,
              "max_tokens": 64,
              "seed": 7,
              "n": 1
            },
            "price_usd": 2.92513,
            "cancel_requested": false,
            "status_reason": null,
            "needs_attention": false,
            "progress": null,
            "created_at": "2026-11-09T11:43:31.000Z",
            "updated_at": "2026-11-09T11:55:00.000Z",
            "finished_at": "2026-11-09T11:55:00.000Z",
            "purpose": "eval",
            "evaluation": {
              "grader": "boxed_math_v1",
              "status": "graded",
              "complete": true,
              "summary": {
                "complete": true,
                "envs": {
                  "boxed_math_v1": {
                    "n_problems": 2,
                    "samples": 1,
                    "expected_rows": 2,
                    "graded_rows": 2,
                    "ungraded_rows": 0,
                    "missing_rows": 0,
                    "mean_score": 0.5,
                    "n_problems_graded": 2,
                    "missing_problems": 0,
                    "requested_samples": 2,
                    "completed_samples": 2,
                    "graded_samples": 2,
                    "attempted_samples": null,
                    "tool_calls_total": null,
                    "mean_completion_tokens": 53,
                    "mean_turns": null,
                    "truncation_rate": 0.5,
                    "format_failure_rate": 0.5,
                    "stop_reasons": {
                      "length": 1,
                      "stop": 1
                    },
                    "complete": true,
                    "pass@1": {
                      "value": 0.5,
                      "ci95": [
                        0,
                        1
                      ]
                    },
                    "pass@k": {
                      "1": 0.5
                    }
                  }
                },
                "macro": {
                  "pass@1": 0.5,
                  "pass@k": {
                    "1": 0.5
                  }
                }
              }
            },
            "refunded_usd": 1.6e-05,
            "deliveries": [
              {
                "delivery_id": "dl-33333333-4444-4555-8666-777777777777",
                "files": [
                  {
                    "name": "manifest.json",
                    "size": 1030,
                    "sha256": null,
                    "url": "/api/v1/dataset-orders/33333333-4444-4555-8666-777777777777/deliveries/dl-33333333-4444-4555-8666-777777777777/files/manifest.json"
                  },
                  {
                    "name": "output-00000.jsonl",
                    "size": 1255,
                    "sha256": "2222222222222222222222222222222222222222222222222222222222222222",
                    "url": "/api/v1/dataset-orders/33333333-4444-4555-8666-777777777777/deliveries/dl-33333333-4444-4555-8666-777777777777/files/output-00000.jsonl"
                  },
                  {
                    "name": "report.json",
                    "size": 2546,
                    "sha256": null,
                    "url": "/api/v1/dataset-orders/33333333-4444-4555-8666-777777777777/deliveries/dl-33333333-4444-4555-8666-777777777777/files/report.json"
                  }
                ]
              },
              {
                "delivery_id": "evaluation",
                "files": [
                  {
                    "name": "graded.parquet",
                    "size": 4728,
                    "sha256": "3333333333333333333333333333333333333333333333333333333333333333",
                    "url": "/api/v1/dataset-orders/33333333-4444-4555-8666-777777777777/deliveries/evaluation/files/graded.parquet"
                  },
                  {
                    "name": "manifest.json",
                    "size": 991,
                    "sha256": null,
                    "url": "/api/v1/dataset-orders/33333333-4444-4555-8666-777777777777/deliveries/evaluation/files/manifest.json"
                  },
                  {
                    "name": "report.json",
                    "size": 3869,
                    "sha256": "4444444444444444444444444444444444444444444444444444444444444444",
                    "url": "/api/v1/dataset-orders/33333333-4444-4555-8666-777777777777/deliveries/evaluation/files/report.json"
                  }
                ]
              }
            ]
          }
        }
      }
    }
  }
}
