# Direct-storage plan for one immutable snapshot page

`POST /v1/datasets/download/presign-exact-batch`

Authenticate exact commit-entry tuples, then mint shared-Xorb GETs.

- Base URL: `https://junction-api.qualiastudios.dev`
- Authentication: an API key in the `X-API-Key` header, or `Authorization: Bearer …`

## Request body

Required: `application/json` `DownloadExactBatchBody`

## Responses

- `200` Successful Response: `application/json` `any`
- `401` Invalid or missing API key: `application/json` `ErrorResponse`
- `422` Validation Error: `application/json` `HTTPValidationError`

## Schemas

```yaml
DownloadExactBatchBody:
  properties:
    name:
      type: string
    repo_id:
      type: string
      format: uuid
    commit_id:
      type: string
      format: uuid
    snapshot_digest:
      type: string
      pattern: ^[0-9a-f]{64}$
    files:
      items:
        $ref: "#/components/schemas/ExactDownloadFileBody"
      type: array
      maxItems: 4096
      minItems: 1
    ttl_seconds:
      type: integer
      maximum: 3600
      minimum: 60
      default: 3600
    max_chunks:
      maximum: 4294967295
      minimum: 1
      type:
        - integer
        - "null"
  additionalProperties: false
  type: object
  required:
    - name
    - repo_id
    - commit_id
    - snapshot_digest
    - files
  title: DownloadExactBatchBody
ExactDownloadFileBody:
  properties:
    path:
      type: string
      maxLength: 4096
      minLength: 1
    manifest_id:
      type: string
      pattern: ^[0-9a-f]{64}$
    logical_size:
      type: integer
      minimum: 1
    chunk_count:
      type: integer
      maximum: 4294967295
      minimum: 1
    artifact_encoding:
      type: string
      enum:
        - safetensors
        - compressed_tensors
        - gguf
        - parquet
        - video
        - mcap
        - npy
        - npz
        - generic
    full_plaintext_digest:
      type: string
      pattern: ^[0-9a-f]{64}$
    chunk_start:
      maximum: 4294967295
      minimum: 0
      type:
        - integer
        - "null"
    byte_start:
      minimum: 0
      type:
        - integer
        - "null"
  additionalProperties: false
  type: object
  required:
    - path
    - manifest_id
    - logical_size
    - chunk_count
    - artifact_encoding
    - full_plaintext_digest
  title: ExactDownloadFileBody
ErrorResponse:
  properties:
    detail:
      type: string
      description: Error message describing what went wrong
  type: object
  required:
    - detail
  title: ErrorResponse
  description: Standard error response.
HTTPValidationError:
  properties:
    detail:
      items:
        $ref: "#/components/schemas/ValidationError"
      type: array
  type: object
  title: HTTPValidationError
ValidationError:
  properties:
    loc:
      items:
        type:
          - string
          - integer
      type: array
      title: Location
    msg:
      type: string
      title: Message
    type:
      type: string
      title: Error Type
    input: {}
    ctx:
      type: object
      title: Context
  type: object
  required:
    - loc
    - msg
    - type
  title: ValidationError
```
