# Getting Started

* Download Daimon using `git clone https://github.com/AlgoveraAI/daimon`&#x20;
* Download Llegos using `git clone https://github.com/AlgoveraAI/llegos`


# Llegos

You can think of a llego like a template (or as a lightweight version of a repository). You can clone llegos, or create new llegos.

There are a few different types of llegos:

* Agent Llegos
* Skill Llegos
* Knowledge Llegos
* Prompt Llego


# Agents


# Skills

You can think of Skills like capabilities of an AI agent. Some examples of Skills:

* Chat
* Question Answering
* Summarization


# Knowledge Base

The Knowledge Base is useful for providing context to Agents. Knowledge can be ingested from various data sources such as:

* File
* Notion
* GitHub
* URL
* YouTube


# Daimon

Daimon is a server that you can run locally.


# Architecture


# Hub


# Explore Llegos

Llegos are templates for Agents, Skills and Knowledge.


# Deploy Agents


# Developer API

## How to Use[​](https://docs.algovera.ai/docs/Developer/Flow%20API#using-algoveras-api) <a href="#using-algoveras-api" id="using-algoveras-api"></a>

### Step 1 - Get your API key[​](https://docs.algovera.ai/docs/Developer/Flow%20API#step-1---get-your-api-key) <a href="#step-1---get-your-api-key" id="step-1---get-your-api-key"></a>

To interact with Algovera's API, you first need to generate an API key, which you can generate from the [Algovera Flow](https://app.algovera.ai/) app. Once you are logged in and purchased the credits, select `Account` from your profile.&#x20;

<figure><img src="https://1230901763-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsOpzznDjeSQXZFmMVxpK%2Fuploads%2FGl1SyXMq9fSyeM7sKmIz%2Fimage.png?alt=media&amp;token=f1335a83-1438-46af-8e33-454f7531a414" alt=""><figcaption></figcaption></figure>

There you can generate your API key under the `API Keys` section by selecting Create new key

<figure><img src="https://1230901763-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsOpzznDjeSQXZFmMVxpK%2Fuploads%2FtSSMyY2xlF5JBd4ZBNIe%2Fimage.png?alt=media&amp;token=fddc01ec-71a7-45bf-9806-6cf941500493" alt=""><figcaption></figcaption></figure>

Make sure to copy and keep your key carefully. Keys will only be shown at creation.

<figure><img src="https://1230901763-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsOpzznDjeSQXZFmMVxpK%2Fuploads%2FPfnEftWEFl8ci7Q2T7Cq%2Fimage.png?alt=media&amp;token=4f7e9ff4-b0dd-427d-9678-efebfebb00b3" alt=""><figcaption></figcaption></figure>

### Step 2 - Interacting with the API key in Python[​](https://docs.algovera.ai/docs/Developer/Flow%20API#step-2---interacting-with-the-api-key-in-python) <a href="#step-2---interacting-with-the-api-key-in-python" id="step-2---interacting-with-the-api-key-in-python"></a>

**Note:** For API documentation, you can refer to [api.algovera.ai/docs](https://api.algovera.ai/docs)

`APIEndpoint` : `https://api.algovera.ai`

**Getting the available base models**[**​**](https://docs.algovera.ai/docs/Developer/Flow%20API#getting-the-available-base-models)

```
import json
import requests

response = requests.get(f"{APIEndpoint}/api/basemodels")
models = json.loads(response.content)['base_models']
print(models)
['dalle',
 'stable',
 'stable diffusion v1.5',
 'stable diffusion v2-512x512',
 'stable diffusion v2-768x768',
 'stable diffusion v2.1-512x512',
 'stable diffusion v2.1-768x768']
```

The above call will return all the available models.

**Posting a job**[**​**](https://docs.algovera.ai/docs/Developer/Flow%20API#posting-a-job)

```
ept = f"{APIEndpoint}/api/txt2img"

payload = {
        'prompt':"What a beautiful world",
        'height':512,
        'width': 512,
        'inf_steps': 30,
        'guidance_scale':7.0,
        'seed':23165161,
        'base_model':"stable",
        "api_key": "YOUR_API_KEY"
    }

response = requests.post(ept, json=payload)
job_id = json.loads(response.content)['job_uuid']
print(f"job_id is {job_id}")
job_id is f988ff3ffa4b4145bd746c804cf39575
```

Once you post a job, it returns a `job_id` that your could use to check the status of the job as well as to retrieve the output of the job (in this case the image).

Payload contains params for the job as well as your api\_key

**Checking the status of your job**[**​**](https://docs.algovera.ai/docs/Developer/Flow%20API#checking-the-status-of-your-job)

```
ept = f"{APIEndpoint}/api/status?job_uuid={job_id}&api_key={YOUR_API_KEY}"

response = requests.get(ept)
job_status = json.loads(response.content)['job_status']
print(f"job_status is {job_status}")
job_status is done
```

job\_status can be `created` (the job is created and either is in queue or being processed), `done`, `failed`

#### Get the output of your job[​](https://docs.algovera.ai/docs/Developer/Flow%20API#get-the-output-of-your-job) <a href="#get-the-output-of-your-job" id="get-the-output-of-your-job"></a>

```
ept = f"{APIEndpoint}/api/getAsset"

payload = {
            "api_key": "YOUR_API_KEY",
            "job_uuid": job_id
            }

response = requests.get(ept, json=payload)

img = Image.open(io.BytesIO(res.content))
```


