Hardcode $timeRange syntax `from` and `to`

Hello everyone.

I am currently building an automatic bot to report Grafana results by API by hitting the /api/v1/query endpoint by specific schedule.

I have this query:
sort_desc(sum(increase(total_x{job="job_x"}[$timeRange]))by(title))

I know I can change the $timeRange by putting static values like 1h, 6h, 12h and so on.

But how do I put the Today so far or Today or same day value?

If not possible, I can just use generate timestamp and put it into $__from and $__to but I don’t know the syntax.

Thanks!

perhaps of help: