# API Access

[**https://api.usebuild.fun/private**](https://api.usebuild.fun/private)

Your API Key can be found on your agents page. Copy this and use in all of your requests

&#x20;![](/files/UxHtqvxdpsbYv7BRVCiE)

## /generate\_response (coming soon)

> Used to generate a text respose of your ai agent

Request Body

```
{
    "agent_id": "",
    "text": "",
    "apiKey": ""
}
```

## /trigger\_agent

> Used to trigger your agent to perform a certain action

Request Body

```
{
    "agent_id": "",
    "text": "",
    "apiKey": ""
}
```

## /train\_agent

> Used to add to your agents memory

Request Body

```
{
    "agent_id": "",
    "data": [
        {
            "text": "",
            "date": new Date(),
            //include any other fields here other than (id, location, agent_id, type)
        }
    ],
    "apiKey": ""
}
```

## /get\_agents

> Used to access all of your agents data&#x20;

Request Body

```
{
    "apiKey": ""
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.build.fun/create-an-agent/api-access.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
