# Using Xalora API with Eliza

Learn how to integrate and configure Xalora API with Eliza for enhanced AI capabilities

Eliza enables developers to build autonomous AI agents. With Xalora API integration, you can access powerful AI models for both language processing and embedding generation.

### [​](https://docs.heurist.ai/dev-guide/examples/eliza#prerequisites)Prerequisites <a href="#prerequisites" id="prerequisites"></a>

Before you begin, make sure you have:

* Completed the [Eliza quickstart](https://elizaos.github.io/eliza/docs/quickstart/)
* Obtained your api key immediately with referral code `agent` when fill out this form Xalora API key

### [​](https://docs.heurist.ai/dev-guide/examples/eliza#environment-configuration)Environment Configuration <a href="#environment-configuration" id="environment-configuration"></a>

Add these environment variables to your `.env` file:

Copy

```
# Required Xalora API settings
XALORA_API_KEY="<XALORA_API_KEY>"  # API key for Xalora
XALORA_MODEL=FLUX.1-dev                          # Default model for image generation
XALORA_EMBEDDING_MODEL=BAAI/bge-large-en-v1.5 # Default embedding model
USE_XALORA_EMBEDDING=true                     # Enable Xalora embeddings

# Optional: Task-specific model configuration
SMALL_XALORA_MODEL=your_small_model
MEDIUM_XALORA_MODEL=your_medium_model
LARGE_XALORA_MODEL=your_large_model
```

### [​](https://docs.heurist.ai/dev-guide/examples/eliza#character-configuration)Character Configuration <a href="#character-configuration" id="character-configuration"></a>

Configure your character file in JSON format to use Xalora as the model provider:

Copy

```
{
    "modelProvider": "Xalora"
}
```

### [​](https://docs.heurist.ai/dev-guide/examples/eliza#supported-models)Supported Models <a href="#supported-models" id="supported-models"></a>

#### [​](https://docs.heurist.ai/dev-guide/examples/eliza#language-models)Language Models <a href="#language-models" id="language-models"></a>

For available language models, refer to the Xalora LLM documentation.

#### [​](https://docs.heurist.ai/dev-guide/examples/eliza#image-models)Image Models <a href="#image-models" id="image-models"></a>

For available image generation models, refer to the Xalora Image Models documentation.

#### [​](https://docs.heurist.ai/dev-guide/examples/eliza#embedding-model)Embedding Model <a href="#embedding-model" id="embedding-model"></a>

Currently, Xalora supports the following embedding model:

* BAAI/bge-large-en-v1.5 (Default model for all embedding operations)


---

# 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://xalora-ai.gitbook.io/xalora-ai-docs/using-xalora-api-with-eliza.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.
