CoreViz
API

Get Media

Retrieve a single media item with frames, detected objects, and metadata

Get Media

Fetch full details for a single media item by ID, including processed frames, AI-generated captions, detected objects, and tags.

Endpoint

GET /api/media/{mediaId}

Path Parameters

ParameterTypeDescription
mediaIdstringThe media item's UUID (hyphens stripped)

Headers

Accepts x-api-key or Authorization: Bearer. See Getting Started.

Example Request

curl -H "x-api-key: YOUR_API_KEY" \
  "https://lab.coreviz.io/api/media/MEDIA_ID"

Response

Status Code: 200 OK

{
  "media": {
    "id": "abc123def456",
    "name": "hero-shot.jpg",
    "type": "image",
    "blob": "https://blob.vercel-storage.com/.../hero-shot.jpg",
    "path": "collectionId.folderId.abc123def456",
    "datasetId": "collectionId",
    "width": 2400,
    "height": 1600,
    "duration": null,
    "sizeBytes": 184320,
    "createdAt": "2026-03-10T14:22:00.000Z",
    "updatedAt": "2026-03-10T14:22:00.000Z",
    "createdById": "userId123",
    "updatedById": null,
    "status": "active",
    "sourceMediaId": null,
    "versionNumber": 1,
    "metadata": {
      "tags": {
        "color": ["red"],
        "category": ["product"]
      },
      "moderation": {
        "status": "approved",
        "categories": [],
        "moderatedAt": "2026-03-10T14:22:01.000Z"
      }
    },
    "frames": [
      {
        "id": "frameId789",
        "timestamp": "0",
        "blob": "https://blob.vercel-storage.com/.../processed.jpg",
        "width": 2400,
        "height": 1600,
        "status": "active",
        "createdAt": "2026-03-10T14:22:05.000Z",
        "mediaId": "abc123def456",
        "captions": [
          {
            "id": "captionId111",
            "text": "A red shoe on a white background.",
            "frameId": "frameId789",
            "createdAt": "2026-03-10T14:22:15.000Z",
            "status": "active"
          }
        ],
        "objects": [
          {
            "id": "objectId222",
            "type": "object",
            "label": "shoe",
            "blob": "https://blob.vercel-storage.com/.../crop-shoe.jpg",
            "status": "active"
          }
        ]
      }
    ],
    "dataset": {
      "id": "collectionId",
      "name": "Product Photos",
      "organizationId": "orgId333"
    }
  }
}

Response Fields

Media Object

FieldTypeDescription
idstringUUID without hyphens
namestringFile name
typestring"image", "video", or "folder"
blobstringPublic URL to the file
pathstringltree folder path
datasetIdstringParent collection ID
width / heightintegerDimensions in pixels
durationnumber | nullVideo duration in seconds
sizeBytesintegerFile size in bytes
createdAt / updatedAtstringISO 8601 timestamps
sourceMediaIdstring | nullID of the original if this is a derived version
versionNumberintegerVersion number (1 for originals)
metadataobjectTags, moderation, and custom attributes
framesFrame[]Processed frames (1 for images, many for videos)
datasetobjectParent collection info

Frame Object

FieldTypeDescription
idstringFrame ID
timestampstringTimestamp within the video ("0" for images)
blobstringProcessed frame URL
captionsCaption[]AI-generated descriptions
objectsObject[]Detected objects with bounding boxes

Object

FieldTypeDescription
idstringObject ID — use with similarToObjectId in the browse endpoint
typestringobject, face, frame, text, etc.
labelstringDetected label
blobstringURL to cropped object image (empty string if not available)

Error Responses

StatusDescription
401Missing or invalid authentication
403No access to this media item's organization
404Media not found
500Internal server error

JavaScript Example

const media = await fetch(
  'https://lab.coreviz.io/api/media/MEDIA_ID',
  { headers: { 'x-api-key': 'YOUR_API_KEY' } }
).then(r => r.json()).then(d => d.media);

console.log(media.blob);                           // public URL
console.log(media.metadata?.tags);                 // { color: ['red'], ... }
console.log(media.frames[0].objects.map(o => o.id)); // object IDs for similarity search