
Security News
libxml2 Maintainer Ends Embargoed Vulnerability Reports, Citing Unsustainable Burden
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
@zeldafan0225/ai_horde
Advanced tools
This package allows you to communicate with the AI Horde API
DISCLAIMER: THIS PACKAGE/REPOSITORY IS IN NO WAY ASSOCIATED TO THE CREATORS OF AI HORDE
Version 5.0.0 introduces some breaking changes:
It also features an internal restructure to reduce complexity and improve performance.
To report bugs please open an issue on GitHub.
I am always happy about contributions. You can contribute by forking this repository, updating or adding and then creating a pull request. You can contribute by adding new features, optimizing the currently existing code, adding examples or anything else I missed.
The package exports the class AIHorde
which includes basically everything you need, when using typescript you can also export types.
The package also exports constant values used in the hordes API request payloads
const { AIHorde } = require("@zeldafan0225/ai_horde");
/*
Create new instance of the ai_horde class to communicate with the rest API
You can configure which cache should contain the data for what time
You can also configure at what interval the cache is checking if there are any data that should be deleted
The class also takes a default token. This is helpful if you want to use this package only using your own token.
The token is not a required argument in any method.
A default API route is also in the contrictor for changing where the requests are directed to (e.g. when using a subdomain like https://test.aihorde.net)
*/
const ai_horde = new AIHorde({
cache_interval: 1000 * 10,
cache: {
generations_check: 1000 * 30,
},
client_agent: "My-Project:v0.0.1:My-Contact"
});
// start the generation of an image with the given payload
const generation = await ai_horde.postAsyncImageGenerate({
prompt: "The legend of Zelda",
});
console.log(generation);
// check the status of your generation using the generations id
const check = await ai_horde.getImageGenerationCheck(generation.id);
console.log(check);
See the auto-generated docs for more info on methods and parameters.
FAQs
A package to interact with the ai horde API
The npm package @zeldafan0225/ai_horde receives a total of 11,325 weekly downloads. As such, @zeldafan0225/ai_horde popularity was classified as popular.
We found that @zeldafan0225/ai_horde demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.