# Get Started

## Our Structure

Our API  is based on both a single and multi-endpoint architecture. Specific operations are determined by requests sent to the respective endpoints.

Some requests made to Autogon will require an API key. Please refer to the sections below on API key creation.

While most requests require authentication using API keys; any of such requests that doesn't include an API key will return an error. You can generate an API key from your portal at any time.

### Getting your API Keys

Before you begin integration with the Autogon API,

1. Create an Autogon account and complete necessary verification
2. Fetch your integration credentials from the Integrations tab in Settings.
3. Proceed to set up your integration.

{% hint style="info" %}
Refer to the article/video embedded below for a complete guide on how to get API keys and integrate with the Autogon API.
{% endhint %}

#### [Link to article/video on integrating with Autogon](#user-content-fn-1)[^1]

## Install the library

The best way to interact with our API is to use any of our supported integration libraries:

{% tabs %}
{% tab title="Node" %}

```
# Install via NPM
npm install -g autogonai-node
```

{% endtab %}

{% tab title="Python" %}

```
# Install via pip
pip3 install autogonai-python
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Learn More:** Find out more about our supported libraries [here](https://docs.autogon.ai/libraries).
{% endhint %}

## Make your first request

To make your first request, send an authenticated request to the project endpoint. This will create a project. A project is the baseline for using our powerful tools.

## Create project.

<mark style="color:green;">`POST`</mark> `https://autogon.ai/api/v1/project`

Creates a new project.

#### Request Body

| Name                                            | Type   | Description                    |
| ----------------------------------------------- | ------ | ------------------------------ |
| project\_name<mark style="color:red;">\*</mark> | String | name of project                |
| project\_description                            | String | short description for project. |

{% tabs %}
{% tab title="200 Project created successfully" %}
{% code overflow="wrap" %}

```javascript
{
    "id": 1,
    "app_id": "a295d247-05c9-424d-aa8c-5a8990ef5f6a",
    "project_name": "My First Project",
    "project_description": "This is a great project. I hope to achieve more with Autogon",
    "project_compiled_models": null,
    "created_at": "2023-01-22T01:47:43.158604Z"
}
```

{% endcode %}
{% endtab %}

{% tab title="403: Forbidden Project already exists" %}

```json
{
    "status": "false",
    "message": "This project name already exists"
}
```

{% endtab %}
{% endtabs %}

Take a look at how you might call this method using our official libraries, or via `curl`:

{% tabs %}
{% tab title="curl" %}

```
curl -L -X POST "https://autogon.ai/api/v1/api/v1/engine/project" -H "X-AUG-KEY: <API-KEY>" -H "Content-Type: application/json" --data-raw "{
    \"project_name\": \"My First Project\",
    \"project_description\": \"This is a great project. I hope to achieve more with Autogon\"
}"
```

{% endtab %}

{% tab title="Node" %}
{% code overflow="wrap" %}

```javascript
// require the autogonai module and set it up with your API key
const autogonai = require('autogonai');

// load environment variables
require("dotenv").config();

// initilalize client
const client = new Client(process.env.AUTOGON_API_KEY);

// create project
const newProject = await client.Project.create({
    project_name: 'My First Project',
    project_description: 'This is a great project. I hope to achieve more with Autogon',
})
```

{% endcode %}
{% endtab %}

{% tab title="Python" %}

```python
import os
from dotenv import load_dotenv
from autogonai.core import Client

# Set your API key before making the request
client = Client(api_key=API_KEY)

client.Project.create(
    project_name="My First Project",
    project_description="This is a great project. I hope to achieve" \
    " more with Autogon",
)
```

{% endtab %}
{% endtabs %}

[^1]: This is an external link to article or video content
