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

# Finalize image upload

> Record an uploaded image as a private asset and return the URL to reference it by.



## OpenAPI

````yaml /openapi.json post /task/image-upload/{id}/finalize
openapi: 3.1.0
info:
  title: Kaneo API
  version: 1.0.0
  description: Kaneo Project Management API - Manage projects, tasks, labels, and more
servers:
  - url: https://cloud.kaneo.app/api
    description: Kaneo API Server
security:
  - bearerAuth: []
paths:
  /task/image-upload/{id}/finalize:
    post:
      tags:
        - Tasks
      summary: Finalize image upload
      description: >-
        Record an uploaded image as a private asset and return the URL to
        reference it by.
      operationId: finalizeTaskImageUpload
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                key:
                  type: string
                  description: The key returned when the URL was issued.
                filename:
                  type: string
                contentType:
                  type: string
                size:
                  type: number
                surface:
                  type: string
                  enum:
                    - description
                    - comment
                  description: Where the image is used, which decides how it is scoped.
              required:
                - key
                - filename
                - contentType
                - size
                - surface
      responses:
        '200':
          description: The stored asset
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskImageAsset'
        '400':
          description: Invalid upload, or the key does not belong to this task
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Missing or invalid credentials
        '403':
          description: No workspace access, or missing task:update permission
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: Task not found
          content:
            text/plain:
              schema:
                type: string
components:
  schemas:
    TaskImageAsset:
      type: object
      properties:
        id:
          type: string
        url:
          type: string
          description: Where the stored image can be read back from.
      required:
        - id
        - url
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or session token (Bearer)

````