Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kiwijuice56/sand-spoon-element-api
Server that uses OpenAI API to generate falling sand elements from text
https://github.com/kiwijuice56/sand-spoon-element-api
falling-sand godot openai openai-api
Last synced: 12 days ago
JSON representation
Server that uses OpenAI API to generate falling sand elements from text
- Host: GitHub
- URL: https://github.com/kiwijuice56/sand-spoon-element-api
- Owner: kiwijuice56
- License: mit
- Created: 2024-07-15T02:56:38.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-07-23T05:44:44.000Z (7 months ago)
- Last Synced: 2024-07-24T06:57:45.205Z (7 months ago)
- Topics: falling-sand, godot, openai, openai-api
- Language: Python
- Homepage:
- Size: 29.3 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# sand-spoon-element-api
Web server and free API that uses OpenAI to generate falling sand elements (for the game [sand-spoon](https://github.com/kiwijuice56/sand-spoon)) from text.## Usage
Request from the URL `https://122412240.xyz/?element_name={your_element_name_here}`, replacing `your_element_name_here` with any 12 character word.
The response will be a JSON file containing a guess at what properties suit that element, such as `color` and `temperature`.
Requests are limited to 10 per minute from a single IP address to reduce spam.
Requests that violate OpenAI content policy (hate, violence, etc.) will return an empty JSON file.## Structure
The API code uses Gunicorn and Flask to listen to requests. The server uses Nginx as a reverse proxy and is hosted on a DigitalOcean droplet.