Cut.ProDocs

Errors

Error format, what each HTTP status asks of you and the complete catalog of codes.

Every error, on every route and every status, has the same body:

{ "code": "INSUFFICIENT_CREDITS", "extra": { "credits_needed": 121, "current_balance": 40 } }
FieldTypeDescription
codestringStable identifier, uppercase, from a closed set. Use a switch on it.
extraobjectOnly appears when there is something to act on: what was missing, which field failed, which ids were rejected.

There is no text message. The server does not know your user's language, and text cannot be handled in a switch: translate the code in your interface.

HTTP status

StatusMeansWhat to do
400The request body is wrongFix it. Repeating it unchanged gives the same error.
401Missing, revoked or expired keyCheck the X-Api-Key header.
402Insufficient creditsRead extra.credits_needed and top up.
403The source or the account is out of reachThere is nothing to retry.
404Does not exist in this workspaceCheck the id and the workspace.
409It exists, but its current state refuses the operationWait and try again.
410It existed and expiredUpload again or render again.
422Valid link, unusable videoUse another source.
429Rate limitWait the seconds in Retry-After.
5xxOur failureRetry with increasing backoff.

Validation

A body or query outside the schema returns VALIDATION_ERROR, and extra.errors lists the fields that failed, with a dot between levels:

400 Bad Request
{ "code": "VALIDATION_ERROR", "extra": { "errors": ["video_id", "timeframe.end"] } }

Nonexistent route

A path that does not exist returns 404 NOT_FOUND, with extra.openapi pointing to the specification and extra.docs to this documentation's llms.txt. That is how an agent that guessed the route finds the right path.

Handling errors

const response = await fetch(`${API}/clips`, { method: "POST", headers, body });
if (!response.ok) {
	const { code, extra } = await response.json();
	switch (code) {
		case "INSUFFICIENT_CREDITS":
			return askForTopUp(extra.credits_needed);
		case "RATE_LIMIT_EXCEEDED":
		case "SERVICE_UNAVAILABLE":
			return retryAfter(Number(response.headers.get("Retry-After")));
		default:
			throw new Error(code);
	}
}

Job error

A job that fails after being accepted does not return an error HTTP status: the read route responds 200 with status: "failed" and the reason in error_code. In clipping, for example, DOWNLOAD_PRIVATE_VIDEO says the video became private after the analysis. See Clipping.

Code catalog

All the codes the API returns, generated from the specification on every publication of this documentation. For the meaning of a code on a route, open the route in the reference.

CodeStatusReturned by
CONNECTION_INVALID400DELETE /posts/{id}/items/{itemId}
DELETE_FAILED400DELETE /posts/{id}/items/{itemId}
DELETE_LIMIT_REACHED400DELETE /posts/{id}/items/{itemId}
DELETE_NOT_SUPPORTED400DELETE /posts/{id}/items/{itemId}
FILE_TOO_LARGE400POST /videos/uploadPOST /transcriptions/uploadPOST /personas/sources/upload
IMAGES_INVALID400POST /generations
INVALID_CHANNEL_URL400POST /monitorsPATCH /monitors/{id}POST /monitors/{id}/startPOST /monitors/{id}/stop
INVALID_CONNECTIONS400POST /postsPATCH /posts/{id}
INVALID_DURATION_RANGE400POST /monitorsPATCH /monitors/{id}POST /monitors/{id}/startPOST /monitors/{id}/stop
INVALID_FILE_TYPE400POST /videos/uploadPOST /transcriptions/uploadPOST /personas/sources/upload
INVALID_IMAGE400POST /personas/facesPOST /personas/{id}/shots/photosPOST /generations/images
INVALID_METADATA400POST /posts
INVALID_OBSERVING_TYPE400GET /monitors/{id}/broadcastsGET /monitors/{id}/broadcasts/{broadcastId}/clipsPOST /monitors/{id}/broadcasts/{broadcastId}/clips/apply_templatePOST /monitors/{id}/broadcasts/{broadcastId}/clips/{clipId}/render
INVALID_SCHEDULED_AT400POST /postsPATCH /posts/{id}
INVALID_STRATEGY_OPTIONS400POST /clipsPOST /clips/{videoId}/submissions/{submissionId}/retry
INVALID_TRANSLATE_LANGUAGE400POST /clipsPOST /clips/{videoId}/submissions/{submissionId}/retry
ITEM_NOT_EDITABLE400PATCH /posts/{id}
ITEM_NOT_FAILED400POST /posts/{id}/items/{itemId}/retry
ITEM_NOT_REMOVABLE400DELETE /posts/{id}/items/{itemId}
ITEMS_EMPTY400PATCH /posts/{id}
MEDIA_METADATA_REQUIRED400POST /transcriptions
MEDIA_TOO_LONG400POST /transcriptions
MISSING_WORKSPACE_ID400any route
MODE_UNSUPPORTED400POST /generations
MODEL_UNAVAILABLE400POST /generationsPOST /generations/improve
NO_PENDING_ITEMS400POST /posts/{id}/publish
NO_RENDERS_SELECTED400POST /renders/bulk-download
NOTHING_TO_UPDATE400PATCH /posts/{id}
PERMISSION_MISSING400DELETE /posts/{id}/items/{itemId}
PLATFORM_UNAVAILABLE400POST /posts
PRODUCT_URL_INVALID400POST /personas/{id}/shots/product
PUBLISHED_ID_MISSING400DELETE /posts/{id}/items/{itemId}
RATIO_INVALID400POST /generations
RESOLUTION_INVALID400POST /generations
SCENE_ACTION_UNSUPPORTED400POST /personas/{id}/shots
SCHEDULE_LOCKED400PATCH /posts/{id}
SECONDS_INVALID400POST /generations
STYLE_REQUIRED400GET /personas/swap/quotePOST /personas/{id}/videos
STYLE_UNSUPPORTED400GET /personas/swap/quotePOST /personas/{id}/videos
TARGET_UNSUPPORTED400POST /personas/{id}/videos
TIMEFRAME_OUT_OF_BOUNDS400POST /clipsPOST /clips/{videoId}/submissions/{submissionId}/retry
TIMEFRAME_TOO_SHORT400POST /clipsPOST /clips/{videoId}/submissions/{submissionId}/retry
TOO_MANY_RENDERS400POST /renders/bulk-download
VALIDATION_ERROR400any route
VIDEO_DURATION_OUT_OF_RANGE400GET /personas/swap/quotePOST /personas/{id}/videos
VIDEO_TOO_LONG400POST /videos/upload/completePOST /clipsPOST /clips/infoPOST /clips/{videoId}/submissions/{submissionId}/retry
VIDEO_TOO_SHORT400POST /videos/upload/complete
VIDEO_UNSUPPORTED400GET /personas/swap/quotePOST /personas/{id}/videos
VOICE_INVALID400POST /generations
WORKSPACE_NOT_AUTHORIZED400any route
UNAUTHORIZED401any route
CREDIT_CHARGE_FAILED402POST /clipsPOST /clips/{videoId}/submissions/{submissionId}/retry
INSUFFICIENT_CREDITS402POST /clipsPOST /clips/{videoId}/submissions/{submissionId}/retryPOST /monitorsPATCH /monitors/{id}POST /monitors/{id}/startPOST /monitors/{id}/stopPOST /transcriptionsPOST /personasPOST /personas/{id}/regeneratePOST /personas/{id}/videosPOST /personas/{id}/shotsPOST /generationsPOST /generations/improve
ACCESS_DENIED403POST /clips/info
ACCOUNT_BLOCKED403any route
AGE_RESTRICTED403POST /clips/info
CLIP_FORBIDDEN403DELETE /clips/{videoId}
CLIP_RESULT_FORBIDDEN403DELETE /clips/{videoId}/submissions/{submissionId}/clips/{clipId}
DAILY_LIMIT_EXCEEDED403POST /posts
FORBIDDEN403any route
LIVE_CLIPS_NOT_AVAILABLE403POST /monitorsPATCH /monitors/{id}POST /monitors/{id}/startPOST /monitors/{id}/stop
PLATFORM_NOT_SUPPORTED403POST /clipsPOST /clips/infoPOST /clips/{videoId}/submissions/{submissionId}/retryPOST /monitorsPATCH /monitors/{id}POST /monitors/{id}/startPOST /monitors/{id}/stop
POST_FORBIDDEN403DELETE /posts/{id}/items/{itemId}
PRIVATE_VIDEO403POST /clips/info
REGION_BLOCKED403POST /clips/info
RENDER_FORBIDDEN403DELETE /renders/{renderId}
SUBMISSION_FORBIDDEN403DELETE /clips/{videoId}/submissions/{submissionId}
WORKSPACE_FORBIDDEN403any route
CLIP_NOT_FOUND404DELETE /clips/{videoId}GET /clips/{videoId}/submissionsDELETE /clips/{videoId}/submissions/{submissionId}DELETE /clips/{videoId}/submissions/{submissionId}/clips/{clipId}GET /clips/{videoId}/submissions/{submissionId}/clips/{clipId}/subtitlesPOST /monitors/{id}/broadcasts/{broadcastId}/clips/{clipId}/render
CLIP_RESULT_NOT_FOUND404DELETE /clips/{videoId}/submissions/{submissionId}/clips/{clipId}GET /clips/{videoId}/submissions/{submissionId}/clips/{clipId}/subtitlesPOST /clips/{videoId}/submissions/{submissionId}/clips/{clipId}/render
CONNECTION_NOT_FOUND404, 400GET /connections/{id}DELETE /posts/{id}/items/{itemId}
CREATOR_NOT_FOUND404POST /monitorsPATCH /monitors/{id}POST /monitors/{id}/startPOST /monitors/{id}/stop
EDIT_NOT_FOUND404POST /monitors/{id}/broadcasts/{broadcastId}/clips/{clipId}/renderPOST /renders
EDITS_NOT_FOUND404POST /postsPATCH /posts/{id}
FACE_NOT_FOUND404POST /personas
FILE_NOT_FOUND404POST /videos/upload/multipart/completePOST /videos/upload/multipart/abortPOST /videos/upload/completePOST /personas/sources/upload/complete
GENERATION_NOT_FOUND404GET /generations/{id}DELETE /generations/{id}POST /generations/{id}/editPOST /generations/{id}/feedbackPOST /generations/{id}/refundGET /generations/{id}/download
IMAGE_NOT_FOUND404POST /generations
ITEM_NOT_FOUND404POST /posts/{id}/items/{itemId}/retryDELETE /posts/{id}/items/{itemId}
JOB_NOT_FOUND404GET /renders/bulk-download/{jobId}
MEDIA_NOT_FOUND404POST /transcriptionsGET /personas/swap/quotePOST /personas/{id}/videos
METADATA_UNAVAILABLE404POST /clips/info
MONITORING_NOT_FOUND404POST /monitorsGET /monitors/{id}PATCH /monitors/{id}DELETE /monitors/{id}POST /monitors/{id}/startPOST /monitors/{id}/stopGET /monitors/{id}/broadcastsGET /monitors/{id}/broadcasts/{broadcastId}/clipsPOST /monitors/{id}/broadcasts/{broadcastId}/clips/apply_templatePOST /monitors/{id}/broadcasts/{broadcastId}/clips/{clipId}/render
NO_SUBTITLES404GET /clips/{videoId}/submissions/{submissionId}/clips/{clipId}/subtitles
NO_VALID_RENDERS404POST /renders/bulk-download
NO_VIDEO_INFO404POST /clipsPOST /clips/{videoId}/submissions/{submissionId}/retry
NOT_FOUND404any route
PERSONA_NOT_FOUND404POST /personas/presets/{presetId}POST /personasGET /personas/{id}DELETE /personas/{id}POST /personas/{id}/regeneratePOST /personas/{id}/versions/{versionId}/restorePOST /personas/{id}/versions/{versionId}/feedbackPOST /personas/{id}/savePOST /personas/{id}/videosPOST /personas/{id}/shots/productPOST /personas/{id}/shots
PHOTO_NOT_FOUND404POST /personas/{id}/shots
POST_NOT_FOUND404GET /posts/{id}PATCH /posts/{id}POST /posts/{id}/publishPOST /posts/{id}/items/{itemId}/retryDELETE /posts/{id}/items/{itemId}
PRESET_NOT_FOUND404POST /personas/presets/{presetId}PUT /personas/presets/{presetId}/favorite
RENDER_NOT_FOUND404GET /renders/{renderId}DELETE /renders/{renderId}GET /renders/{renderId}/download
SHOT_NOT_FOUND404GET /personas/{id}/shots/{shotId}
STRATEGY_NOT_FOUND404POST /clipsPOST /clips/{videoId}/submissions/{submissionId}/retryPOST /monitorsPATCH /monitors/{id}POST /monitors/{id}/startPOST /monitors/{id}/stop
STREAM_NOT_FOUND404GET /monitors/{id}/broadcasts/{broadcastId}/clips
SUBMISSION_NOT_FOUND404GET /clips/{videoId}/submissions/{submissionId}DELETE /clips/{videoId}/submissions/{submissionId}POST /clips/{videoId}/submissions/{submissionId}/retryPOST /clips/{videoId}/submissions/{submissionId}/apply_templateGET /clips/{videoId}/submissions/{submissionId}/clipsDELETE /clips/{videoId}/submissions/{submissionId}/clips/{clipId}GET /clips/{videoId}/submissions/{submissionId}/clips/{clipId}/subtitles
TEMPLATE_NOT_FOUND404POST /clipsPOST /clips/{videoId}/submissions/{submissionId}/retryPOST /clips/{videoId}/submissions/{submissionId}/apply_templatePOST /monitorsPATCH /monitors/{id}POST /monitors/{id}/startPOST /monitors/{id}/stopPOST /monitors/{id}/broadcasts/{broadcastId}/clips/apply_template
TRANSCRIPTION_NOT_FOUND404GET /transcriptions/{transcriptionId}DELETE /transcriptions/{transcriptionId}GET /transcriptions/{transcriptionId}/transcriptGET /transcriptions/{transcriptionId}/download
UNAVAILABLE404POST /clips/info
VERSION_NOT_FOUND404POST /personas/{id}/versions/{versionId}/restorePOST /personas/{id}/versions/{versionId}/feedbackPOST /personas/{id}/videosPOST /personas/{id}/shots
VIDEO_ID_NOT_FOUND404POST /clips/info
VIDEO_NOT_FOUND404GET /clips/{videoId}/submissions/{submissionId}POST /personas/{id}/videos/{videoId}/feedbackGET /personas/{id}/videos/{videoId}
WORKSPACE_NOT_FOUND404GET /workspace
STORAGE_LIMIT_EXCEEDED406POST /transcriptions/uploadPOST /personas/sources/uploadPOST /generations/images
CARD_LOCKED409POST /personas/{id}/regeneratePOST /personas/{id}/versions/{versionId}/restore
CARD_NOT_READY409POST /personas/{id}/save
DUPLICATE_POST409POST /posts
MEDIA_REFUNDED409POST /postsPATCH /posts/{id}
PRICE_CHANGED409POST /personas/{id}/videosPOST /personas/{id}/shotsPOST /generations
REFUND_AFTER_DOWNLOAD409POST /generations/{id}/refund
REFUND_AFTER_POST409POST /generations/{id}/refund
REFUND_ALREADY_REQUESTED409POST /generations/{id}/refund
REFUND_NOT_ALLOWED409POST /generations/{id}/refund
RENDER_ALREADY_IN_PROGRESS409POST /clips/{videoId}/submissions/{submissionId}/clips/{clipId}/renderPOST /monitors/{id}/broadcasts/{broadcastId}/clips/{clipId}/renderPOST /renders
SUBMISSION_NOT_FAILED409POST /clips/{videoId}/submissions/{submissionId}/retry
TRANSCRIPTION_NOT_READY409GET /transcriptions/{transcriptionId}/transcriptGET /transcriptions/{transcriptionId}/download
VIDEO_ALREADY_PROCESSING409POST /clipsPOST /clips/{videoId}/submissions/{submissionId}/retry
VIDEO_IN_PROGRESS409POST /personas/{id}/videos
JOB_EXPIRED410GET /renders/bulk-download/{jobId}
RECORDING_EXPIRED410GET /monitors/{id}/broadcasts/{broadcastId}/clipsPOST /monitors/{id}/broadcasts/{broadcastId}/clips/{clipId}/renderPOST /posts
RENDER_FILE_EXPIRED410GET /renders/{renderId}/download
SUBMISSION_EXPIRED410GET /clips/{videoId}/submissions/{submissionId}GET /clips/{videoId}/submissions/{submissionId}/clips
AUDIO_ONLY422POST /clips/info
CHANNEL_URL422POST /clips/info
INVALID_DIMENSIONS422POST /clips/info
INVALID_DURATION422POST /clips/info
INVALID_URL422POST /clips/info
LIVE_STREAM422POST /clips/info
MEDIA_UNREADABLE422POST /transcriptionsPOST /personas/sources/upload/complete
PLAYLIST_URL422POST /clips/info
PREMIUM_ONLY422POST /clips/info
PRODUCT_NOT_READABLE422POST /personas/{id}/shots/product
SHORTS_NOT_SUPPORTED422POST /clips/info
BATCH_ALREADY_RUNNING429POST /clips/{videoId}/submissions/{submissionId}/apply_templatePOST /monitors/{id}/broadcasts/{broadcastId}/clips/apply_template
PRODUCT_RATE_LIMITED429POST /personas/{id}/shots/product
RATE_LIMIT_EXCEEDED429POST /clips/infoPOST /monitors
TOO_MANY_PENDING_CLIPS429POST /clipsPOST /clips/{videoId}/submissions/{submissionId}/retry
TOO_MANY_RUNNING429POST /generations
CANCEL_FAILED500DELETE /renders/{renderId}
CREDIT_CHARGE_ERROR500POST /clipsPOST /clips/{videoId}/submissions/{submissionId}/retry
FAILED_TO_GET_VIDEO500POST /clips/info
INTERNAL_ERROR500POST /videos/upload/completePOST /personas/sources/upload/complete
INTERNAL_SERVER_ERROR500any route
PRESIGN_FAILED500POST /videos/uploadPOST /transcriptions/uploadPOST /personas/sources/upload
PROCESSING_ERROR500POST /clipsPOST /clips/{videoId}/submissions/{submissionId}/retry
RENDER_FAILED500POST /clips/{videoId}/submissions/{submissionId}/clips/{clipId}/renderPOST /monitors/{id}/broadcasts/{broadcastId}/clips/{clipId}/renderPOST /renders
RENDER_SETUP_FAILED500POST /clips/{videoId}/submissions/{submissionId}/clips/{clipId}/render
SIGNED_URL_FAILED500GET /renders/{renderId}/download
UNKNOWN_ERROR500POST /clips/infoPOST /posts
AI_UNAVAILABLE502POST /generations/improve
MEDIA_UNAVAILABLE502GET /personas/catalogPOST /personas/presets/{presetId}GET /personas/swap/quotePOST /personas/{id}/videosPOST /personas/{id}/shotsPOST /generations
SERVICE_UNAVAILABLE503POST /clips/info

On this page