Authentication

Learn how to authenticate your API requests using API keys.

API Keys

API keys are used to authenticate all requests to the Quick Home AI API. Each API key is associated with your account and your usage/credits.

Security Warning: Keep your API keys secure. Do not share them in publicly accessible areas such as GitHub, client-side code, or anywhere else that could expose them.

Generating API Keys

To generate an API key:

  1. 1. Log in to your Quick Home AI account
  2. 2. Navigate to Dashboard → API Keys
  3. 3. Click "Create New API Key"
  4. 4. Give your key a descriptive name (e.g., "Production Server", "Development")
  5. 5. Copy the key immediately - it will only be shown once

Important: Save your API key in a secure location immediately after creation. You won't be able to view it again.

Using API Keys

Include your API key in the Authorization header of every request using the Bearer authentication scheme:

const formData = new FormData();
formData.append('address', '266 Dana Point Ave, Ventura, CA 93004, USA');
formData.append('serviceType', 'exterior');
formData.append('exteriorEnhancements', JSON.stringify([
  'sky_enhancement',
  'grass_enhancement'
]));

const response = await fetch('https://www.quickhome.ai/api/v1/orders', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer qh_live_xxxxxxxxxxxxx',
  },
  body: formData,
});

const data = await response.json();
console.log(data);

Managing API Keys

Revoking Keys

If an API key is compromised or no longer needed, you can revoke it from your dashboard. Revoked keys will immediately stop working and cannot be re-enabled.

Best Practices

  • • Use different API keys for different environments (production, staging, development)
  • • Rotate your API keys periodically
  • • Never commit API keys to version control
  • • Use environment variables to store API keys
  • • Revoke keys immediately if they're exposed

Authentication Errors

Common authentication errors and their meanings:

401 Unauthorized

Missing or invalid API key. Check that your Authorization header is correct.

{ "error": "Invalid API key" }

403 Forbidden

API key is valid but doesn't have permission to access the resource.

{ "error": "Forbidden" }

401 API key has been revoked

The API key has been revoked. Generate a new key from your dashboard.

{ "error": "API key has been revoked" }

Rate Limits

Rate limits are enforced per API key. Current limits:

  • Free tier: 10 requests per minute
  • Premium: 60 requests per minute
  • Pro: 120 requests per minute

If you need higher limits, please contact our sales team.

Quick Home AI | Professional Property Photos