> ## Documentation Index
> Fetch the complete documentation index at: https://docs.transcribetube.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Upload URL

> Step 1 of 2 for transcribing your own audio or video file. Returns a pre-signed S3 URL to PUT the raw file to; the URL is valid for one hour. Then call /api/transcribeFile with the returned key.

Step 1 of 2 for transcribing your own audio or video file. Returns a pre-signed S3 URL you `PUT` the raw file to. The URL is valid for one hour.

After the upload finishes, call [Transcribe File](https://docs.transcribetube.com/api-documentation/endpoint/post-apitranscribefile.md) with the returned `key`.

## Request

| Field | Type | Required | Description |
| - | - | - | - |
| `fileName` | string | yes | Original filename, including extension (e.g. `meeting.m4a`). |
| `fileType` | string | yes | MIME type of the file (e.g. `audio/mp4`, `audio/mpeg`, `video/mp4`). Must match the `Content-Type` header of your `PUT`. |

## Response

```json theme={null}
{
  "url": "https://videoven-data.s3.amazonaws.com/raw/usr/…?X-Amz-Signature=…",
  "key": "raw/usr/9d2e…/4f1c…/meeting.m4a"
}
```

## Example

```bash cURL theme={null}
# 1. Ask for an upload URL
RESP=$(curl -s -X POST https://api.transcribetube.com/api/upload-url \
  -H "api-key: $TRANSCRIBETUBE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fileName": "meeting.m4a", "fileType": "audio/mp4"}')
URL=$(echo "$RESP" | jq -r .url)
KEY=$(echo "$RESP" | jq -r .key)

# 2. Upload the file straight to S3 (no api-key header here)
curl -X PUT "$URL" -H "Content-Type: audio/mp4" --data-binary @meeting.m4a
```

> [!NOTE]
>
> Supported containers: anything ffmpeg can read — `m4a`, `mp3`, `wav`, `caf`, `flac`, `mp4`, `mov`, … Video files are converted to audio server-side.


## OpenAPI

````yaml post /api/upload-url
openapi: 3.0.0
info:
  title: Transcribe Tube
  description: Welcome to the API Panel for Transcribe Tube
  version: 0.0.1
  contact: {}
servers:
  - url: https://api.transcribetube.com
security: []
tags: []
paths:
  /api/upload-url:
    post:
      tags:
        - Api
      description: >-
        Step 1 of 2 for transcribing your own audio or video file. Returns a
        pre-signed S3 URL to PUT the raw file to; the URL is valid for one hour.
        Then call /api/transcribeFile with the returned key.
      operationId: ApiController_createUploadUrl
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadUrlDto'
      responses:
        '201':
          description: Pre-signed upload URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadUrlResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid api-key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - api-key: []
components:
  schemas:
    UploadUrlDto:
      type: object
      required:
        - fileName
        - fileType
      properties:
        fileName:
          type: string
          description: Original filename including extension
          example: meeting.m4a
        fileType:
          type: string
          description: MIME type; must match the Content-Type of the PUT
          example: audio/mp4
    UploadUrlResponse:
      type: object
      properties:
        url:
          type: string
          description: Pre-signed S3 PUT URL
        key:
          type: string
          description: Object key to pass to /api/transcribeFile
          example: raw/usr/9d2e/4f1c/meeting.m4a
    ErrorResponse:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.