API keys

For developers who need API requests beyond the standard rate limits.

Developers have open access to Hiro's APIs without the use of an API key, but are subject to Hiro's rate limit policy. For developers who need access beyond these rate limits, we provide API keys.

Where can I get an API key?

If you're interested in obtaining an API key, you can generate one for free in the Hiro Platform.

Usage with cURL

The API key is passed in the header of your HTTP API request with x-api-key.

Terminal
curl https://api.hiro.so/... -H 'x-api-key: <your-api-key>'

Usage with Node

This snippet shows how to perform a fetch request with your API key by including it in the request headers.

fetch.ts
async function makeApiRequest(apiKey: string) {
  const url = `https://api.hiro.so/<your-api-endpoint>`;
  const response = await fetch(url, {
    headers: {
      "x-api-key": apiKey 
    }
  });
  return response.json();
}
Caution

The API key is passed in the header of your HTTP API request and is used only for private use, like in server-side applications.

If you use the API key in your client-side application, attackers can capture it using the client tools (E.g., browser console) and abuse your API key.