Keycloak with external login page

Hi, I wanna integrate the login page into my SPA. Is there any option to use external login pages and communicate with keycloak with some kind of API ? Or I am stuck with customizing page served by keycloak ?

Check how Resource Owner Password Credentials Grant works. Of course you will use single sign on feature with this OIDC flow.