Getting Started

You can access the Decagon API at https://api.decagon.ai.

Authentication

Authenticating to the API is done using an API key that is passed in an Authentication header. All requests to an API endpoint, must contain the following header:

Authorization: Bearer <API_KEY>

For instance, if you were making a request to the health endpoint in Python, your code would look like this:

import requests

API_KEY = "your_api_key"
ENDPOINT = "https://api.decagon.ai/health"
HEADERS = {
    "Authorization": f"Bearer {API_KEY}"
}

response = requests.get(ENDPOINT, headers=HEADERS)
print(response.json())

Rate Limits

Since Decagon APIs are not used for user-facing requests (like generating message), there is a limit of 1 request per second across all API endpoints.

Gross violation of the rate limit will lead to automatic banning of your IP address.

Last updated