Getting started

Quickstart

This guide walks through a minimal server-side integration: verify your key, upload a source video, run a split job, poll status, and optionally receive webhooks.

Prerequisites

  • A Flikly organization on a Team or Custom plan
  • An API key from the Developer Portal (shown once at create — store it securely)
  • Server-side code only — never ship API keys to browsers or mobile apps

1. Verify context

curl -s "https://api.flikly.ai/api/v1/developer/me" \
  -H "Authorization: Bearer flk_live_YOUR_PREFIX_YOUR_SECRET"

2. Upload a source asset

Request a presigned URL, PUT the file, then confirm:

# Create upload URL
curl -s -X POST "https://api.flikly.ai/api/v1/developer/assets/upload-url" \
  -H "Authorization: Bearer $FLIKLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "source.mp4",
    "content_type": "video/mp4",
    "size_bytes": 10485760,
    "purpose": "split_source"
  }'

# Upload bytes to upload_url (PUT)
curl -s -X PUT "$UPLOAD_URL" \
  -H "Content-Type: video/mp4" \
  --data-binary @source.mp4

# Confirm
curl -s -X POST "https://api.flikly.ai/api/v1/developer/assets/confirm-upload" \
  -H "Authorization: Bearer $FLIKLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"asset_id": "asset_..."}'

3. Create a split job

V1 requires an uploaded asset — URL and YouTube inputs are not supported.

curl -s -X POST "https://api.flikly.ai/api/v1/developer/split-jobs" \
  -H "Authorization: Bearer $FLIKLY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: split-$(uuidgen)" \
  -d '{
    "source_asset_id": "asset_...",
    "clip_length_preset": "under_60",
    "max_clips": 5
  }'

4. Poll job status

curl -s "https://api.flikly.ai/api/v1/developer/split-jobs/split_job_..." \
  -H "Authorization: Bearer $FLIKLY_API_KEY"

# Or list all jobs
curl -s "https://api.flikly.ai/api/v1/developer/jobs?type=split&status=processing" \
  -H "Authorization: Bearer $FLIKLY_API_KEY"

5. Fetch clips when completed

curl -s "https://api.flikly.ai/api/v1/developer/split-jobs/split_job_.../clips" \
  -H "Authorization: Bearer $FLIKLY_API_KEY"

6. Optional: webhooks

Register an HTTPS endpoint for job.completed and job.failed. See Webhooks for signature verification.

Full curl scripts live in developers/examples/curl/. Node and Python samples are in developers/examples/node/ and developers/examples/python/.