Skip to main content

Errors

All errors return a consistent JSON body with an error code and a human-readable message.

Error format

{
  "error": "error_code",
  "message": "Human-readable description of what went wrong"
}

Error codes

HTTP StatusError CodeDescription
400validation_errorThe request body or parameters are invalid
400pricing_errorNo pricing available for the model configuration
401unauthorizedThe API key is missing, invalid, or expired
402insufficient_creditsNot enough credits for the requested generation
403forbiddenThe API key does not have the required scope
404not_foundThe requested resource does not exist
422invalid_templateThe template has an invalid or incomplete configuration
500server_errorAn unexpected error occurred on the server
500generation_errorAn unexpected error occurred during generation

Common scenarios

Missing API key

curl https://prismvideos.com/api/templates
# 401: { "error": "unauthorized", "message": "Invalid or missing API key" }

Revoked API key

A revoked key returns the same 401 response as an invalid key. Create a new key if yours has been revoked.

Template not found

curl https://prismvideos.com/api/templates/nonexistent_id \
  -H "Authorization: Bearer prism_sk_your_key_here"
# 404: { "error": "not_found", "message": "Template not found" }