# Requesting and Using API Key

## How to request API key

If you'd like an API key, open a support ticket on our [Discord](https://discord.com/invite/flytrade) in order to request one. In your request, please include detailed information about your project and/or how you intend to utilize our APIs.

## How to use API key

Include the `apikey` header alongside the request. To verify that the API key is working, check if the response contains `x-auth-status: authenticated` header.

```
$ curl -I -H 'apikey: <APIKEY>' https://api.magpiefi.xyz/ | grep -i 'x-auth-status'
```

### Endpoint Guidelines

* Public Access Endpoint: <https://api.fly.trade>
  * This endpoint is intended for general public use and does not require API key authentication.
* Authenticated Access Endpoint: <https://api.magpiefi.xyz>
  * You must use this endpoint with your API key included as described above.


---

# 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.fly.trade/developers/api-reference/requesting-and-using-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.
