# Using your API key

The preferred method to authenticate with your API key is through the use of an apikey submitted as part of the HTTP header for the request.&#x20;

Examples for authentication are provided through some simple CURL requests using the Resource Information Network Services

{% tabs %}
{% tab title="HTTP Header" %}
{% code overflow="wrap" %}

```sh
curl -i --verbose --location 'https://api.scicrunch.io/elastic/v1/_cat/aliases' --header 'apikey: <<YOUR API KEY>>'
```

{% endcode %}
{% endtab %}

{% tab title="URL Query Paramter" %}
{% code overflow="wrap" %}

```sh
curl -i --verbose --location 'https://api.scicrunch.io/elastic/v1/_cat/aliases?key=<<YOUR API KEY>>'
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}

## Best Practice

Use the apikey HTTP header for authentication
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.scicrunch.io/api-service-gateway-overview/using-your-api-key.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
