Return website host url instead of api url in nginx

I have a Nginx server with reverse proxy for my API. How can I return the website host URL instead of returning the API URL, because when I make a request from website it returns the API URL not the website URL

        location /api/1 {
                proxy_set_header X-Real-IP  $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto https;
                proxy_set_header X-Forwarded-Port 443;
                proxy_set_header Connection 'updgrade';
                proxy_set_header Host $host;
                proxy_ssl_server_name on;