Strange API was built to provide Discord bot developers an easy way to get content from the internet. It provides an easy to use interface and takes hard tasks away from developers.
Note
If you don't have the token required to access this API, you can get one for free at the dashboard or by joining our Discord server and using the /apikey generate
command.
When calling our API, you must provide a HTTP-Header with name Authorization
and value Bearer TOKEN
where you replace 'TOKEN' with your token.
Remember that you can also pass the authorization directly by adding a query to the endpoint url like ?apiKey=TOKEN
where you replace TOKEN
with your token.
Example requesting to image api using superagent
const request = require("superagent");
request
.get("https://strangeapi.hostz.me/api/generators/beautiful") // the endpoint
.set("Authorization", "Bearer YourTokenHere") // authentication
.query({ image: "" }) // the image to be used in the meme (Also work with query parameter above).
.then((res) => res.body); // handle the buffer response
[!NOTE] > Note: The most of API request response is a Buffer (for image), handle the buffer somehow with your programming language.
Language | Library | Author |
---|---|---|
Typescript | strange.js | Ghellab Abderrahmane |
Typescript | strange-api-wrapper | Zastinian |
- Clone the repository
- Install dependencies
- Copy
.env.example
to.env
and fill in your environment variables - Build the project with
npm run build
oryarn build
- Start the server with
npm start
oryarn start
git clone https://github.com/saiteja-madha/strange-image-api.git
cd strange-image-api
npm install # or yarn
cp .env.example .env
npm run build
npm start
Contributions are welcome. Please open a pull request with your changes.
Special thanks to SharifPoetra for sharing his ideas and major ideas were taken from his project.