Hello,
Maybe you can set an acl for this path to use a specific backend with specific timeout.
Something like (not tested) :
frontent web
bind *:80
acl api path_beg /api-test
use_backend api_be if be
default_backend web
backend web
timeout server 5m
server myserver 127.0.0.1:80
backend api_be
timeout server 3s
server myapiserver 127.0.0.1:80