Skip to content

Create AI Editing Task

FreshPOST
POST https://api.creatify.ai/api/ai_editing/

Create a new AI editing task. AI editing uses artificial intelligence to automatically edit and enhance video content.

Credit Cost

5 credits per 30 seconds of video

Request Body

NameTypeRequiredDescription
video_urlstringYesURL of the source video to edit
instructionsstringNoEditing instructions or style preferences
aspect_ratiostringNoOutput aspect ratio (e.g., 16:9, 9:16, 1:1)

Headers

HeaderTypeRequiredDescription
X-API-IDstringYesYour Creatify API ID
X-API-KEYstringYesYour Creatify API key
Content-TypestringYesapplication/json

Example Request

bash
curl -X POST 'https://api.creatify.ai/api/ai_editing/' \
  -H 'X-API-ID: your-api-id' \
  -H 'X-API-KEY: your-api-key' \
  -H 'Content-Type: application/json' \
  -d '{
    "video_url": "https://example.com/raw-video.mp4",
    "instructions": "Create a fast-paced product showcase with dynamic transitions",
    "aspect_ratio": "9:16"
  }'

Response

json
{
  "id": "edit-001",
  "status": "pending",
  "created_at": "2024-01-15T10:30:00Z"
}

Status Codes

CodeDescription
201Task created successfully
400Bad request -- invalid video URL or parameters
401Unauthorized -- invalid API credentials
402Insufficient credits
429Rate limit exceeded
500Internal server error

Workflow

  1. Create the editing task
  2. Poll GET /api/ai_editing/{id}/ until status is done
  3. Preview with POST /api/ai_editing/{id}/preview/ (1 credit/30s)
  4. Render final with POST /api/ai_editing/{id}/render/ (4 credits/30s)

TIP

Provide clear editing instructions to guide the AI. The more specific your instructions, the better the result.