> ## 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.

# Initiate upload

> Initiate a resumable upload by registering an H&E slide's filename, size, and content type, and receive a signed GCS URL to PUT the slide bytes to.



## OpenAPI

````yaml POST /uploads
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 `Authorization: Bearer
    sk-strand-...` header. Generate keys at `/settings/api-keys`.
servers:
  - url: https://app.strandai.com/api/v1
    description: Production
security:
  - ApiKey: []
paths:
  /uploads:
    post:
      tags:
        - Uploads
      summary: Initiate a resumable upload
      operationId: createUpload
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - filename
                - fileSize
                - contentType
              properties:
                filename:
                  type: string
                fileSize:
                  type: integer
                contentType:
                  type: string
                contentSha256:
                  type: string
                  pattern: ^[0-9a-f]{64}$
                  description: >-
                    Optional client-computed sha256 of the file bytes (64
                    lowercase hex chars). When supplied, the platform checks for
                    an existing non-archived sample in the same org with the
                    same hash; on a hit the response carries `existing: true`
                    and the existing `uploadId` instead of minting a new signed
                    URL.
      responses:
        '200':
          description: Resumable upload URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadCreated'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UploadCreated:
      type: object
      required:
        - uploadId
        - gcsPath
      properties:
        uploadId:
          type: string
          format: uuid
        uploadUrl:
          type: string
          description: >-
            Resumable upload URL — PUT slide bytes here. Omitted when `existing:
            true`.
        gcsPath:
          type: string
        existing:
          type: boolean
          description: >-
            True when `contentSha256` matched an existing non-archived sample in
            the same org. In that case `uploadUrl` is omitted and the byte
            upload should be skipped.
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
        message:
          type: string
        required:
          type: integer
          nullable: true
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: sk-strand-XXXXXXXXXXXXXXXXXXXXXXXX

````