How to Solve NameError: name 'API' is not defined -- pexels_api

Solution: Import the 'API' module

To Solve the error, add the following line to the top of your code.

from pexels_api import API

 

For more information:
Python pexels_api API