From a link to an MP4 in five calls
Every call sends the key as a bearer token. Responses are JSON, and errors always carry an error code and a message you can show to a person.
Create a key
export CASTKIT_KEY="ck_live_..."Create a project from a URL
curl -X POST https://api.castkit.ai/api/v1/projects \ -H "Authorization: Bearer $CASTKIT_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://www.youtube.com/watch?v=VIDEO_ID", "clipCount": 8}'Poll the project
curl https://api.castkit.ai/api/v1/projects/$PROJECT_ID \ -H "Authorization: Bearer $CASTKIT_KEY"List the clips
curl https://api.castkit.ai/api/v1/projects/$PROJECT_ID/clips \ -H "Authorization: Bearer $CASTKIT_KEY"Render an export
curl -X POST https://api.castkit.ai/api/v1/clips/$CLIP_ID/exports \ -H "Authorization: Bearer $CASTKIT_KEY" \ -H "Content-Type: application/json" \ -d '{"aspect": "9:16", "quality": "1080p"}'Get the download URL
curl https://api.castkit.ai/api/v1/exports/$EXPORT_ID \ -H "Authorization: Bearer $CASTKIT_KEY"
Your first clip from code is one key away.
Create a key, paste the quick start into a terminal and watch the first export land. The first episode is free.