# Opper AI

<figure><img src="/files/a88NzESKgqLhxYbycaiw" alt=""><figcaption></figcaption></figure>

Go to <https://opper.ai/> and sign up for a free account.

<figure><img src="/files/M4bowszdfeEw1kQN7bGs" alt=""><figcaption></figcaption></figure>

Click on "Settings" in the bottom of the left sidebar. Click "API Keys" in the main section. Click "Create API Key" in the top right corner.&#x20;

Store the API key in your Polytope vault by running the following command in your system project directory.

```
pt secret set opper-api-key YOUR_OPPER_API_KEY
```

## Using Opper AI

We use [Opper AI](https://opper.ai) for LLM response generation and knowledge base integration. The response generation follows a pattern:

```python
def bake_response(messages):
    response, _ = opper.call(
        name="generate_response",
        instructions="Generate a helpful, friendly but brief response to the user's message in the conversation.",
        input={"messages": messages},
        output_type=str,
    )
    return response
```

Learn more about the [Opper SDK on GitHub](https://github.com/opper-ai/opper-python) and in the [official documentation](https://docs.opper.ai/).


---

# 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.bluetext.dev/integrations/opper-ai.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.
