---
title: "Start uploading a file in chunks, for clients behind a small request-size limit. Send the chunks in order, then complete."
method: POST
path: "/ai/conversations/{public_id}/attachment-uploads"
tags: ["AI Chat"]
---

# Start uploading a file in chunks, for clients behind a small request-size limit. Send the chunks in order, then complete.

`POST /ai/conversations/{public_id}/attachment-uploads`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/ai/conversations/{public_id}/attachment-uploads`
- Auth: HTTP bearer

## Path parameters

- `public_id` string, required

## Request body

- StartAttachmentUploadRequest
  - `mime_type` string, nullable: Content type the browser reported, if any.
  - `name` string, required: File name as the user knows it; unsafe characters are replaced.
  - `size_bytes` integer, required: Size of the whole file in bytes.

## Response `201`

Upload opened

- AttachmentUploadStarted
  - `chunk_bytes` integer, required: The most bytes one chunk may carry.
  - `upload_id` string, required: Opaque id to send every chunk and the completion to.

## Other responses

- `400`: Empty file
- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: Conversation not found
- `413`: File too large
- `429`: Too many uploads in progress
- `503`: Upload capacity reached

## Changes

> 81 revisions in range; 1 not diffed.

- **2026-10-20** `79089e9f49ee`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/ai/conversations/:public_id/attachment-uploads/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) · [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) · [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/ab6d5d19e930?raw)
