- Get your API key
- Regenerate your Personal API Key
- Track usage by API key
- Get credit alerts
- Set your API key when using a library
- Set your API key when calling the API directly
Get Your API Key
If using Agentic Document Extraction in the EU, get your API key here.
- Log in to https://ade.landing.ai/.
- On the home page, click API in the Playground | API switcher under the page title.

- Click Copy next to your API key. The card shows the API key you created most recently. If the card says No API key yet, click Create API Key to create one. If you use a personal account (Explore plan), click Check All API Keys and copy the key on the API Key page.


Regenerate Your Personal API Key
If your Personal API Key is exposed or leaked, regenerate it. Regenerating creates a new key and invalidates the current one, and it can’t be undone. Update every place that uses the old key, such as theVISION_AGENT_API_KEY environment variable.
To regenerate your Personal API Key:
- Log in to https://ade.landing.ai/.
- Go to the API Key page (to navigate there manually, click API Keys under Admin in the left sidebar).
- In the Personal API Key row, click the Regenerate Personal API Key icon (the circular arrow next to the Copy icon).

- Click Regenerate to confirm.

- Click the Copy icon to copy the new key.
Track Usage by API Key
In an organization account, the Usage page shows how many credits each API key uses. For everything on the Usage page, see Monitor Credit Usage. To track usage by API key:- Log in to https://ade.landing.ai/.
- Click Usage under Admin in the left sidebar.
- In Group by, select API key. The chart splits each day’s credits by API key.

- To see the usage of one API key, select it in the API key filter. The credit and request totals update to that key.
Get Credit Alerts
Credit alerts email the people you choose when your organization’s credit usage crosses a threshold. Alerts are available on the Team and Enterprise plans. Only Admins can create, edit, and delete alerts. To create a credit alert:- On the Usage page, scroll to Alert and click Create Alert.

- In Alert threshold, enter a number and select the unit: Credits, USD, or % of quota.
- In Recipients, add up to 20 members to email.
- (Optional) Enter a label.
- Click Create alert.

Set Your API Key When Using a Library
The Python and TypeScript libraries read your API key from theVISION_AGENT_API_KEY environment variable. For installation and other ways to set the key, see the Python or TypeScript library page. Set the key before running your code:
Set Your API Key When Calling the API Directly
Include the API key in request headers. To see code samples, go to API.Security Best Practices
- Do not hard-code the API key in your source code, because others could see and use your API key. Passing a variable that holds the key (for example, from a secrets manager) is fine.
Troubleshoot API Key Issues
Use the troubleshooting tips in this section to resolve issues related to API keys.Error: Missing API Key
If no API key is set by any method, the library raises an error when you create the client. The Python library raises this error:.env file or as an environment variable and still get this error, see the .env File Issues and Environment Variable Issues sections.
.env File Issues
If you set the API key in the.env file but the environment variable is not loading, try these possible solutions to resolve this issue:
- Check file location: The
.envfile should be in the same directory where you run your script. - Verify file format: No spaces around the equals sign:
Environment Variable Issues
If you set the API key as an environment variable and are encountering issues, try these possible solutions to resolve this issue:- Restart your application after setting environment variables.
-
Check variable name: Must be exactly
VISION_AGENT_API_KEY. -
Check if the environment variable is correct:
-
Ensure that you apply the changes after setting, changing, or removing the environment variable:
- Linux/macOS: Restart your terminal. If you added the variable to your
.zshrcfile, runsource ~/.zshrc. - Windows: Close and reopen Command Prompt/PowerShell, or restart your IDE.
- Linux/macOS: Restart your terminal. If you added the variable to your
Error: Missing Authorization Header
This error occurs if the authorization header is not included when calling the API directly. To fix this, include the API header:Error: User Not Found, Please Check Your API Key
This error occurs when the API key is entered incorrectly. To resolve this issue:- Verify the API key: Copy your key directly from the dashboard.
- Restart your environment: Close and reopen your terminal, IDE, or Jupyter notebook.