---
title: "API Interface Configuration"
description: "Configure and manage your agent's API interface for programmatic access"
---

The API interface provides programmatic access to your agent through REST API calls. This interface is automatically available for every agent and provides comprehensive connection information including GUID, API URLs, and code examples.

<Note>
For an overview of managing all interface types, see [Managing Agent Interfaces](/building-and-deploying-agents/interface-options/managing-interfaces).
</Note>

<Steps>
  <Step title="Access the Interfaces Panel" stepNumber={1}>
    Access the interfaces panel by either:
    - Clicking the **ellipsis (…)** menu to the right of your Agent and selecting **Interfaces**
    - Opening the Agent in Studio and clicking **Settings > Interfaces**
  </Step>
  <Step title="Access API Interface Details" stepNumber={2}>
    In the interfaces panel, click **View API Info** next to the API interface. You will see a window detailing the Agent's unique identifiers and providing example Agent Execution API calls.
  </Step>
  <Step title="Choose Your Code Example Format" stepNumber={3}>
    Airia provides example API calls in multiple formats including cURL and Python. Select your preferred format using the dropdown menu to get language-specific implementation examples.
  </Step>
  <Step title="Configure Your Integration" stepNumber={4}>
    Use the provided GUID, API URL, and code examples to configure the API interface within your application or system integration.
  </Step>
  <Step title="Manage API Keys" stepNumber={5}>
    API keys are required for authentication. You can manage them directly from the API interface:

    Click **View API Keys** from the API interface details
    Select **New API Key** to create a new key
    Enter the API Key Name
    Define the Scope of this key to the appropriate project
    Click **Create** to generate your API Key
  </Step>
  <Step title="Test Your API Interface" stepNumber={6}>
    Test your API interface configuration using your chosen development tool or application. Use the provided code examples as a starting point to verify the agent responds correctly to API calls.
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
<Accordion title="How do I ensure my API interface uses the correct agent version?">
All interfaces execute against the **Active version** of your agent. Before configuring your API interface:

1. Navigate to the Agent you want to configure API access for
2. Verify the Agent is showing the correct **Active Version** from your recent testing
3. If an update is required:
   - Go into the Agent
   - Select the version number in the top left
   - Click **Set Active**
   - Return to the list of Agents

This ensures that your API interface will use the most current version of your agent.
</Accordion>

<Accordion title="Why are my API calls failing with authentication errors?">
API authentication issues are commonly caused by:

- **Missing API Key**: Ensure you have generated an API key and included it in your requests
- **Incorrect Scope**: Verify your API key has the correct project scope permissions
- **Expired API Key**: Check if your API key needs to be regenerated
- **Wrong Headers**: Ensure you're using the correct authentication headers as shown in the code examples

Use the **View API Keys** function to manage and verify your API key configuration.
</Accordion>

<Accordion title="How do I test my API integration?">
To verify your API interface is working correctly:

1. Use the provided code examples as a starting point
2. Test with a simple request first to verify connectivity
3. Check the response format matches your expectations
4. Verify the agent processes requests as expected
5. Monitor the request/response in your development tools

If issues persist, verify your agent has an Active version and the API interface is properly configured.
</Accordion>
</AccordionGroup>