---
title: "Upload Chat Attachment"
method: POST
path: "/chat-attachments"
tags: ["chat"]
---

# Upload Chat Attachment

`POST /chat-attachments`

## Request

- Base URL: `https://stardrift.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://stardrift.ai/chat-attachments`
- Auth: none declared

Accept one image for a chat message and return the id to reference it by.

## Request body `multipart/form-data`

- BodyUploadChatAttachmentChatAttachmentsPost
  - `file` string, binary, required

## Response `200`

Successful Response

- ChatAttachmentResponse
  - `id` string, required
  - `mime_type` string, required
  - `width` integer, required
  - `height` integer, required
  - `size_bytes` integer, required
  - `url` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/stardrift/apis/stardrift-api.md) - [All operations](https://skmtc.dev/stardrift/apis/stardrift-api/llms.txt) - [OpenAPI document](https://skmtc.dev/stardrift/apis/stardrift-api/revisions/be9ed1e6c38a?raw)
