---
title: "Upload URL"
method: POST
path: "/ai/uploads"
---

# Upload URL

`POST /ai/uploads`

## Request

- Base URL: `https://api.cargoai.co/solutions`
- URL: `https://api.cargoai.co/solutions/ai/uploads`
- Auth: API key in header `x-api-key`

Request a short-lived, presigned URL for uploading a PDF or image, for use with AWB Data Extraction.

## Headers

- `x-api-key` string, required

## Request body

- object
  - `email` string, required: Requester email address
  - `contentType` 'application/pdf' | 'image/jpeg' | 'image/png', required: Media type of the file to upload.
  - `filename` string, required: Name of the file being uploaded

## Response `200`

- object
  - `uploadUrl` string: Presigned S3 URL to upload the file to, via PUT
  - `s3Url` string: The s3:// URI to reference when calling AWB Data Extraction, once the upload is complete
  - `expiresIn` integer: Seconds until uploadUrl expires (3600 = 1 hour)
  - `expiresAt` string: Timestamp (ISO 8601) of when uploadUrl expires

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `411`: Length Required
- `500`: Internal Server Error

## Changes

- **2026-11-03** `dfd7950d43d7`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cargoai/apis/solutions/changes/ai/uploads/post.md)

---

[API](https://skmtc.dev/cargoai/apis/solutions.md) - [All operations](https://skmtc.dev/cargoai/apis/solutions/llms.txt) - [OpenAPI document](https://skmtc.dev/cargoai/apis/solutions/revisions/dfd7950d43d7?raw)
