> ## Documentation Index
> Fetch the complete documentation index at: https://docs.strandai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Read result files in a batch

> Reads delivered result files with per-item binary framing. Raw layout accepts up to 16 paths; inner layout accepts up to 256. Duplicate paths produce one record. Records may arrive in shard order. Each record is a uint32 little-endian JSON header length, UTF-8 JSON header (path, status, length, sha256), then length body bytes. Missing files have status 404, length 0 and sha256 null. A zero header length terminates the stream; a missing terminator means failure. Item payloads are capped at 64 MiB, excluding framing. Exceeding the budget emits a status 413 record with error batch_payload_limit_exceeded, length 0 and sha256 null, then the terminator. Storage errors abort the stream without a terminator. Only zarr.json, _marker_frame.json, he/ and delivered markers/ paths are accepted.



## OpenAPI

````yaml POST /jobs/{id}/results/files
openapi: 3.1.0
info:
  title: Strand AI Platform API
  version: v1
  description: >-
    REST surface for uploading WSIs, submitting Lattice inference jobs, and
    streaming results. All endpoints require an API key or Strand AI OAuth
    access token in the `Authorization: Bearer` header.
servers:
  - url: https://app.strandai.com/api/v1
    description: Production
security:
  - ApiKey: []
  - OAuth2: []
paths:
  /jobs/{id}/results/files:
    post:
      summary: Read a batch of result files
      description: >-
        Reads delivered result files with per-item binary framing. Raw layout
        accepts up to 16 paths; inner layout accepts up to 256. Duplicate paths
        produce one record. Records may arrive in shard order. Each record is a
        uint32 little-endian JSON header length, UTF-8 JSON header (path,
        status, length, sha256), then length body bytes. Missing files have
        status 404, length 0 and sha256 null. A zero header length terminates
        the stream; a missing terminator means failure. Item payloads are capped
        at 64 MiB, excluding framing. Exceeding the budget emits a status 413
        record with error batch_payload_limit_exceeded, length 0 and sha256
        null, then the terminator. Storage errors abort the stream without a
        terminator. Only zarr.json, _marker_frame.json, he/ and delivered
        markers/ paths are accepted.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - paths
              properties:
                layout:
                  type: string
                  enum:
                    - raw
                    - inner
                  default: raw
                paths:
                  type: array
                  minItems: 1
                  maxItems: 256
                  items:
                    type: string
                    minLength: 1
                    maxLength: 512
      responses:
        '200':
          description: >-
            Framed file records followed by a zero terminator. Private,
            no-store.
          content:
            application/vnd.strand.result-batch+v1:
              schema:
                type: string
                format: binary
        '400':
          description: Invalid body, path or layout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Job not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Job has not completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
        message:
          type: string
        reason:
          type: string
          nullable: true
        required:
          type: integer
          nullable: true
        retryAfterSeconds:
          type: integer
          nullable: true
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: sk-strand-XXXXXXXXXXXXXXXXXXXXXXXX
    OAuth2:
      type: oauth2
      description: >-
        Strand AI authorization-code flow with S256 PKCE, explicit organization
        consent, and RFC 8707 resource binding.
      flows:
        authorizationCode:
          authorizationUrl: https://auth.strandai.com/oauth2/auth
          tokenUrl: https://auth.strandai.com/oauth2/token
          scopes:
            samples:read: Read slide metadata and estimates
            samples:write: Upload and change slides
            jobs:read: Read run status
            jobs:write: Start, export, or cancel runs
            results:read: Read and download results
            credits:spend: Reserve and spend organization credits

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.