---
title: "Generate Presigned Url"
method: POST
path: "/v1/files/presigned-url"
tags: ["files"]
---

# Generate Presigned Url

`POST /v1/files/presigned-url`

## Request

- Base URL: `https://api.vlm.run` (the document declares no server; this is the origin it was published from)
- URL: `https://api.vlm.run/v1/files/presigned-url`
- Auth: HTTP bearer

Generate a presigned URL for file upload.

## Request body

- PresignedUrlRequest: Request for generating a presigned URL for file upload.
  - `filename` string, required: Name of the file to be uploaded
  - `purpose` 'assistants' | 'batch' | 'fine-tune' | 'vision' | 'datasets': Purpose of the file

## Response `201`

Successful Response

- PresignedUrlResponse: Response containing a presigned URL for file upload.
  - `id` string, nullable: Unique identifier of the file
  - `filename` string, required: The filename of the file
  - `content_type` string, nullable: Content type of the file
  - `url` string, required: The presigned URL for uploading the file
  - `upload_method` string: HTTP method to use for uploading
  - `public_url` string, nullable: URL for previewing the file after upload
  - `created_at` string, date-time: Date and time when the file was created (in UTC timezone)

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/vlm/apis/vlm-run-unified-server.md) · [All operations](https://skmtc.dev/vlm/apis/vlm-run-unified-server/llms.txt) · [OpenAPI document](https://skmtc.dev/vlm/apis/vlm-run-unified-server/revisions/4a68ab36546b?raw)
