Authentication

API Authentication Guide

To ensure secure access, all API endpoints mandate authentication. This process involves providing credentials that verify your identity and allow you to interact with the services.

Authentication Method

Our APIs utilize an API Token for authentication purposes. This token must be included in every request you send to an API endpoint to verify that you have the necessary permissions.

How to Authenticate

To authenticate your requests, the API Token should be placed in the Authorization header of your HTTP request. The token must be prefixed with the word Bearer, separated by a space. This format is known as Bearer Authentication.

Authorization: Bearer LUW_API_TOKEN

Replace LUW_API_TOKEN with the actual token provided to you upon registration or via authentication processes.

Importance of Secure Authentication

Using an API Token ensures that your interactions with the API are both authenticated and securely encrypted. Bearer Authentication is widely used for its ability to maintain session security without transmitting sensitive credentials.

By following these guidelines, you can securely authenticate and use our API endpoints effectively. If you encounter any issues, please refer to our detailed API documentation or reach out to support for assistance.

⚠️ How to get API token?

Click here or visit https://app.luw.ai/dashboard/api to obtain your LUW_API_TOKEN parameter.

Example usage of Bearer Token

curl -H "Authorization: Bearer LUW_API_TOKEN"

Response Example

{
  "status": true,
  "materials": [
    {
      "id": 1,
      "prompt_type": "Material",
      "title": "Marble",
      "extra": "White marble with grey veins",
      "image": "https://cdn.luw.ai/materials/marble.jpg"
    }
  ]
}

Last updated