---
title: "Create file upload"
method: POST
path: "/v1/files/upload"
tags: ["Files"]
---

# Create file upload

`POST /v1/files/upload`

Create a new file and receive a pre-signed upload URL. PUT the file bytes to the returned URL, then poll `GET /v1/files/{fileId}` until the file is ready.

## Request body

- CreateFileUploadRequest
  - `type` 'IMAGE' | 'VIDEO' | 'AUDIO' | 'PDF' | 'SLIDESHOW' | 'TEXT' | 'LOTTIE' — File type. `TEXT` covers plain-text and editor-interchange documents; `LOTTIE` is a JSON animation.
  - `displayName` string, required — Display name for the uploaded file.
  - `isTemporary` boolean — When true, the file is temporary. Temporary files are guaranteed to be available for 24 hours, after which they may be archived at any time. Temporary files are not analyzed (no description, transcript, or embedding will be generated), so they will not appear in search results. Defaults to false.
  - `hideFromUi` boolean — When true, the file is hidden from the VideoGen Media page by default. It remains accessible through the API. Defaults to false.
  - `transcript` Transcript — A transcript of an audio file, as timed words in order.
    - `languageCode` string, nullable — Optional BCP-47 language code of the spoken audio (e.g. `en`, `es`). Used to tag the transcript's language; omit if unknown.
    - `words` TranscriptWord[], required — The transcript words, sorted by `startSeconds` and non-overlapping. Must contain at least one word.
      - `startSeconds` number, required — Start time of the word in seconds from the beginning of the audio.
      - `endSeconds` number, required — End time of the word in seconds from the beginning of the audio. Must be greater than `startSeconds`.
      - `word` string, required — The spoken word, used verbatim for narration timing and captions.

## Response `200`

Upload instructions

- FileUploadResponse
  - `fileId` string, required — The file id to use in subsequent API calls (e.g. `vg_file_...`).
  - `uploadUrl` string, required — Pre-signed URL. PUT the raw file bytes to this URL to complete the upload.

## Other responses

- `default` — Error

---

[API](https://skmtc.dev/videogen/apis/videogen-api.md) · [All operations](https://skmtc.dev/videogen/apis/videogen-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/videogen/videogen-api/revisions/33dda0455d67/schema)
