Skip to main content

Overview

The Distylia API uses API key authentication. Each request must include your API key in the x-api-key header.

Getting Your API Key

  1. Log in to your dashboard
  2. Navigate to Settings > API Keys
  3. Click Create New API Key
  4. Copy and save your API key securely (it won’t be shown again)

Using Your API Key

Include the API key in the x-api-key header of every request:

Security Best Practices

Never share your API key or commit it to version control. Treat it like a password.
  • Store API keys in environment variables
  • Use different keys for development and production
  • Rotate keys regularly
  • Revoke compromised keys immediately

Managing API Keys

Create New Key

Generate additional API keys for different applications or environments.

Revoke Key

If a key is compromised or no longer needed:
  1. Go to Settings > API Keys
  2. Find the key in the list
  3. Click Revoke
Revoked keys are immediately invalidated and cannot be used.

Key Limits

  • Maximum 10 active API keys per account
  • Keys do not expire but can be manually revoked
  • Each key has the same permissions as your account

Example Usage in Code

JavaScript/Node.js

Python

PHP

Error Responses

Invalid API Key

Missing API Key

Rate Limits

API keys are subject to rate limits based on your account plan: Exceeding rate limits will result in 429 Too Many Requests responses.