---
title: "Complete a chunked upload"
method: POST
path: "/files/uploads/{upload_id}/complete"
tags: ["Files"]
---

# Complete a chunked upload

`POST /files/uploads/{upload_id}/complete`

## Request

- Base URL: `https://app.gc.ai/api/external/v1`
- URL: `https://app.gc.ai/api/external/v1/files/uploads/{upload_id}/complete`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/gc-ai/apis/gc-ai-external-api/docs/files/uploads/:upload_id/complete/post.ts> (a function with typed inputs; its response is checked against the schema)

Assemble the uploaded parts into the final file and start processing (text extraction, summarization, embeddings), returning the same file object as `POST /files`. For PDFs and Word documents, extraction runs asynchronously; poll `GET /files/{id}` until `status` is `ready`.

## Path parameters

- `upload_id` string, uuid, required: The upload session ID from initiate.

## Request body

- CompleteUploadRequest
  - `part_count` integer, required: The total number of parts you uploaded. Parts must be a contiguous run from 1 to this value; completion fails if any are missing.

## Response `200`

File assembled and processing

- FileResponse
  - `id` string, uuid, required: Unique file identifier
  - `name` string, required: Original filename
  - `size` number, required: File size in bytes
  - `content_type` string, required: MIME type of the file
  - `status` 'extracting' | 'embedding' | 'ready' | 'failed', required: Current processing status of the file
  - `created_at` string, required: ISO 8601 creation timestamp
  - `folder_id` string, uuid, nullable: Folder the file belongs to
  - `extraction_error` string: Error message if extraction failed
  - `project_id` string, uuid: Project the file is linked to, if uploaded with project_id
  - `warning` string: Present when the file was uploaded successfully but a secondary operation (e.g. project linking) failed

## Other responses

- `400`: Missing parts, or the assembled file is empty or over the size limit
- `401`: Missing or malformed API key
- `403`: Project access required
- `404`: Upload session not found or expired
- `429`: Rate limit exceeded. See [Rate Limits](https://docs.gc.ai/api-reference/concepts/rate-limits) for the tiers, limits, and how to back off.
- `500`: Internal server error
- `503`: Service temporarily unavailable

---

[API](https://skmtc.dev/gc-ai/apis/gc-ai-external-api.md) - [All operations](https://skmtc.dev/gc-ai/apis/gc-ai-external-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gc-ai/apis/gc-ai-external-api/revisions/2bbdfddf7107?raw)
