API errors

Every error code the GhostShorts API returns

Back to the GhostShorts API reference.

Errors are RFC 9457 problem JSON (application/problem+json): { type, title, status, detail, code }, plus an errors array on INVALID_INPUT and upsell + plansUrl on every 402. Branch on code.

CodeHTTPWhat it means
MISSING_API_KEY401No Authorization: Bearer header was sent.
INVALID_API_KEY401The key is unknown or has been revoked. Create a new one in Settings.
UNSUPPORTED_TOKEN401The bearer token is not a GhostShorts API key (gs_live_...).
UNAUTHENTICATED401The request reached an endpoint without an authenticated account. Send your API key.
SUBSCRIPTION_REQUIRED402This step needs an active plan. The response carries plansUrl.
INSUFFICIENT_CREDITS402Not enough credits for this step. Top up or wait for your plan to renew.
INSUFFICIENT_AI_CREDITS402Not enough AI credits for this step.
VIDEO_ALLOWANCE_EXHAUSTED402This month's video allowance is used up.
CLIPPING_ALLOWANCE_EXHAUSTED402This month's clipping minutes are used up.
SOFT_CAP_REACHED402A fair-use limit for this period was reached.
INVALID_INPUT400The body does not match the schema. The errors array names each field. Also sent as 413 for a body over 2 MB.
INVALID_VOICE400That voice id is not available for this template. See GET /v1/options voices.
UNKNOWN_TEMPLATE400No template with that id. See GET /v1/templates.
TEMPLATE_NOT_AVAILABLE400The template has no such step through the API (for example POST /v1/scripts for reddit_story). The detail says what to call instead.
NARRATION_REQUIRED400The video cannot be rendered without narration.
INVALID_WEBHOOK_URL400webhookUrl must be a public https URL.
SAFETY_REJECTED400The content was refused by our safety checks. Change the topic or text.
INVALID_IDEMPOTENCY_KEY400The Idempotency-Key header is empty or longer than 255 characters.
NOT_FOUND404No such endpoint, or no such video, project or download link on this account.
IDEMPOTENCY_IN_PROGRESS409A request with this Idempotency-Key is still running. Retry after Retry-After.
CANNOT_CANCEL409Only a queued video can be cancelled.
IDEMPOTENCY_KEY_REUSED422This Idempotency-Key was already used with a different body. Use a new key for a new request.
RATE_LIMITED429Too many requests. Wait for Retry-After seconds.
CONCURRENCY_LIMIT429Three videos are already in progress on this account. Retry after one finishes.
INTERNAL_ERROR500Something failed on our side. Retry; the same Idempotency-Key is safe to reuse.
RATE_LIMITER_UNAVAILABLE503Rate limiting is briefly unavailable, so the request was refused. Retry shortly.
SERVICE_UNAVAILABLE503The video queue is briefly unavailable. Nothing was charged; retry shortly.

Video failure codes

When a video ends as failed or cancelled, error.code on the video (and in the video.failed webhook) is one of these. error.message always says what happened.

CodeWhat it means
MEDIA_FETCH_FAILEDYour background or music URL could not be downloaded: not public https, not reachable, refused, or larger than 300 MB (video) / 30 MB (audio).
MEDIA_INVALIDThe file at your URL is not a usable video or audio file.
MEDIA_TOO_LONGThe file at your URL is longer than 10 minutes.
MEDIA_QUOTA_EXCEEDEDMore than 20 new media URLs today. Reuse a URL (free for 30 days) or wait.
BACKGROUND_UNAVAILABLEThe background video or category you picked has no usable footage. Pick one from GET /v1/options.
MUSIC_UNAVAILABLEThe music id is not in the library. Pick one from GET /v1/options music.
IMAGE_UNAVAILABLEAn avatar or photo id is not an image you can use.
SCRIPT_FAILEDThe script could not be written.
PACK_FAILEDThe quiz questions could not be written.
INGEST_FAILEDThe article at your URL could not be read. Paste the text instead.
SOURCE_TOO_SHORTThe article is too short to make a script from.
NARRATION_FAILEDThe narration could not be recorded.
VOICE_TTS_FAILEDThe voice provider failed while recording.
RENDER_FAILEDThe render failed. Create the video again.
INTERRUPTEDProcessing was interrupted. Create the video again; contact support if narration was charged.
CANCELLEDYou cancelled the video while it was queued.