<!-- Source: https://docs.squirro.com/en/latest/api/squirro_client.genai.GenAIApiMixin.html -->
# GenAIApiMixin

**`class GenAIApiMixin`**

Bases: [`object`](https://docs.python.org/3.11/library/functions.html#object)

Attributes SummaryMethods SummaryAttributes Documentation

**`genai_api_url`**

Methods Documentation

**`create_agent(project_id, data)`**

Create a new Squirro Chat Agent.

**`delete_agent(project_id, agent_id)`**

Delete a specific Squirro Chat Agent.

**`delete_all_agents(project_id)`**

Delete all Squirro Chat Agents for a given project.

**`genai_post_arbitrary_prompt(data)`**

Post an arbitrary prompt to the GenAI API.

**`genai_request(method, route, **kwargs)`**

Perform a generic request to the GenAI API.

Example:

python
client.genai_request(

> “post”,
> “/v0/arbitrary_prompt”,
> json={
> 
> 
> 
> > “question_prompt”: “What is the capital of France?”,
> > “runtime_config”: {“llm_api_key”: “<API_KEY>”},
> 
> 
> 
> },

## )

**`get_agent(project_id, agent_id)`**

Get a specific Squirro Chat Agent.

**`get_agents(project_id)`**

Get all Squirro Chat Agents for a given project.

**`import_agents(project_id, data)`**

Import Squirro Chat Agents.

**`move_agent(project_id, agent_id, data)`**

Change the presentation order of a specific Squirro Chat Agent.

**`update_agent(project_id, agent_id, data)`**

Update a specific Squirro Chat Agent.
