403 Forbidden when trying to access api of a public space

Hi,
I am having trouble accessing this space: Face Swap - a Hugging Face Space by tonyassi through api. Trying to access through js client and also curl, however, both gives 403 forbidden error.

Has anyone encountered this too?
How to solve this?

Have you checked the CORS configuration to ensure that the origin from which you are making the request is allowed? On the server, the CORS settings should include the domain from which you are accessing the API. For example, if you are using FastAPI, add the CORS middleware like this:

from fastapi.middleware.cors import CORSMiddleware

app.add_middleware(
    CORSMiddleware,
    allow_origins=["https://your-domain.com"], 
    allow_credentials=True,
    allow_methods=["*"],
    allow_headers=["*"],
)

I was trying to use fetch from my client side code.
And the space is a public one and I don’t have the code for that…

Although trying the request from postman gives correct response.
Same request from localhost gives 403 forbidden