Welcome to the SwitchLight API documentation.

SwitchLight API allows you to easily extract materials of state-of-the-art quality, such as normals, albedo, roughness and specular maps, from images up to a 2k resolution. It also provides a feature to remove backgrounds from images. You can utilize the material maps in 3D rendering tools like Blender, Unreal, and Three.js, leveraging the Physical Based Model for realistic rendering. Check out our three.js example in here!

API Key Acquisition

To start using the SwitchLight API, you will need an API key. Follow the steps outlined below:

  1. Sign Up: If you haven't yet registered, please sign up (opens in a new tab) to get started.
  2. Get your API Key: After Sign Up, please check your API key on the account page (opens in a new tab).

Your first API Call

For those who are not familiar with using API, we recommend using Postman (opens in a new tab)

curl --request POST \
  --url \
  --header 'x-api-key: YOUR_API_KEY' \
  --form source_image=@original.jpg \
  -o # Remove if the zip is broken; error will show.
Examples of input and output
Original Image
Result Image


Result Image


Result Image


Result Image


Result Image


Output: PBR Materials (.zip)

For more details, please visit each API documentation (opens in a new tab)

Credit & Usage

To use our API, you require credits. The API allows for the extraction of various materials from images, including surface normals, albedo, roughness and specular maps. It also offers relighting, HDRI extraction from an portrait image, and background removal. The pricing for each API call is provided below.

APICredits / Call[Preview] Credits / Call

The preview option provides an output of 512x512 resolution or lower, which uses fewer GPU resources. As a result, it can be offered at a comparatively lower cost and with higher speed. Use it for previewing what the final output might look like before it's generated.

To welcome you onboard, we provide 10 Free API credits upon sign up.

If you need more credits or wish to change your subscription, please visit this page (opens in a new tab).

Credit balance

You can find out your credit balance on the account page (opens in a new tab).

Troubleshooting & Support

If you encounter any issues or need further assistance, do not hesitate to contact us: