---
title: "POST /assets/uploads"
method: POST
path: "/assets/uploads"
tags: ["Files"]
---

# POST /assets/uploads

`POST /assets/uploads`

Start an upload of a local file, so it can be passed to a generation endpoint by URL instead of inline as base64. Declare the file's MIME type and exact size in bytes (up to 15MB, the same limit the generation endpoints apply); the response carries an upload_url and a file_url. Send the file's bytes in a single PUT to upload_url (no Authorization header; the content type and size are fixed by this call, and a body of any other size is refused). Once the PUT succeeds, pass file_url in any image, audio, video or model field that accepts a URL. The file is public to anyone holding file_url and is deleted 7 days after upload. upload_url is single-use. Free (no credits). Requires an API key (user scope). Not exposed as an MCP tool.

## Request body

- CreateUploadPayload — Payload for starting a file upload.
  - `mime_type` 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif' | 'audio/mpeg' | 'audio/wav' | 'audio/x-wav' | 'audio/ogg' | 'audio/flac' | 'audio/mp4' | 'audio/aac' | 'audio/webm' | 'video/mp4' | 'video/webm' | 'video/quicktime' | 'model/gltf-binary', required — MIME type of the file. Fixed for the upload; the stored file is served with it.
  - `size` integer, required — Exact size of the file in bytes (at most 15MB). The PUT to upload_url must send exactly this many bytes.

## Response `200`

Success

- UploadSession
  - `upload_url` string, required — Single-use URL to PUT the file's bytes to, with no Authorization header.
  - `file_url` string, required — Public URL of the file once the PUT succeeds. Pass it to any field that accepts a URL. Deleted 7 days after upload.
  - `mime_type` string, required — The MIME type the file is stored and served with.
  - `size` integer, required — The exact number of bytes the PUT must send.

## Other responses

- `400` — Error

## Changes

- **2026-09-25** `c4ee61420ffe` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/ludo/apis/ludo-ai-api/changes/assets/uploads/post.md)

---

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