---
title: "Create a presigned image upload ticket"
method: POST
path: "/api/v1/common/upload-url"
tags: ["Media"]
---

# Create a presigned image upload ticket

`POST /api/v1/common/upload-url`

## Request

- Base URL: `https://api.popnow.ai`
- URL: `https://api.popnow.ai/api/v1/common/upload-url`
- Auth: HTTP bearer

The server generates the object key. Upload the exact declared number of
bytes with PUT and copy every returned header. Supported media types are
JPEG, PNG, WebP and GIF images (10 MiB), or MP4/WebM video and
MP3/WAV audio (90 MiB, at most 600 seconds). Audio/video commit verifies
format and measurable duration; it does not apply a platform content filter.
LoRA weights are uploaded as `application/octet-stream` (a `.safetensors`
file, up to 2 GiB; the ticket stays valid for 2 hours); commit checks that it
is a complete safetensors file, and the returned URI goes in `loras[].path`.
After PUT, call the file commit endpoint and use its popnow:// URI in task input.

## Request body

- UploadURLRequest
  - `contentType` 'image/jpeg' | 'image/png' | 'image/webp' | 'image/gif' | 'video/mp4' | 'video/webm' | 'audio/mpeg' | 'audio/wav' | 'application/pdf' | 'application/msword' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.ms-excel' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/vnd.ms-powerpoint' | 'application/vnd.openxmlformats-officedocument.presentationml.presentation' | 'application/vnd.apple.keynote' | 'application/vnd.apple.pages' | 'application/vnd.apple.numbers' | 'text/plain' | 'text/markdown' | 'application/octet-stream', required
  - `bytes` integer, required: Images are limited to 10 MiB; supported audio/video and documents to 90 MiB; LoRA weights (application/octet-stream, a .safetensors file) to 2 GiB.

## Response `200`

Presigned upload ticket.

- UploadURLEnvelope
  - `code` 200, required
  - `msg` 'success', required
  - `request_id` string, required: Correlation identifier. Include it in support requests.
  - `data` UploadURLResponse, required
    - `fileId` string, required
    - `key` string, required: Compatibility alias for the final URI; unusable until commit succeeds.
    - `uploadUrl` string, uri, required
    - `method` 'PUT', required
    - `headers` object, required
    - `expiresAt` string, date-time, required
    - `maxBytes` integer, required

## Other responses

- `400`: Invalid JSON, query, callback URL, model input, or media declaration. Invalid callBackUrl values return code 400 and msg "Invalid callback URL" with request_id. Submitted hosts, IP addresses, and DNS diagnostics are not echoed.
- `401`: Missing, malformed, expired, revoked, or otherwise invalid API key.
- `403`: Account, model, API-key, IP, or region authorization failed.
- `413`: Request body exceeds the server's accepted size limit.
- `429`: Account-level request limit exceeded.
- `500`: Internal failure. Details are not exposed; report `request_id` to support.

---

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