Overview
The Modify API allows you to edit and customize existing videos generated through Knowlify. Make changes to text, styling, timing, and other video elements without regenerating from scratch.
Modifications are processed faster than full generation since they build on existing video assets.
WebSocket Endpoint
wss://50fa8sjxo9.execute-api.us-west-2.amazonaws.com/production
Authentication
No API key required for the modify endpoint.
Request Parameters
URL of the original video to be modified
Description of the modification to be made (e.g., “HTTP 200 Received should be yellow instead of blue”)
Timestamp where the modification should be applied (e.g., “6:18”)
Code Examples
import asyncio
import websockets
import json
task = r'''
HTTP 200 Received should be yellow instead of blue
'''
link = "https://abundant-videos-modified.s3.us-west-2.amazonaws.com/720263ba-d501-47c8-a556-42cf588f5043_combined.mp4"
async def send_request(task):
print("Sending request...")
uri = "wss://50fa8sjxo9.execute-api.us-west-2.amazonaws.com/production"
async with websockets.connect(uri) as websocket:
payload = {
"action": "modify",
"link": link,
"query": task,
"timestamp": "6:18"
}
await websocket.send(json.dumps(payload))
while True:
try:
response = await websocket.recv()
print("Received response:", response)
except websockets.exceptions.ConnectionClosed:
print("Connection closed by the server.")
break
if __name__ == "__main__":
print("WebSocket test:")
asyncio.run(send_request(task))
WebSocket Responses
The WebSocket connection will send real-time updates throughout the modification process:
Progress Updates
{
"type": "progress",
"message": "Modifying video at timestamp 6:18...",
"progress": 60
}
Completion Response
{
"video_link": "https://abundant-videos-modified.s3.us-west-2.amazonaws.com/modified_video.mp4",
"vtt_file": "https://abundant-videos-modified.s3.us-west-2.amazonaws.com/subtitles.vtt",
"status": "completed"
}
Error Response
{
"type": "error",
"message": "Could not access the provided video link",
"error_code": "INVALID_VIDEO_URL"
}
Response Fields
Download URL for the modified video
URL for the WebVTT subtitle file with synchronized captions
Modification status: completed, failed
Modification progress as percentage (0-100) - only in progress messages