How to access Grafana hosted-Prometheus API directly?

I am trying to use hosted prometheus to fetch metrics using API directly.
https://prometheus-prod-26-prod-ap-south-0.grafana.net/api/v1/query?query=up

I am receiving - 404 page not found

Following the official prometheus documentation - HTTP API | Prometheus

i am looking for the same

Hey @jamsheedbp and @kotharisaurabh11 the correct endpoint for you would be :

https://prometheus-prod-26-prod-ap-south-0.grafana.net/api/prom/api/v1/query

Its basically : your-hosted-metrics-url/api/v1/query

Note that you need to create API token and use basic auth to access the API for fetching metrics.

Please follow this doc for example : Analyze metrics usage with the Prometheus API | Grafana Cloud documentation