curl
export token="3726e6ad1c6ce2eb643a268ea2f4682686c9ce33e28561ped915cbf1dbe7ab52"
My First Collection
curl --request POST \ --url https://api.trytldw.ai/v1/collections/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "New Collection" }'
{ "id": "c1a2b3c4-1a2b-3c4d-5e6f-7g8h9i0j1k2l" }
curl --request POST \ --url https://api.trytldw.ai/v1/media/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "collection_id": "c1a2b3c4-1a2b-3c4d-5e6f-7g8h9i0j1k2l", "media_list": { "external_id": "video_1", "title": "My Video1", "url": "https//example.com/video1.mp4" } }'
{ "media_list": [ { "id": "c1a2b3c4-1a2b-3c4d-5e6f-7g8h9i0j1k2l", "external_id": "video_12345", "status": "PENDING" } ] }
curl --request GET \ --url https://api.trytldw.ai/v1/media/{media_id} \ --header 'Authorization: Bearer <token>'
{ "id": "c1a2b3c4-1a2b-3c4d-5e6f-7g8h9i0j1k2l", "external_id": "video_12345", "status": "COMPLETED", "collection_id": "c1a2b3c4-1a2b-3c4d-5e6f-7g8h9i0j1k2l", "title": "My Video", "segments": [ { "start_ms": 0, "end_ms": 1000, "embedding": [ 123 ], "description": "People walking in the park" } ] }
curl --request POST \ --url https://api.trytldw.ai/v1/search/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "collection_id": "<string>", "media_ids": [], "search_term": "<string>", "similarity_threshold": 0.28, "offset": 0, "limit": 30, "configs": { "smart_remove_false_positive": false } }'
{ "scenes": [ { "media_id": "<string>", "external_id": "<string>", "start_ms": 123, "end_ms": 123, "max_similarity": 123, "fragments": [ { "uuid": "<string>", "start_ms": 123, "end_ms": 123, "similarity": 123, "description": "<string>" } ] } ], "metadata": {} }
Was this page helpful?