MakePhotos Docs
API Reference

Error Codes

Complete list of MakePhotos API error codes and their meanings.

Error Codes

All API errors return a consistent JSON format:

{
  "error": {
    "code": "error_code",
    "message": "Human-readable description",
    "details": {}
  }
}

Error code reference

CodeHTTP StatusDescription
missing_api_key401No API key provided
invalid_api_key401API key is invalid or revoked
no_active_subscription403No active subscription
insufficient_credits402Not enough credits
invalid_params400Missing or invalid parameters
generation_failed502AI generation failed (credits refunded)
internal_error500Unexpected server error

Error details

Some errors include a details object with additional context:

insufficient_credits

{
  "error": {
    "code": "insufficient_credits",
    "message": "Not enough credits. Need 4, have 2.",
    "details": {
      "monthly_remaining": 0,
      "topup_remaining": 2
    }
  }
}

generation_failed

{
  "error": {
    "code": "generation_failed",
    "message": "Generation timed out",
    "details": {
      "refunded": true
    }
  }
}

When refunded is true, credits that were deducted before the generation attempt have been returned to your account.

HTTP status codes

StatusMeaning
200Success
400Bad request (invalid parameters)
401Unauthorized (invalid or missing API key)
402Payment required (insufficient credits)
403Forbidden (no active subscription)
500Internal server error
502Bad gateway (generation failed)

On this page