> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enso.build/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> Obtain Enso API key to access the Enso API.

export const date_0 = "2026-07-08"

## Obtain API Key

1. Create an API key in the [Enso Developer Portal](https://developers.enso.build).
2. Store it in an environment variable. Never commit the key to source control.

## Authenticate requests

Pass your API key using either:

* The `Authorization: Bearer <API_KEY>` header.
* The `apikey=<API_KEY>` query parameter.

## Test your API key

Use the authenticated account endpoint to verify the key without building a transaction:

<Tabs>
  <Tab title="Authorization header">
    ```bash theme={null}
    curl \
      -H "Authorization: Bearer $ENSO_API_KEY" \
      "https://api.enso.build/api/v1/account/accountId"
    ```
  </Tab>

  <Tab title="Query parameter">
    ```bash theme={null}
    curl \
      "https://api.enso.build/api/v1/account/accountId?apikey=$ENSO_API_KEY"
    ```
  </Tab>
</Tabs>

Next, choose between the [Route API and Bundle API](/pages/build/get-started/overview#route-api-vs-bundle-api).

## Rate Limiting

API calls are limited to 10 RPS (600 requests per minute). It can be increased on demand.
If you exceed the limit, you'll receive a `429 Too Many Requests` error.
If your monthly API credits quota is exceeded, requests also return `429 Too Many Requests`.

Rate limit and quota errors include a `portalUrl` field that points to the Developer Portal for key management and plan upgrades.

## Auth Errors

Invalid API keys return `401 Unauthorized` with `error: "invalid_api_key"`. Retired legacy keys return `401 Unauthorized` with `error: "legacy_key_retired"`. Both responses include a `portalUrl` field so clients can direct users to create or recover an API key in the Developer Portal.

<div className="text-right text-xs gray-200 font-semibold w-full" style={{marginTop: '0'}}>
  <p style={{
        color: "#b2b2b2"  
    }}>Updated {date_0}</p>
</div>
