# Giphy

**GiphyTools** enables an Agent to search for GIFs on GIPHY.

### [​](https://docs.phidata.com/tools/giphy#prerequisites)Prerequisites <a href="#prerequisites" id="prerequisites"></a>

```shell
export GIPHY_API_KEY=***
```

### [​](https://docs.phidata.com/tools/giphy#example)Example <a href="#example" id="example"></a>

The following agent will search GIPHY for a GIF appropriate for a birthday message.

```python
from bitca.agent import Agent
from bitca.model.openai import OpenAIChat
from bitca.tools.giphy import GiphyTools


gif_agent = Agent(
    name="Gif Generator Agent",
    model=OpenAIChat(id="gpt-4o"),
    tools=[GiphyTools()],
    description="You are an AI agent that can generate gifs using Giphy.",
)

gif_agent.print_response("I want a gif to send to a friend for their birthday.")
```

### [​](https://docs.phidata.com/tools/giphy#toolkit-params)Toolkit Params <a href="#toolkit-params" id="toolkit-params"></a>

| Parameter | Type  | Default | Description                                       |
| --------- | ----- | ------- | ------------------------------------------------- |
| `api_key` | `str` | `None`  | If you want to manually supply the GIPHY API key. |
| `limit`   | `int` | `1`     | The number of GIFs to return in a search.         |

### [​](https://docs.phidata.com/tools/giphy#toolkit-functions)Toolkit Functions <a href="#toolkit-functions" id="toolkit-functions"></a>

| Function      | Description                                         |
| ------------- | --------------------------------------------------- |
| `search_gifs` | Searches GIPHY for a GIF based on the query string. |
