Articles on: API Reference

API Error Handling

API Error Handling


Common API errors and how to resolve them.


HTTP Status Codes


Code

Meaning

Action

200

Success

Request completed

400

Bad Request

Check your payload

401

Unauthorized

Check API key

403

Forbidden

Check quota/permissions

404

Not Found

Check template/render ID

429

Too Many Requests

Slow down, retry later

500

Server Error

Retry or contact support


Common Errors


"Not authorized"

{ "error": "Not authorized" }

Fix: Check your Authorization header format:

Authorization: Bearer YOUR_API_KEY


"API key not valid"

{ "error": "API key not valid. Please check your Authorization header." }

Fix: Verify your API key at API Integration


"API quota exceeded"

{ "error": "API quota exceeded. Upgrade your plan to generate more renders." }

Fix: Upgrade your plan or wait for monthly reset


"No template specified"

{ "error": "No template specified." }

Fix: Include template in your request body


"Template not found"

{ "error": "Template not found" }

Fix: Verify the template ID exists and belongs to your account


"Your account is blocked"

{ "error": "Your account is blocked. Please contact support." }

Fix: Contact support@templated.io


Best Practices


  1. Always check status codes before parsing response
  2. Implement retry logic for 429 and 500 errors
  3. Log errors for debugging
  4. Validate inputs before making requests


Example Error Handling


const response = await fetch('/v1/render', { ... });

if (!response.ok) {
const error = await response.json();
console.error(`Error ${response.status}: ${error.error}`);
// Handle specific errors...
}

Updated on: 11/01/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!