# Assets

Asset upload and management

## Get Signed Upload URL

> Generates a signed PUT URL for uploading files directly to S3

```json
{"openapi":"3.0.3","info":{"title":"Ango Hub API v2","version":"2.0.0"},"tags":[{"name":"Assets","description":"Asset upload and management"}],"servers":[{"url":"https://imeritapi.ango.ai/v2","description":"EU Production Server"},{"url":"https://us-api.ango.ai/v2","description":"US Production Server"},{"url":"https://in-api.ango.ai/v2","description":"India Production Server"},{"url":"https://testapi.ango.ai/v2","description":"Test Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apikey","description":"API key for authentication. Format - apikey YOUR_API_KEY"}},"schemas":{"UploadUrlResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"uploadUrl":{"type":"string"}}}}}}},"paths":{"/getUploadUrl":{"get":{"tags":["Assets"],"summary":"Get Signed Upload URL","description":"Generates a signed PUT URL for uploading files directly to S3","operationId":"getUploadUrl","parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string"},"description":"File name with extension"},{"name":"project","in":"query","required":true,"schema":{"type":"string"},"description":"Project ID"},{"name":"type","in":"query","schema":{"type":"string","enum":["assets","segmentationModels","brushes","medicalBrushes","exports","instructions"]},"description":"File type (determines S3 path)"},{"name":"storageId","in":"query","schema":{"type":"string"},"description":"Custom storage ID"},{"name":"bucket","in":"query","schema":{"type":"string"},"description":"Custom bucket name"}],"responses":{"201":{"description":"Upload URL generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadUrlResponse"}}}}}}}}}
```

## Get Signed Download URL

> Generates a signed GET URL for downloading files from S3

```json
{"openapi":"3.0.3","info":{"title":"Ango Hub API v2","version":"2.0.0"},"tags":[{"name":"Assets","description":"Asset upload and management"}],"servers":[{"url":"https://imeritapi.ango.ai/v2","description":"EU Production Server"},{"url":"https://us-api.ango.ai/v2","description":"US Production Server"},{"url":"https://in-api.ango.ai/v2","description":"India Production Server"},{"url":"https://testapi.ango.ai/v2","description":"Test Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apikey","description":"API key for authentication. Format - apikey YOUR_API_KEY"}},"schemas":{"SignedUrlResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"signedUrl":{"type":"string"}}}}}}},"paths":{"/getSignedUrl":{"get":{"tags":["Assets"],"summary":"Get Signed Download URL","description":"Generates a signed GET URL for downloading files from S3","operationId":"getSignedUrl","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string"},"description":"Asset URL to sign"},{"name":"storageId","in":"query","schema":{"type":"string"},"description":"Storage ID"}],"responses":{"201":{"description":"Signed URL generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedUrlResponse"}}}}}}}}}
```

## Import Assets from Cloud

> Imports assets from cloud storage (S3, GCS, Azure) and creates tasks

```json
{"openapi":"3.0.3","info":{"title":"Ango Hub API v2","version":"2.0.0"},"tags":[{"name":"Assets","description":"Asset upload and management"}],"servers":[{"url":"https://imeritapi.ango.ai/v2","description":"EU Production Server"},{"url":"https://us-api.ango.ai/v2","description":"US Production Server"},{"url":"https://in-api.ango.ai/v2","description":"India Production Server"},{"url":"https://testapi.ango.ai/v2","description":"Test Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apikey","description":"API key for authentication. Format - apikey YOUR_API_KEY"}},"parameters":{"ProjectIdParam":{"name":"projectId","in":"path","required":true,"schema":{"type":"string"},"description":"Project ID"}},"schemas":{"CloudImportRequest":{"type":"object","required":["assets"],"properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/CloudImportAsset"}},"uploadLocal":{"type":"string","enum":["true","false"],"description":"Whether to download and store assets locally.\n- \"true\": Download assets from cloud URLs and store locally\n- \"false\": Keep assets in cloud (reference URLs only)\nDefault: \"false\" for cloud imports\n","default":"false"},"priority":{"type":"number","minimum":-1000,"maximum":1000,"description":"Task priority for queue ordering (higher values = higher priority)","default":0}}},"CloudImportAsset":{"type":"object","required":["data"],"properties":{"data":{"type":"string","description":"Cloud storage URL or path to the asset.\n- For images/videos: Full URL (e.g., `https://bucket.s3.amazonaws.com/image.jpg`)\n- For PCT (Point Cloud): Folder path in format `bucket-name/folder-path/` (must end with `/`)\n"},"dataset":{"type":"array","items":{"type":"string"},"description":"Alternative to data - array of URLs for multi-file assets (e.g., videos with frames)"},"externalId":{"type":"string","description":"External identifier for the asset (for reference/tracking)"},"storage":{"type":"string","description":"Storage integration ID (required for accessing private cloud buckets and PCT imports)"},"editorType":{"type":"string","enum":["ango","pct","llm","nrrd","iframe"],"description":"Asset editor type. Determines how the asset is processed and displayed.\n- `ango`: Standard AngoHub editor (default) - supports images, videos, PDFs, and more\n- `pct`: Point Cloud Tool - 3D point cloud annotation (requires folder path in `data`)\n- `llm`: LLM/Chat annotation editor\n- `nrrd`: Medical imaging (DICOM to NRRD conversion)\n- `iframe`: Custom iframe-based editor\n"},"batches":{"type":"array","items":{"type":"string"},"description":"Batch names to assign this asset to"},"metadata":{"type":"object","description":"Custom metadata key-value pairs"},"overlay":{"type":"array","items":{"type":"string"},"description":"Overlay image URLs (for image comparison tasks)"},"contextData":{"type":"object","description":"Additional context data for the asset"},"preLabel":{"type":"object","description":"Pre-labeling data (annotations from ML models or previous annotations)","properties":{"tools":{"type":"array","items":{"type":"object"}},"classifications":{"type":"array","items":{"type":"object"}},"relations":{"type":"array","items":{"type":"object"}}}}}},"AssetImportResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"assets":{"type":"object","properties":{"assetsCreated":{"type":"integer"},"tasksCreated":{"type":"integer"},"preLabelsCount":{"type":"integer"},"validPreLabelsCount":{"type":"integer"}}}}}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["fail","error"]},"message":{"type":"string"}}}},"responses":{"BadRequestError":{"description":"Bad request - validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/project/{projectId}/cloud":{"post":{"tags":["Assets"],"summary":"Import Assets from Cloud","description":"Imports assets from cloud storage (S3, GCS, Azure) and creates tasks","operationId":"importAssetsFromCloud","parameters":[{"$ref":"#/components/parameters/ProjectIdParam"},{"name":"batches","in":"query","schema":{"type":"string"},"description":"JSON stringified array of batch names"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudImportRequest"}}}},"responses":{"201":{"description":"Assets imported successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetImportResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestError"}}}}}}
```

## Upload Chat Assets

> Uploads chat/conversation assets for chat annotation projects

```json
{"openapi":"3.0.3","info":{"title":"Ango Hub API v2","version":"2.0.0"},"tags":[{"name":"Assets","description":"Asset upload and management"}],"servers":[{"url":"https://imeritapi.ango.ai/v2","description":"EU Production Server"},{"url":"https://us-api.ango.ai/v2","description":"US Production Server"},{"url":"https://in-api.ango.ai/v2","description":"India Production Server"},{"url":"https://testapi.ango.ai/v2","description":"Test Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apikey","description":"API key for authentication. Format - apikey YOUR_API_KEY"}},"parameters":{"ProjectIdParam":{"name":"projectId","in":"path","required":true,"schema":{"type":"string"},"description":"Project ID"}},"schemas":{"ChatAssetUploadRequest":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"JSON file with conversations"},"conversations":{"type":"string","description":"JSON stringified conversations array"},"storageId":{"type":"string"},"bucket":{"type":"string"},"batches":{"type":"string","description":"JSON stringified batch names"},"llmConfig":{"type":"string","description":"LLM configuration JSON"},"numberOfConversations":{"type":"number"},"namingStrategy":{"type":"string"},"priority":{"type":"number"}}},"AssetImportResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"assets":{"type":"object","properties":{"assetsCreated":{"type":"integer"},"tasksCreated":{"type":"integer"},"preLabelsCount":{"type":"integer"},"validPreLabelsCount":{"type":"integer"}}}}}}}}},"paths":{"/project/{projectId}/chat":{"post":{"tags":["Assets"],"summary":"Upload Chat Assets","description":"Uploads chat/conversation assets for chat annotation projects","operationId":"uploadChatAssets","parameters":[{"$ref":"#/components/parameters/ProjectIdParam"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ChatAssetUploadRequest"}}}},"responses":{"201":{"description":"Chat assets uploaded successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetImportResponse"}}}}}}}}}
```

## Get Project Assets

> Retrieves assets for a specific project with optional filtering

```json
{"openapi":"3.0.3","info":{"title":"Ango Hub API v2","version":"2.0.0"},"tags":[{"name":"Assets","description":"Asset upload and management"}],"servers":[{"url":"https://imeritapi.ango.ai/v2","description":"EU Production Server"},{"url":"https://us-api.ango.ai/v2","description":"US Production Server"},{"url":"https://in-api.ango.ai/v2","description":"India Production Server"},{"url":"https://testapi.ango.ai/v2","description":"Test Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apikey","description":"API key for authentication. Format - apikey YOUR_API_KEY"}},"parameters":{"ProjectIdParam":{"name":"projectId","in":"path","required":true,"schema":{"type":"string"},"description":"Project ID"},"PageParam":{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1},"description":"Page number (1-indexed)"},"LimitParam":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":10},"description":"Items per page (max 100)"}},"schemas":{"AssetListResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/Asset"}},"total":{"type":"integer"}}}}},"Asset":{"type":"object","properties":{"_id":{"type":"string"},"data":{"type":"string","description":"Asset URL"},"dataset":{"type":"array","items":{"type":"string"}},"overlay":{"type":"array","items":{"type":"string"}},"project":{"type":"string"},"organization":{"type":"string"},"externalId":{"type":"string"},"batches":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"},"contextData":{"type":"object"},"labelTasks":{"type":"array","items":{"type":"string"}},"deleted":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"}}}}},"paths":{"/project/{projectId}/assets":{"get":{"tags":["Assets"],"summary":"Get Project Assets","description":"Retrieves assets for a specific project with optional filtering","operationId":"getProjectAssets","parameters":[{"$ref":"#/components/parameters/ProjectIdParam"},{"$ref":"#/components/parameters/PageParam"},{"$ref":"#/components/parameters/LimitParam"},{"name":"filters","in":"query","schema":{"type":"string"},"description":"JSON stringified filter object"},{"name":"externalId","in":"query","schema":{"type":"string"},"description":"Filter by external ID"},{"name":"batches","in":"query","schema":{"type":"string"},"description":"Filter by batch names"}],"responses":{"200":{"description":"Assets retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetListResponse"}}}}}}}}}
```

## Delete Assets

> Deletes multiple assets from a project

```json
{"openapi":"3.0.3","info":{"title":"Ango Hub API v2","version":"2.0.0"},"tags":[{"name":"Assets","description":"Asset upload and management"}],"servers":[{"url":"https://imeritapi.ango.ai/v2","description":"EU Production Server"},{"url":"https://us-api.ango.ai/v2","description":"US Production Server"},{"url":"https://in-api.ango.ai/v2","description":"India Production Server"},{"url":"https://testapi.ango.ai/v2","description":"Test Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apikey","description":"API key for authentication. Format - apikey YOUR_API_KEY"}},"parameters":{"ProjectIdParam":{"name":"projectId","in":"path","required":true,"schema":{"type":"string"},"description":"Project ID"}},"schemas":{"BulkDeleteAssetsRequest":{"type":"object","required":["assets"],"properties":{"assets":{"type":"array","items":{"type":"string"}}}},"BulkDeleteResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"deleted":{"type":"integer"},"failed":{"type":"integer"}}}}}}},"paths":{"/project/{projectId}/assets":{"delete":{"tags":["Assets"],"summary":"Delete Assets","description":"Deletes multiple assets from a project","operationId":"bulkDeleteAssets","parameters":[{"$ref":"#/components/parameters/ProjectIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteAssetsRequest"}}}},"responses":{"200":{"description":"Assets deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteResponse"}}}}}}}}}
```

## Update Asset

> Updates asset metadata or properties

```json
{"openapi":"3.0.3","info":{"title":"Ango Hub API v2","version":"2.0.0"},"tags":[{"name":"Assets","description":"Asset upload and management"}],"servers":[{"url":"https://imeritapi.ango.ai/v2","description":"EU Production Server"},{"url":"https://us-api.ango.ai/v2","description":"US Production Server"},{"url":"https://in-api.ango.ai/v2","description":"India Production Server"},{"url":"https://testapi.ango.ai/v2","description":"Test Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apikey","description":"API key for authentication. Format - apikey YOUR_API_KEY"}},"schemas":{"AssetUpdateRequest":{"type":"object","properties":{"metadata":{"type":"object"},"contextData":{"type":"object"},"data":{"type":"string"},"overlay":{"type":"array","items":{"type":"string"}},"externalId":{"type":"string"}}},"AssetResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"}}}}},"Asset":{"type":"object","properties":{"_id":{"type":"string"},"data":{"type":"string","description":"Asset URL"},"dataset":{"type":"array","items":{"type":"string"}},"overlay":{"type":"array","items":{"type":"string"}},"project":{"type":"string"},"organization":{"type":"string"},"externalId":{"type":"string"},"batches":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"},"contextData":{"type":"object"},"labelTasks":{"type":"array","items":{"type":"string"}},"deleted":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"}}}}},"paths":{"/assets/{assetId}":{"post":{"tags":["Assets"],"summary":"Update Asset","description":"Updates asset metadata or properties","operationId":"updateAsset","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"},"description":"Asset ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetUpdateRequest"}}}},"responses":{"200":{"description":"Asset updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetResponse"}}}}}}}}}
```

## Assign Batches to Assets

> Assigns batch names to existing assets

```json
{"openapi":"3.0.3","info":{"title":"Ango Hub API v2","version":"2.0.0"},"tags":[{"name":"Assets","description":"Asset upload and management"}],"servers":[{"url":"https://imeritapi.ango.ai/v2","description":"EU Production Server"},{"url":"https://us-api.ango.ai/v2","description":"US Production Server"},{"url":"https://in-api.ango.ai/v2","description":"India Production Server"},{"url":"https://testapi.ango.ai/v2","description":"Test Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apikey","description":"API key for authentication. Format - apikey YOUR_API_KEY"}},"schemas":{"AssignBatchesRequest":{"type":"object","required":["assetIds","batches"],"properties":{"assetIds":{"type":"array","items":{"type":"string"}},"batches":{"type":"array","items":{"type":"string"}},"mode":{"type":"string","enum":["add","replace"],"default":"add"}}},"AssignBatchesResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"assets":{"type":"object","properties":{"modifiedCount":{"type":"integer"},"batches":{"type":"array","items":{"type":"string"}}}}}}}}}},"paths":{"/assignBatches":{"post":{"tags":["Assets"],"summary":"Assign Batches to Assets","description":"Assigns batch names to existing assets","operationId":"assignBatches","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignBatchesRequest"}}}},"responses":{"200":{"description":"Batches assigned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignBatchesResponse"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.imerit.net/api/docs/assets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
