Skip to main content

VIUCraft Documentation

Authentication

On This Page

All API requests to VIUCraft must be authenticated using an API key.

API Key Header

Include your API key in the X-API-Key header:

cURL
curl -H "X-API-Key: your-api-key" \
  https://api.viucraft.com/images

Obtaining an API Key

  1. Log in to your VIUCraft dashboard
  2. Navigate to Dashboard > API Keys
  3. Click Generate New API Key
  4. Give your key a descriptive name
  5. Copy the key immediately (it will not be shown again)

API Key Best Practices

Use Environment Variables

Never hardcode API keys in your source code:

cURL
# .env file
VIUCRAFT_API_KEY=your-api-key
JavaScript
// Node.js
const apiKey = process.env.VIUCRAFT_API_KEY;

Separate Keys for Environments

Create different keys for:

    1. Development
    2. Staging
    3. Production

Key Rotation

Rotate your API keys periodically:

  1. Generate a new key
  2. Update your applications
  3. Revoke the old key

Authentication Errors

Status CodeErrorDescription
401Missing API KeyNo X-API-Key header provided
401Invalid API KeyThe API key is not valid
403Revoked API KeyThe API key has been revoked
429Rate LimitedToo many requests

Rate Limiting

Rate limits depend on your plan:

PlanRequests/minuteRequests/day
Free601,000
Basic30050,000
Professional1,000500,000

| Enterprise | Unlimited | Unlimited |

Was this helpful?

On This Page