Skip to main content
POST
/
assets
Upload an asset
curl --request POST \
  --url https://api.argil.ai/v1/assets \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "my-broll-clip",
  "type": "VIDEO",
  "url": "https://example.com/clip.mp4"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "type": "AUDIO",
  "status": "PROCESSING",
  "fileUrl": "<string>",
  "thumbnailUrl": "<string>",
  "createdAt": "2023-11-07T05:31:56Z"
}
Upload an image or video by providing a publicly accessible URL. The asset is downloaded and processed asynchronously.

Usage Flow

  1. Call POST /assets with the asset URL, name, and type
  2. Receive the asset ID with status: PROCESSING
  3. Poll GET /assets/{id} until status is READY
  4. Use the asset ID in POST /videos with broll.type: UPLOAD

Example

# 1. Upload
curl -X POST https://api.argil.ai/v1/assets \
  -H "Authorization: ApiKey YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "product-demo",
    "type": "VIDEO",
    "url": "https://example.com/demo.mp4"
  }'

# 2. Poll until ready
curl https://api.argil.ai/v1/assets/ASSET_ID \
  -H "Authorization: ApiKey YOUR_KEY"

# 3. Use as B-roll in a video
curl -X POST https://api.argil.ai/v1/videos \
  -H "Authorization: ApiKey YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-video",
    "type": "moments",
    "moments": [{
      "transcript": "Check out our product",
      "avatarId": "...",
      "voiceId": "...",
      "broll": {
        "type": "UPLOAD",
        "assetId": "ASSET_ID"
      }
    }]
  }'

Authorizations

x-api-key
string
header
required

API key to be included in the x-api-key header

Body

application/json
name
string
required

Display name for the asset

Required string length: 1 - 256
type
enum<string>
required

Asset type. Audio upload is not supported.

Available options:
IMAGE,
VIDEO
url
string<uri>
required

Publicly accessible URL to download the asset from

Response

Duplicate asset found — existing asset returned

id
string<uuid>
name
string | null
type
enum<string>
Available options:
AUDIO,
IMAGE,
VIDEO
status
enum<string>

Processing status. Poll until READY before using as B-roll.

Available options:
PROCESSING,
READY,
FAILED
fileUrl
string | null

URL to access the asset. Null while processing.

thumbnailUrl
string | null

URL to a thumbnail image. Null while processing.

createdAt
string<date-time>