---
title: "Commit a completed direct upload"
method: POST
path: "/api/v1/files/{fileId}/commit"
tags: ["Media"]
---

# Commit a completed direct upload

`POST /api/v1/files/{fileId}/commit`

## Request

- Base URL: `https://api.popnow.ai`
- URL: `https://api.popnow.ai/api/v1/files/{fileId}/commit`
- Auth: HTTP bearer

Compares the stored byte count and media type with the ticket, checks
the image signature, computes SHA-256, and copies the temporary object
to an immutable private key. Reference this uploaded file with the returned
popnow:// URI. Publicly accessible HTTPS media URLs can instead be passed
directly in supported model input fields, without uploading. Repeating
a successful commit is idempotent.

## Path parameters

- `fileId` string, required

## Response `200`

Ready tenant-scoped file reference.

- FileCommitEnvelope
  - `code` 200, required
  - `msg` 'success', required
  - `request_id` string, required: Correlation identifier. Include it in support requests.
  - `data` FileCommitResponse, required
    - `fileId` string, required
    - `status` 'ready', required
    - `bytes` integer, required
    - `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', required
    - `sha256` string, required
    - `uri` string, required
    - `expiresAt` string, date-time, required
    - `durationSeconds` string: Measured audio/video duration in seconds.
    - `width` integer
    - `height` integer

## 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.
- `404`: Resource does not exist or is not visible to this account and API key. These cases are intentionally indistinguishable.
- `409`: Idempotency or media-transfer state conflicts with this request.
- `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)
