Skip to main content
Calling the Agentic Document Extraction API requires an API key.

Get Your API Key

If using Agentic Document Extraction in the EU, get your API key here.
Copy your API key from the API view on the home page:
  1. Log in to https://ade.landing.ai/.
  2. On the home page, click API in the Playground | API switcher under the page title. ADE home page with API selected in the Playground and API switcher under the title
  3. 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. API view on the home page with the Copy button next to the API key highlighted
To see every API key in your organization, go to the API Key page: click Check All API Keys in the API view, or click API Keys under Admin in the left sidebar. You can copy only the API keys you created. Left sidebar with API Keys under Admin highlighted

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 the VISION_AGENT_API_KEY environment variable. To regenerate your Personal API Key:
  1. Log in to https://ade.landing.ai/.
  2. Go to the API Key page (to navigate there manually, click API Keys under Admin in the left sidebar).
  3. In the Personal API Key row, click the Regenerate Personal API Key icon (the circular arrow next to the Copy icon). Personal API Key row with the Regenerate Personal API Key icon highlighted
  4. Click Regenerate to confirm. Regenerate Personal API Key confirmation with the Regenerate button highlighted
  5. 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:
  1. Log in to https://ade.landing.ai/.
  2. Click Usage under Admin in the left sidebar.
  3. In Group by, select API key. The chart splits each day’s credits by API key. Usage page with Group by set to API key, showing daily credits split by key
  4. 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:
  1. On the Usage page, scroll to Alert and click Create Alert. Usage page scrolled to the Alert section with the Create Alert button highlighted
  2. In Alert threshold, enter a number and select the unit: Credits, USD, or % of quota.
  3. In Recipients, add up to 20 members to email.
  4. (Optional) Enter a label.
  5. Click Create alert. Create Alert pop-up on the Usage page with the Alert threshold set to 75% of quota
Alerts are checked hourly and sent once per billing period. For default alerts and alert statuses, see Credit Usage Alerts.

Set Your API Key When Using a Library

The Python and TypeScript libraries read your API key from the VISION_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:
The TypeScript library throws this error:
To resolve this issue, set the key using one of the supported methods. If you set the key in a .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 .env file 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 .zshrc file, run source ~/.zshrc.
    • Windows: Close and reopen Command Prompt/PowerShell, or restart your IDE.

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.