POST/api/v1/motion-control

Animate

Drive a subject in a photo with a reference motion.

Upload a still image of the subject and a video of the movement. The subject is animated to follow it, limb for limb.

  • Returns a jobPoll it, or get a webhook
  • Failed jobs are freeThe whole hold comes back
  • Safe to retrySend an Idempotency-Key
curl -X POST https://api.kreatorsfactory.com/api/v1/motion-control \  -H "Authorization: Bearer $KREATORSFACTORY_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "image_key": "api/images/…/subject.png",    "motion_video_key": "api/videos/…/dance.mp4"  }'
A motion skeleton, and a person moving in exactly that pose.
OriginalResult

How it works

  1. 1Upload your filesPOST /uploads returns a file_key for each one.
  2. 2Start the jobYou get an id and a status_url straight away.
  3. 3Wait for itPoll status_url, or let your callback_url hear about it.
  4. 4Download the resultoutput_url is a signed link. Keep your own copy.

Request parameters

Send JSON with Content-Type: application/json. Job endpoints also accept an optional Idempotency-Key header. See Safe Retries.

FieldTypeRequiredDescription
image_keystringYesfile_key of the image of the subject to move.
motion_video_keystringYesfile_key of the video whose motion to copy.
callback_urlstringNoWe POST the result here when the job finishes, signed with your webhook secret. See Webhooks.

Response

Response200
{  "id": "7f3c2a9e-5b1d-4c8e-9a0f-2d6b1e4c7a31",  "status": "queued",  "status_url": "/api/v1/jobs/7f3c2a9e-5b1d-4c8e-9a0f-2d6b1e4c7a31"}

Every job endpoint answers with the same three fields. Poll status_url rather than building the path yourself; see Job Status for what it returns.

Errors

Every error arrives as {"error": {"code", "message"}}. Branch on code; the message may change. All errors.

HTTPCodeWhat it means
401unauthorizedMissing, unknown or revoked key.
402insufficient_balanceYour balance won't cover the estimated hold. Top up to continue.
400invalid_inputA field failed validation, or a file_key doesn't start with api/.
400capability_unavailableThis capability is switched off right now.
429rate_limitedYou're sending too fast. Back off and retry.
429at_capacityThe platform is briefly full. Retry shortly.
502 / 500internal_errorFailed on our side. Nothing is charged; retry, and tell us if it keeps happening.

These arrive inside error on a job that finished as failed, not as an HTTP status. A failed job is refunded in full.

Code on the jobWhat it means
face_not_detectedNo face was found in the input.
unsupported_formatThe file couldn't be decoded once work started.
input_too_largeOver a size or duration limit found during processing.
content_rejectedThe input or the result failed a content check.
processing_failedThe render didn't complete.

The whole round trip

Upload, start the job, and poll until it’s done.

# 1 · Upload each input (repeat per file) and keep its file_keyKEY=$(curl -s https://api.kreatorsfactory.com/api/v1/uploads \  -H "Authorization: Bearer $KREATORSFACTORY_API_KEY" \  -F "file=@input.mp4" | jq -r .file_key) # 2 · Start the job, with your file_keys in place of the …JOB=$(curl -s -X POST https://api.kreatorsfactory.com/api/v1/motion-control \  -H "Authorization: Bearer $KREATORSFACTORY_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "image_key": "api/images/…/subject.png",    "motion_video_key": "api/videos/…/dance.mp4"  }') # 3 · Poll status_url until status is succeeded or failedcurl -s "https://api.kreatorsfactory.com$(echo "$JOB" | jq -r .status_url)" \  -H "Authorization: Bearer $KREATORSFACTORY_API_KEY"