# Python SDK

**Python** [**Python SDK**](https://github.com/OwnLayer/ownlayer_py_sdk) is the easiest and most recommended way to integrate with Ownlayer

#### Install SDK

```
pip install ownlayer
```

Add add `OWNLAYER_API_KEY` to your `.env` file:

```
OWNLAYER_API_KEY=ey...xxx
```

Change OpenAI or Anthropic imports to use Ownlayer wrapper

```
- import openai
+ from ownlayer.openai import openai
```


---

# 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.ownlayer.com/python-sdk.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.
