I have 2 projects which use the same API modules, which i have written myself. These API modules encapsulate existing imported functions from pypi libraries.
If I have to write unit tests for my API - should the unit tests modules be present in every project which uses my API or should there be a separate project for API testing?
The API is one for all so logically I would open a separate project for API testing, but what if the projects get passed around between people who don't own the API testing project? Then if the implementation of the inner imported functions in the API changes unit testing will be needed.
I suppose the question regards API of any language but my projects are specifically in Python.
I would recommend to consider the code and its unit-test as belonging to the same component.  They should, for example, reside in the same repository of your version control system.  For example, if the code evolves, most likely the unit-tests also need to be adjusted accordingly.  Therefore, there is no much value in treating them as different components.
Taking up the example from your two projects and the API they both use: The API together with its tests forms a component.  Thus, the API is developed conceptually independently from the projects.  For example, if during the work on your project P1 you detect a bug in the API, then you fix the API component directly in its repository (possibly by first extending the API's unit-test suite to also capture that bug), make a new release of the API component, and then use that new release within P1, but probably also update P2 to use the new release.
You can, however, consider providing your API component in a package to the clients (your projects P1 and P2) that does not contain the unit-tests, if you prefer.  The development on the API would in any case not take place from within P1 or from within P2, but directly in the API's repository.
To summarize: Do not separate the code and its tests into separate modules.  Instead, put the code and its tests into one repository, but separate from the clients.
Python unit testing a self-written API module - better in separate project?