The root part of your Nginx config must point to the Laravel public directory. so based on your docker-comose volumes:
root /var/www/html/api/public; try_files $uri index.php$args;