> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sigmora.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Complete upload

> Verify and complete a direct media upload. Checks project/upload/content binding before storage completion and returns the normalized asset reference.



## OpenAPI

````yaml /openapi.json post /v1/assets/upload/complete
openapi: 3.1.0
info:
  title: Sigmora API
  version: 1.0.0
  description: >-
    The priced, versioned public API. Every call authenticates with a workspace
    API key (`Authorization: Bearer sk_live_…`), names the project it files its
    output under, and reports what it cost. `GET /v1/capabilities` answers what
    this deployment can serve right now and at what price; anything it reports
    as unavailable answers 503 `capability_unavailable` rather than 404.
servers:
  - url: https://api.sigmora.org
security:
  - bearerAuth: []
tags:
  - name: Meta
    description: What this deployment serves, what it costs, and what you have spent.
  - name: Projects
    description: The container every capability files its output under.
  - name: Sessions
    description: Durable bindings between an external harness session and one project.
  - name: Assets
    description: 'Project media: direct-to-storage uploads, imports, ingest and transcripts.'
  - name: Jobs
    description: Where every asynchronous capability is collected, whatever produced it.
  - name: Text
    description: Scripts, research, articles, translation and question sets.
  - name: Video
    description: Narrated renders, footage edits, shorts and moment selection.
  - name: UGC
    description: >-
      Creator-led vertical videos: AI creators, their faces and voices, frames
      and clips.
  - name: Editing
    description: >-
      Sigma, the editor: conversational turns, granular transcript edits,
      approvals.
  - name: 3D
    description: Animated 3D renders from a description or a photograph.
  - name: Image
    description: Thumbnails, sized for the platform they are posted to.
  - name: Audio
    description: Generated music and audio engineering in Audiotool projects.
  - name: Publishing
    description: Connected destinations and queued posts.
  - name: Webhooks
    description: Signed, at-least-once delivery of job and publishing events.
  - name: Workflows
    description: Context snapshots, versioned recipes, costed proposals and their runs.
  - name: Agents
    description: Describe an outcome and let a bounded plan of capabilities run.
  - name: Research
    description: >-
      Observed hooks, creator outliers and production briefs from saved
      analyses.
  - name: Themes
    description: The canonical content taxonomy, and the niche profiles built on it.
  - name: Signals
    description: Evidence-backed trends and scored viral content.
  - name: Discovery
    description: Compiled watch plans, their runs, and source freshness.
  - name: Watchlist
    description: 'Accounts you watch: their usual reach and the posts that beat it.'
  - name: Performance
    description: Your own channels' videos against their usual, and fixes to live videos.
  - name: Autopilot
    description: The durable trend-to-distribution workflow and its checkpoints.
  - name: Campaigns
    description: Distribution records shared by the API, the dashboard and autopilot.
  - name: Brands
    description: >-
      Cross-platform identities with their own voice, rules and publishing
      commitments.
  - name: Products
    description: What a campaign promotes.
paths:
  /v1/assets/upload/complete:
    post:
      tags:
        - Assets
      summary: Complete upload
      description: >-
        Verify and complete a direct media upload. Checks project/upload/content
        binding before storage completion and returns the normalized asset
        reference.
      operationId: postAssetsUploadComplete
      parameters:
        - name: idempotency-key
          in: header
          required: true
          description: >-
            Required stable id for this logical write; reuse it after a timeout.
            Upload endpoints also require the same value in body.idempotencyKey.
          schema:
            type: string
            minLength: 1
            maxLength: 255
            description: >-
              Required stable id for this logical write; reuse it after a
              timeout. Upload endpoints also require the same value in
              body.idempotencyKey.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                projectId:
                  description: >-
                    Project that owns the upload. Omit for a Library upload that
                    belongs to no project; then omit it on every later call too.
                  type: string
                  minLength: 1
                  maxLength: 200
                uploadId:
                  type: string
                  pattern: ^aus_[a-f0-9]{48}$
                  description: Sigmora upload-session id returned by upload prepare.
                contentId:
                  type: string
                  minLength: 1
                  maxLength: 200
                  description: Storage content id returned by upload prepare.
                sizeBytes:
                  type: integer
                  exclusiveMinimum: 0
                  maximum: 53687091200
                  description: Exact number of uploaded bytes; must match preparation.
                sha256:
                  description: Complete-file SHA-256; must match preparation when supplied.
                  type: string
                  pattern: ^[a-fA-F0-9]{64}$
                idempotencyKey:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: Must exactly match the Idempotency-Key header.
                parts:
                  description: >-
                    Ordered completed parts for a multipart upload; omit for a
                    single PUT.
                  minItems: 1
                  maxItems: 10000
                  type: array
                  items:
                    type: object
                    properties:
                      partNumber:
                        type: integer
                        minimum: 1
                        maximum: 10000
                        description: One-based part number uploaded.
                      etag:
                        type: string
                        minLength: 1
                        maxLength: 200
                        description: ETag returned by storage for that part PUT.
                    required:
                      - partNumber
                      - etag
                    additionalProperties: false
                deviceId:
                  type: string
                  minLength: 1
                  maxLength: 128
                  pattern: ^[A-Za-z0-9._:-]+$
                  description: >-
                    Stable id of the uploading device; Sigmora records its sync
                    health.
                contentFingerprint:
                  type: string
                  pattern: ^sha256-8m:[a-f0-9]{64}$
                  description: >-
                    File fingerprint: SHA-256 over the SHA-256 of each 8 MiB
                    slice followed by the byte size. Recorded on the asset so
                    the same file is understood once.
              required:
                - uploadId
                - contentId
                - sizeBytes
                - idempotencyKey
              additionalProperties: false
            example:
              projectId: prj_9x2a4c
              uploadId: aus_8f594af976ea80af7a743e184cb078dc5402446f2c395968
              contentId: cnt_51c0d9e4
              sizeBytes: 1288490188
              sha256: 1e366774608e018e2ea0d2831fb3d1402ef725585ac73a958258405dd3e76d49
              idempotencyKey: complete-founder-interview-take-2
              parts:
                - partNumber: 1
                  etag: '"9b2cf535f27731c974343645a3985328"'
                - partNumber: 2
                  etag: '"6f1ed002ab5595859014ebf0951522d9"'
                - partNumber: 3
                  etag: '"c4ca4238a0b923820dcc509a6f75849b"'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    const: true
                  uploadId:
                    type: string
                    pattern: ^aus_[a-f0-9]{48}$
                    description: Completed Sigmora upload-session id.
                  projectId:
                    anyOf:
                      - type: string
                        minLength: 1
                        maxLength: 200
                      - type: 'null'
                    description: >-
                      Project that owns the completed upload; null for a Library
                      upload.
                  assetId:
                    type: string
                    minLength: 1
                    maxLength: 200
                    description: Stable project asset id.
                  contentId:
                    type: string
                    minLength: 1
                    maxLength: 200
                    description: Storage content id bound to the asset.
                  lane:
                    type: string
                    enum:
                      - single
                      - multipart
                    description: Upload lane that was finalized.
                  status:
                    description: >-
                      Content-engine state after storage completion; use
                      ingestReady for readiness.
                    type:
                      - string
                      - 'null'
                  ingestReady:
                    type: boolean
                    description: >-
                      Whether the uploaded content is active and ready for
                      downstream work.
                  previewUrl:
                    anyOf:
                      - type: string
                        format: uri
                      - type: 'null'
                    description: Short-lived preview URL when available.
                  checksum:
                    anyOf:
                      - type: object
                        properties:
                          algorithm:
                            type: string
                            const: sha256
                          value:
                            type: string
                            pattern: ^[a-fA-F0-9]{64}$
                          verification:
                            type: string
                            const: client_matched
                          providerVerified:
                            type: boolean
                            const: false
                        required:
                          - algorithm
                          - value
                          - verification
                          - providerVerified
                        additionalProperties: {}
                      - type: 'null'
                    description: >-
                      Client checksum binding; storage does not independently
                      attest this digest.
                  completedAt:
                    description: Durable completion timestamp.
                    type:
                      - string
                      - 'null'
                required:
                  - success
                  - uploadId
                  - projectId
                  - assetId
                  - contentId
                  - lane
                  - status
                  - ingestReady
                  - previewUrl
                  - checksum
                  - completedAt
                additionalProperties: {}
        '202':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    const: true
                  uploadId:
                    type: string
                    pattern: ^aus_[a-f0-9]{48}$
                    description: Upload awaiting provider reconciliation.
                  projectId:
                    anyOf:
                      - type: string
                        minLength: 1
                        maxLength: 200
                      - type: 'null'
                    description: Project that owns the upload; null for a Library upload.
                  assetId:
                    type: string
                    minLength: 1
                    maxLength: 200
                    description: Stable project asset id.
                  contentId:
                    type: string
                    minLength: 1
                    maxLength: 200
                    description: Storage content id bound to the asset.
                  lane:
                    type: string
                    enum:
                      - single
                      - multipart
                  state:
                    type: string
                    const: finalizing
                  contentStatus:
                    type:
                      - string
                      - 'null'
                  ingestReady:
                    description: Never ready while finalizing.
                    type: boolean
                    const: false
                  expiresAt:
                    type: string
                  previewUrl:
                    anyOf:
                      - type: string
                        format: uri
                      - type: 'null'
                  completedAt:
                    type:
                      - string
                      - 'null'
                  supersededByUploadId:
                    anyOf:
                      - type: string
                        pattern: ^aus_[a-f0-9]{48}$
                      - type: 'null'
                  recovery:
                    type: object
                    properties:
                      required:
                        type: boolean
                        const: true
                      attempt:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      leaseExpiresAt:
                        type:
                          - string
                          - 'null'
                      nextAction:
                        type: string
                        enum:
                          - wait
                          - retry_complete
                      providerAttested:
                        type: boolean
                    required:
                      - required
                      - attempt
                      - leaseExpiresAt
                      - nextAction
                      - providerAttested
                    additionalProperties: {}
                required:
                  - success
                  - uploadId
                  - projectId
                  - assetId
                  - contentId
                  - lane
                  - state
                  - contentStatus
                  - expiresAt
                  - previewUrl
                  - completedAt
                  - supersededByUploadId
                  - recovery
                additionalProperties: {}
        '400':
          description: 'Failure. `code` is one of: invalid_request.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 'Failure. `code` is one of: unauthorized.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: 'Failure. `code` is one of: insufficient_credits, budget_capped.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: 'Failure. `code` is one of: forbidden, origin_not_allowed.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: 'Failure. `code` is one of: not_found.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: 'Failure. `code` is one of: conflict.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: 'Failure. `code` is one of: payload_too_large.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'Failure. `code` is one of: rate_limited.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: 'Failure. `code` is one of: upstream_error, internal_error.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            Failure. `code` is one of: capability_unavailable,
            upstream_unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      required:
        - success
        - error
        - code
      properties:
        success:
          const: false
        error:
          type: string
          description: >-
            Human-readable. Copy may change between releases — do not match on
            it.
        code:
          type: string
          enum:
            - invalid_request
            - unauthorized
            - forbidden
            - origin_not_allowed
            - not_found
            - conflict
            - payload_too_large
            - insufficient_credits
            - budget_capped
            - content_not_cleared
            - rate_limited
            - capability_unavailable
            - upstream_unavailable
            - upstream_error
            - internal_error
          description: Stable machine-readable cause. Branch on this.
        details:
          description: Optional structured context, e.g. the credits shortfall.
        requestId:
          type: string
          description: >-
            Identifies this request in our logs. Include it when you contact
            support.
        timestamp:
          type: string
          format: date-time
          description: When the failure was produced.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A workspace API key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.