Assets

Bulk import images from URLs

POST
/upload/from-urls

Queues each URL for asynchronous, SSRF-safe fetch-and-ingest via a background worker. Malformed or duplicate URLs are rejected up front and reported in the response without blocking the accepted URLs. Poll GET /upload/imports/{batch_id} for progress.

Authorization

token_auth
headerAuthorizationBearer <token>

Token-based authentication using access tokens.

Request Body

application/json
  1. body
urls*array<string>

Public HTTP/HTTPS URLs to import. Malformed URLs and duplicates within the list are rejected individually (reported in the response's rejected list) rather than failing the whole request.

Items1 <= items <= 500
project_id?|

Optional project ID to associate the created assets with.

Defaultnull
tag_ids?array<string>

IDs of existing, visible tags to assign to each newly created asset.

Default[]

Response Body

Successful Response

application/json
  1. response
batch_id*|

UUID of the created import batch, tracked via GET /upload/imports/{batch_id}. Null when no URLs were accepted.

accepted*Accepted

Number of URLs accepted and queued for background ingestion.

rejected*array<>

URLs rejected before queuing, with a reason for each.

curl -X POST "https://example.com/upload/from-urls" \  -H "Content-Type: application/json" \  -d '{    "urls": [      "string"    ]  }'
{  "batch_id": "string",  "accepted": 0,  "rejected": [    {      "url": "string",      "reason": "string"    }  ]}