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

# Custom API

> Make authenticated HTTP requests to any external API with CustomApiTools.

**CustomApiTools** enable an Agent to make HTTP requests to any external API with customizable authentication and parameters.

## Prerequisites

The following example requires the `requests` and `openai` libraries.

```shell theme={null}
uv pip install requests openai
```

## Example

The following agent will use CustomApiTools to make API calls to the Dog CEO API.

```python cookbook/91_tools/custom_api_tools.py theme={null}
from agno.agent import Agent
from agno.tools.api import CustomApiTools

agent = Agent(
    tools=[CustomApiTools(base_url="https://dog.ceo/api", enable_make_request=True)],
    markdown=True,
)

agent.print_response(
    'Make api calls to the following two different endpoints- /breeds/image/random and /breeds/list/all to get a random dog image and list of dog breeds respectively. Make sure that the method is "GET" for both the api calls.'
)
```

## Toolkit Params

| Parameter             | Type                       | Default | Description                                 |
| --------------------- | -------------------------- | ------- | ------------------------------------------- |
| `base_url`            | `Optional[str]`            | `None`  | Base URL for API calls                      |
| `username`            | `Optional[str]`            | `None`  | Username for basic authentication           |
| `password`            | `Optional[str]`            | `None`  | Password for basic authentication           |
| `api_key`             | `Optional[str]`            | `None`  | API key for bearer token authentication     |
| `headers`             | `Optional[Dict[str, str]]` | `None`  | Default headers to include in requests      |
| `verify_ssl`          | `bool`                     | `True`  | Whether to verify SSL certificates          |
| `timeout`             | `int`                      | `30`    | Request timeout in seconds                  |
| `enable_make_request` | `bool`                     | `True`  | Enables functionality to make HTTP requests |
| `all`                 | `bool`                     | `False` | Enables all functionality when set to True  |

## Toolkit Functions

| Function       | Description                                                                                                                                |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `make_request` | Makes an HTTP request to the API. Takes method (GET, POST, etc.), endpoint, and optional params, data, headers, and json\_data parameters. |

## Developer Resources

* [Tools](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/api.py)
