Skip to main content
All API requests to FAPIHub require authentication. You must include your personal API key in every request using the ApiKey header.

How to Authenticate

Include the ApiKey header with your API token in all requests:
ApiKey: your_api_token_here
Example using cURL:
curl -X POST "https://fapihub.com/v2/rembg/" \
  -H "ApiKey: your_api_token_here" \
  -F "image=@photo.jpg"

Obtaining Your API Key

  1. Go to fapihub.com and sign up / log in to your account.
  2. Navigate to the Dashboard.
  3. Copy your API key from the dashboard section.
Keep your API key secure. Never share it publicly or commit it to version control (e.g., GitHub). If you suspect your key has been compromised, regenerate it immediately from the dashboard.

Authentication Rules

  • The ApiKey header is required for all endpoints.
  • API keys are tied to your account and plan limits.
  • Using an invalid, expired, or missing API key will result in a 401 Unauthorized error.
Error Example:
{
  "error": {
    "code": "unauthorized",
    "message": "Invalid or missing ApiKey header"
  }
}

Best Practices

  • Store your API key securely using environment variables or a secret manager.
  • Rotate your API key periodically for better security.
  • Use different keys for development, staging, and production environments if possible.