v1

latestOpenAPI 3.0.22026-07-2610288167.4 KB
asset

Get asset metadata from remote URL

Retrieves metadata for an asset from a remote download URL without downloading the entire file. Supports various sources including CivitAI and other model repositories. Uses HEAD requests or API calls to fetch metadata efficiently. This endpoint is for previewing metadata before downloading, not for getting metadata of existing assets.

get/api/assets/remote-metadata

Query parameters

urlstring uri required
Example:https://civitai.com/api/download/models/123456

Download URL to retrieve metadata from

Response

Metadata retrieved successfully

content_lengthinteger required

Size of the asset in bytes (-1 if unknown)

content_typestring

MIME type of the asset

filenamestring

Suggested filename for the asset from source

namestring

Display name or title for the asset from source

tagsstring[]

Tags for categorization from source

preview_imagestring

Preview image as base64-encoded data URL

Example response

{
  "content_length": 4294967296,
  "content_type": "application/octet-stream",
  "filename": "realistic-vision-v5.safetensors",
  "name": "Realistic Vision v5.0",
  "tags": [
    "models",
    "checkpoint"
  ],
  "preview_image": "data:image/jpeg;base64,/9j/4AAQSkZJRg...",
  "validation": {
    "is_valid": true,
    "errors": [
      {
        "code": "FORMAT_NOT_ALLOWED",
        "message": "File format \"PickleTensor\" is not allowed. Allowed formats: [SafeTensor]",
        "field": "format"
      }
    ],
    "warnings": [
      {
        "code": "FORMAT_NOT_ALLOWED",
        "message": "File format \"PickleTensor\" is not allowed. Allowed formats: [SafeTensor]",
        "field": "format"
      }
    ]
  }
}