---
title: "Upload a file before the request that uses it"
method: POST
path: "/api/try/uploads"
tags: ["Free API"]
---

# Upload a file before the request that uses it

`POST /api/try/uploads`

## Request

- Base URL: `https://audo.ai`
- URL: `https://audo.ai/api/try/uploads`
- Auth: none required

What the website does without an account: the tool's free uses are checked first, then the file goes in parts (multipart), and the request sends fileToken as file_token (video_token, audio_token, or script_token for those inputs) instead of the file. One upload serves any tool's runs for the hour its token works, each counted against its own tool's free uses; a file a run has used no longer counts as waiting. A run that can't use an uploaded file names it in details.fileId. Without a key, an address may have only 3 uploaded files waiting for a run at once (its network 10, and always one run's files): past that, completing the upload is refused (429, and the file is deleted), and so is asking for another. Uploads that didn't finish don't count.

## Request body

- object
  - `tool` string, required: The free tool the file is for, by its slug, such as remove-noise
  - `filename` string, required
  - `sizeBytes` integer, required
  - `contentType` string

## Response `201`

OK

- object
  - `file` object, required
    - `id` string, required
    - `kind` 'original' | 'output', required
    - `status` 'awaiting_upload' | 'processing' | 'ready' | 'invalid' | 'deleted', required
    - `filename` string, required
    - `contentType` string, required
    - `sizeBytes` integer, nullable, required
    - `durationSeconds` number, nullable, required
    - `format` string, nullable, required: The container, such as wav or mp4
    - `hasVideo` boolean, required
    - `hasAudio` boolean, required: False for a video without sound, which only replace_audio takes
    - `media` object, nullable, required: Audio and video details, once the file is checked. Null for text files
      - `codec` string, nullable, required: The audio codec, such as aac or pcm_s16le
      - `sampleRate` integer, nullable, required
      - `channels` integer, nullable, required
      - `width` integer, nullable, required: The video's width in pixels, or null without video
      - `height` integer, nullable, required
    - `error` object, nullable, required
      - `code` string, required
      - `message` string, required
    - `prices` object, nullable, required: Credits each tool costs to process this file, once its length is known
    - `sourceJobId` string, nullable, required
    - `createdAt` string, required: ISO 8601 time
    - `expiresAt` string, required: ISO 8601 time
  - `upload` object, nullable, required: One PUT, up to 100 MB
    - `method` 'PUT', required
    - `url` string, required
    - `headers` object, required
    - `expiresAt` string, required: ISO 8601 time
  - `multipart` object, nullable, required: Upload in parts instead, for larger files
    - `partSizeBytes` integer, required: Every part is this size, except the last
    - `partCount` integer, required
    - `partUrl` string, required: Where part n goes (PUT), with {n} in place of the part number, counting from 1
    - `completeUrl` string, required: POST here once every part is in. It joins them, or lists the parts that haven't arrived (details.missingParts)
    - `expiresAt` string, required: ISO 8601 time
  - `fileToken` string, required: Once the file is uploaded, send this as file_token (video_token, audio_token, or script_token for those inputs) to POST /api/try/<slug>, for any tool and more than one run: each run counts against its own tool's free uses. It works for 1 hour

## Other responses

- `default`: An error, with what went wrong and what to do next

---

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