Metadata-Version: 2.4
Name: onekeyai
Version: 1.0.0
Summary: Official Python SDK for 1KeyAI — one API key, any document, instant chatbot.
Author: 1KeyAI
License: MIT
Project-URL: Homepage, https://allinone-production-3a85.up.railway.app/docs
Project-URL: Repository, https://github.com/Beyond-the-classroom/ALLINONE
Keywords: ai,chatbot,rag,documents,llm,1keyai
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.24.0

# 1KeyAI Python SDK

> One API key. Any document. Instant chatbot.

## Installation

```bash
pip install onekeyai
```

## Quick start

```python
from onekeyai import OneKeyAI

client = OneKeyAI(api_key="pk_your_key_here")

response = client.chat("What is this document about?")
print(response.answer)

for source in response.sources:
    print(f"  [{source.source}] {source.snippet}")
```

## Async support

```python
import asyncio
from onekeyai import OneKeyAI

client = OneKeyAI(api_key="pk_your_key_here")

async def main():
    response = await client.chat_async("Summarize this document.")
    print(response.answer)

asyncio.run(main())
```

## Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `api_key` | `str` | required | Your `pk_` project key |
| `base_url` | `str` | production URL | Override API base URL |

## `client.chat(message, llm, history)`

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `message` | `str` | required | The question to ask |
| `llm` | `str` | `"claude"` | `"claude"`, `"gpt4"`, or `"gemini"` |
| `history` | `list` | `[]` | Conversation history |

## Links

- [Dashboard](https://dashboard.1keyai.org)
- [API Reference](https://allinone-production-3a85.up.railway.app/docs)
