tokenplace is a peer-to-peer generative AI platform that pairs those in need of LLM compute with individuals donating spare resources, aiming to democratize AI access.
The token.place API is designed to be compatible with the OpenAI API format, making it easy to integrate with existing applications that use OpenAI's services.
Lists the available models.
Example Response:
{
"object": "list",
"data": [
{
"id": "llama-3-8b-instruct",
"object": "model",
"created": 1679351277,
"owned_by": "token.place",
"permission": [...],
"root": "llama-3-8b-instruct",
"parent": null
}
]
}
Retrieves information about a specific model.
Example Response:
{
"id": "llama-3-8b-instruct",
"object": "model",
"created": 1679351277,
"owned_by": "token.place",
"permission": [...],
"root": "llama-3-8b-instruct",
"parent": null
}
Creates a completion for the chat message.
Request Body:
{
"model": "llama-3-8b-instruct",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
}
Example Response:
{
"id": "chatcmpl-123abc456def",
"object": "chat.completion",
"created": 1677858242,
"model": "llama-3-8b-instruct",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I assist you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0
}
}
Creates a completion for the prompt (traditional completion API).
Request Body:
{
"model": "llama-3-8b-instruct",
"prompt": "Write a poem about AI",
"max_tokens": 256
}
Example Response: (Same format as chat/completions)
Retrieves the server's public key for end-to-end encryption.
Example Response:
{
"public_key": "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUl..."
}
For enhanced privacy, you can use end-to-end encryption with the API:
/api/v1/public-key"encrypted": true flagExample Encrypted Request:
{
"model": "llama-3-8b-instruct",
"encrypted": true,
"client_public_key": "YOUR_PUBLIC_KEY_HERE",
"messages": {
"ciphertext": "ENCRYPTED_DATA_HERE",
"cipherkey": "ENCRYPTED_AES_KEY_HERE",
"iv": "INITIALIZATION_VECTOR_HERE"
}
}
Check out the roadmap section of the README.
We believe in the democratization of AI. Projects like Folding@Home inspired us to leverage peer-to-peer technology for generative AI, making sophisticated language models accessible to everyone.
Yes, thanks to our generous compute donors. We aim to keep it free, no strings attached, to ensure universal access to advanced AI.
You can contribute by donating compute resources or by participating in our community on GitHub. Every bit helps us grow and improve.
Learn more about our goals and how you can be a part of this initiative on our GitHub repository.
All communications are now end-to-end encrypted for enhanced privacy. For maximum security, consider self-hosting by following the README on the GitHub repository.