The AI Horde is built around the concept of Mutual Aid, to allow people who have, to aid with those who have not. It’s just that it is about aiding for one specific purpose, of using generative AI.
A lot of the design decisions of the AI Horde have been added to facilitate this purpose, such as kudos transfers, which have in turn been turned into things like discord emojis etc. And I’m always looking for ways to reinforce this behavior.
To this end, I am excited to announce a new feature on the AI Horde: Shared Keys
What are shared keys?
In short, they are API keys which can only be used to generate images and text, and not valid for doing any other operations, such as transferring kudos or rating images. The idea here is that someone can created a shared key to give to friends and family, to allow them to use their account priority and to lower the on-boarding requirements of registering their own accounts and not worrying that they might leak it.
Whenever a shared key is used, the kudos is consumed from the origin account and the priority used for that generation is the same as the owner’s. The generation also shares concurrency with that account so if you are planning to share with a lot of people they might end up getting in each other’s way.
Shared Keys can also be given an optional kudos limit, and an expiry date, after which they stop working. A kudos limit doesn’t affect their priority, just prevents the shared key form being used once that limit has been reached.
How do I create an API key?
Until UIs add the option to create them, the simplest way is to use the API web interface directly: http://aihorde.net
Alternatively you can open a console terminal and send a CURL call like so:
curl -X 'PUT' \
-H 'accept: application/json' \
-H 'apikey: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
"name": "Mutual Aid"
}'Code language: PHP (php)
just add your own API Key and change the kudos limit and name as you wish. You can also set kudos to -1 to allow unlimited sharing with that key.
We also provide an endpoint to check how much a key has been utilized until now
}Code language: JSON / JSON with Comments (json)
How do I use a Shared Key
Simply use it place of a normal API key to the UI of your choice.
Can I modify a Shared key
Yes, you can both “top-up” existing keys, add/remove expiry, or delete them altogether.
The Shared Keys are designed to be pretty open in their usage. I expect use cases around “service accounts” for communities where people are pooling their kudos somehow, but I am also curious what other emergent uses people will come up around this system.
And If you have a user-case which requires tweaking of this functionality, do let me know!