PBR Materials
POST https://sdk.beeble.ai/v1/acquire/pbr-materials
Acquire all PBR materials including alpha, albedo, normal, roughness and specular maps from an image. Note that the SwitchLight API offers five materials but it charges two credits per call. It typically delivers the best performance when used with portrait images.
To acquire only the normal map, click here. For just the albedo map, click here.
Request
Authentication
Requests are authenticated with an API key. You need x-api-key
header of
your request.
Example: x-api-key: YOUR_API_KEY
Body
- source_image
- string($binary)
- The source image to acquire PBR materials.
- Please upload the file as a part of the form data. Supported formats include .jpg, .png, and .webp. Images up to 2048x2048 resolution are accepted; images with higher resolution will be downscaled accordingly.
- auto_key
- bool
- Indicates whether AI automatically remove the background.
- If
true
, the AI automatically remove the background. Iffalse
, the alpha channel in thesource_image
is used to remove the background. However, if thesource_image
does not have an alpha channel, the AI still automatically remove the background.Default:true
- preview
- bool
- Indicates whether a low-resolution preview output should be provided.
- If
true
, an output of 512x512 resolution or lower will be deliverd at a higher speed, and 1 credit will be charged. Iffalse
, an output with a high-resolution up to 2048x2048 will be delieverd, and 2 credit will be charged.Default:false
Response
Body
Example Usage
For those who are not familiar with using API, we recommend using Postman (opens in a new tab).
curl --request POST \
--url https://sdk.beeble.ai/v1/acquire/pbr-materials \
--header 'x-api-key: YOUR_API_KEY' \
--form source_image=@original.jpg \
--form auto_key=true \
--form preview=false \
-o result.zip
Examples of input and output

source_image

normal

albedo

roughness

specular

alpha
Result (.zip)
Support
Any question? Contact us at info@beeble.ai or join our Discord channel (opens in a new tab).