POST
/
extract
Create a new extract job
curl --request POST \
  --url https://api.cloudglue.dev/v1/extract \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "<string>",
  "prompt": "<string>",
  "schema": {},
  "enable_video_level_entities": false,
  "enable_segment_level_entities": true,
  "thumbnails_config": {
    "enable_segment_thumbnails": true
  },
  "segmentation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "segmentation_config": {
    "strategy": "uniform",
    "uniform_config": {
      "window_seconds": 31,
      "hop_seconds": 30.5
    },
    "shot_detector_config": {
      "threshold": 123,
      "min_seconds": 31,
      "max_seconds": 31,
      "detector": "adaptive"
    },
    "start_time_seconds": 1,
    "end_time_seconds": 1
  }
}'
{
  "job_id": "<string>",
  "status": "pending",
  "url": "<string>",
  "created_at": 123,
  "extract_config": {
    "prompt": "<string>",
    "schema": {},
    "enable_video_level_entities": false,
    "enable_segment_level_entities": true
  },
  "data": {
    "entities": {},
    "segment_entities": [
      {
        "start_time": 123,
        "end_time": 123,
        "entities": {}
      }
    ]
  },
  "error": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Extract job parameters

url
string
required

Input video URL. Supports URIs of files uploaded to Cloudglue Files endpoint, public YouTube video URLs, public HTTP URLs, and S3 or Dropbox URIs which have been granted access to Cloudglue via data connectors.

Note that YouTube videos are currently limited to speech level understanding only. For S3 and Dropbox URI support see our documentation on data connectors for setup information.

prompt
string

A natural language prompt describing the data you want to extract. Required if no schema is provided.

schema
object

A more rigid structure if you already know the JSON layout you want. Required if no prompt is provided.

enable_video_level_entities
boolean
default:false

Whether to extract entities at the video level

enable_segment_level_entities
boolean
default:true

Whether to extract entities at the segment level

thumbnails_config
object
segmentation_id
string<uuid>

Segmentation job id to use. If not provided will use default to uniform 20s segmentation. Cannot be provided together with segmentation_config.

segmentation_config
object

Configuration for video segmentation. Cannot be provided together with segmentation_id.

Response

Successful response

job_id
string
required
status
enum<string>
required
Available options:
pending,
processing,
completed,
failed,
not_applicable
url
string

The URL of the processed video

created_at
integer

Unix timestamp of when the job was created

extract_config
object

Configuration for automatic entity extraction from videos

data
object

The structured data extracted from the video based on prompt or schema

error
string

Error message if status is 'failed'