Official Python SDK for 1KeyAI — one API key, any document, instant chatbot.
Project description
1KeyAI Python SDK
One API key. Any document. Instant chatbot.
Installation
pip install onekeyai
Quick start
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
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
onekeyai-1.0.0.tar.gz
(3.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file onekeyai-1.0.0.tar.gz.
File metadata
- Download URL: onekeyai-1.0.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9694077721c7dd28a908074c48b73116a81991e9874ac26f36e85127bd42244
|
|
| MD5 |
355acef296a4a45d8b9d3d549f6df202
|
|
| BLAKE2b-256 |
41b41e079e7d260ff0401565bca95c33a56c911071551a10d9434e69608ae35c
|
File details
Details for the file onekeyai-1.0.0-py3-none-any.whl.
File metadata
- Download URL: onekeyai-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c320fa10f9164d8c377853a9078d9b0659644eb60c7a6e12549bcb68ef4cc7b
|
|
| MD5 |
b4092843c61987d6b88d606319ef972f
|
|
| BLAKE2b-256 |
0716d483d84b45951df21135a9358b28a2ef56d4ee338beef25c5bff5939943c
|