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

# Start a multipart upload

> Starts a multipart upload of one file (any size up to 5 TB) and signs the first window of part URLs. PUT each part (64 MiB by default, in parallel), keep each `ETag`, then complete. Requires compute `manage` access.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/training/datasets/{datasetId}/uploads
openapi: 3.0.3
info:
  title: AI Reserve Gateway API
  description: >-
    The AI Reserve API surface — OpenAI-compatible chat completions,
    Anthropic-compatible messages, Bedrock Converse, images, video, files,
    text-to-speech, realtime voice sessions, provider-hidden GPU infrastructure,
    and fine-tuning — all behind one endpoint and one API key.
  version: 1.0.0
servers:
  - url: https://api.aireserve.com
security:
  - bearerAuth: []
tags:
  - name: Customers
    description: >-
      Per-end-customer usage, cost, and billable amounts for organizations that
      tag requests with their own customers.
  - name: GPU Infrastructure
    description: >-
      Provision and manage provider-hidden GPU instances. The recommended
      Instances API accepts workload requirements and an hourly price ceiling;
      AI Reserve handles provider placement internally. Every mutation is
      asynchronous and returns an operation to poll.
  - name: Customer keys
    description: >-
      Mint, list, and revoke API keys pinned to your own end customers (and
      their organizations), so spend splits per customer without per-request
      tagging.
  - name: AWS CLI login
    description: >-
      Browser-authorization endpoints consumed by `aws login --profile …` (AWS
      CLI v2.32.0+). All three routes are unauthenticated — the caller has no
      credential until `/v1/token` succeeds.
  - name: Fine-tuning
    description: >-
      Fine-tune open models on your own data. Data lives in an S3 bucket inside
      your organization's AWS hub account; you name a base, LoRA or full, a
      price ceiling and how the result must be servable, and AI Reserve places
      the run on a backend internally. The result is a model in your bucket you
      can deploy or download.
  - name: 'Admin: Catalog'
    description: Discover the operations available to this token.
  - name: 'Admin: Analytics'
    description: Usage, spend and attribution reads.
  - name: 'Admin: API Keys'
    description: Organization and team inference keys.
  - name: 'Admin: Billing'
    description: Wallet, ledger and invoice reads.
  - name: 'Admin: Compute'
    description: GPU machines and persistent storage (quote, launch, inspect, stop).
  - name: 'Admin: Containers'
    description: The organization's AWS account, ECS services, logs and secrets.
  - name: 'Admin: Files'
    description: Organization shared files.
  - name: 'Admin: Members'
    description: 'People in the organization: invite, profile, team, access, role.'
  - name: 'Admin: Models & Routing'
    description: Model availability, defaults, fallbacks and routing.
  - name: 'Admin: Organization'
    description: Retention, logging, branding, sign-in domains, classification.
  - name: 'Admin: Personal'
    description: The caller's own usage, budget, API keys and preferences.
  - name: 'Admin: Teams & Budgets'
    description: Teams, spend caps and allocations.
  - name: 'Admin: Training'
    description: Fine-tuning datasets, runs, models and deployments.
paths:
  /v1/training/datasets/{datasetId}/uploads:
    post:
      tags:
        - Fine-tuning
      summary: Start a multipart upload
      description: >-
        Starts a multipart upload of one file (any size up to 5 TB) and signs
        the first window of part URLs. PUT each part (64 MiB by default, in
        parallel), keep each `ETag`, then complete. Requires compute `manage`
        access.
      operationId: createTrainingUpload
      parameters:
        - name: datasetId
          in: path
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                filename:
                  type: string
                  pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,254}$
                bytes:
                  type: integer
                  minimum: 1
                  maximum: 5497558138880
                contentType:
                  type: string
                  pattern: ^[\w.+-]+\/[\w.+-]+$
                partSize:
                  type: integer
                  minimum: 5242880
                  maximum: 5368709120
              required:
                - filename
                - bytes
              additionalProperties: false
      responses:
        '201':
          description: Created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  uploadId:
                    type: string
                    description: Opaque upload id for the parts / complete / abort routes.
                  key:
                    type: string
                  bytes:
                    type: number
                  partSize:
                    type: number
                    description: >-
                      Bytes per part. Every part but the last must be exactly
                      this size.
                  partCount:
                    type: number
                  method:
                    type: string
                    enum:
                      - PUT
                  parts:
                    type: array
                    items:
                      type: object
                      properties:
                        partNumber:
                          type: number
                        url:
                          type: string
                          description: >-
                            Presigned `UploadPart` URL; PUT the part bytes and
                            keep the `ETag` response header.
                      required:
                        - partNumber
                        - url
                      additionalProperties: false
                    description: >-
                      The first window of signed part URLs (up to 100); request
                      the next window from `…/parts`.
                  expiresAt:
                    type: string
                required:
                  - uploadId
                  - key
                  - bytes
                  - partSize
                  - partCount
                  - method
                  - parts
                  - expiresAt
                additionalProperties: false
        '400':
          description: Invalid request or schema violation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainingError'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainingError'
        '403':
          description: Key lacks the required compute access (`read` or `manage`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainingError'
        '404':
          description: Resource not found or owned by another organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainingError'
      security:
        - bearerAuth: []
        - apiKeyAuth: []
components:
  schemas:
    TrainingError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
              enum:
                - invalid_request_error
            param:
              type: string
              nullable: true
              enum:
                - null
            code:
              type: string
            details:
              type: object
              additionalProperties: {}
          required:
            - message
            - type
            - param
            - code
          additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your AI Reserve API key (aireserve_api_…) from the API Keys page in the
        portal (https://portal.aireserve.com/keys).
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: The same API key sent as an `x-api-key` header.

````

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