Dungen API Documentation
This API allows you to use Dungen, an AI model, that generates game-based names. It supports over 25 different game name generation models.
🚀 Quickstart Using cURL
curl -X POST "https://infinitode.netlify.app/api/v1/dungen" \
-H "Content-Type: application/json" \
-d '{"apiKey": "YOUR_API_TOKEN", "typeOfGeneration": "Terraria", "amount": 15, "maxLength": 30, "temperature": 0.5}'Changelog
1.7 (Latest): Updated Dungen with 6 new AI models.
1.6: Updated Dungen with 9 new AI models.
1.5: Updated Dungen with 11 new AI models.
1.4: Updated Dungen with 3 new AI models.
1.3: Updated Dungen with a new AI model for generating names from the Witcher.
1.2: Updated API security.
1.1: Created a new AI model, to generate fantasy names, instead of just Skyrim, and Terraria names.
1.0: Initial commit for API space.
Access
The API can be accessed from
Authentication
Bearer
This API uses Bearer Token authentication. Include your API token in the Authorization header of your request.
You can also use the API with the default GET method, and continue to use the default apiKey or token parameters. When using the authorization bearer, apiKey or token parameters are automatically ignored.
API Token
You must include an API token in the request to use this API. The API token should be included in the request body as the apiKey field.
You can also use the API with the default GET method.
Endpoint
Generate Names
Endpoint URL:
HTTP Methods:
PostGet
Request Body
The request body should be a JSON object with the following properties:
apiKey: Your API token.typeOfGeneration: The type of generation, choose from:Terraria,Skyrim,Witcher,WOW,Minecraft,Dark Souls,Final Fantasy,Elden Ring,Zelda,Dragon Age,Fallout,Darkest Dungeon,Monster Hunter,Bloodborne,Hollow Knight,Assassin's Creed,Baldur's Gate,Cyberpunk,Mass Effect,God Of War,Last Of Us,Factorio,The Sims,Fortnite,League Of Legends,Among Us,Warframe,Call of Duty,Forza Horizon,Halo,Overwatch,SubnauticaorFantasy.amount: Amount of names to return, ranges from1 - 100.maxLength: Maximum length of a name, ranges from10 - 60.temperature: Lower values = more probabilistic, higher values = more creative. Ranges from0.001 - 1.seedText(optional): String containing seed text, max length of seed text cannot be greater thanmaxLength, or greater than50.
Example:
Or, use the GET method:
Response
Upon a successful request, using the Dungen AI model you will receive a JSON response with the generated names. If the API token is invalid or the request fails, an error message will be included in the response. Validation results and dummy content will also be included.
Example response:
The response includes the generated names and validation results for inputs are excluded since this was a normal API call.
Usage example
Here's a usage example in JavaScript using the fetch API:
Make sure to replace 'YOUR_API_TOKEN' with your actual API token.
Error handling
The API may return error responses in case of invalid input or other issues. Be sure to handle errors gracefully in your application. Error responses will include appropriate status codes and error messages in the JSON format.
Parameters
Here are all the available parameters for the API:
`POST` method
apiKey
Your API key, either the developer API key, or your normal API key
false
typeOfGeneration
The type of generation, choose from: Terraria, Skyrim, Witcher, WOW, Minecraft, Dark Souls, Final Fantasy, Elden Ring, Zelda, Dragon Age, Fallout, Darkest Dungeon, Monster Hunter, Bloodborne, Hollow Knight, Assassin's Creed, Baldur's Gate, Cyberpunk, Mass Effect, God Of War, Last Of Us, Factorio, The Sims, Fortnite, League Of Legends, Among Us, Warframe, Call of Duty, Forza Horizon, Halo, Overwatch, Subnautica or Fantasy.
false
amount
The amount number of names to generate, ranges from 1 - 100.
false
maxLength
The maximum length number of a generated name, ranges from 10 - 60.
false
temperature
The creativity of the model during generation number, lower values yield more balanced and probabilistic results, and higher values are more creative. Ranges from 0.001 - 1.
false
seedText
The starting text string is used to start the generation. May not exceed the maxLength, or 50, whichever is smaller.
true
`GET` method
token
Your API key, either the developer API key, or your normal API key
false
typeOfGeneration
The type of generation, choose from: Terraria, Skyrim, Witcher, WOW, Minecraft, Dark Souls, Final Fantasy, Elden Ring, Zelda, Dragon Age, Fallout, Darkest Dungeon, Monster Hunter, Bloodborne, Hollow Knight, Assassin's Creed, Baldur's Gate, Cyberpunk, Mass Effect, God Of War, Last Of Us, Factorio, The Sims, Fortnite, League Of Legends, Among Us, Warframe, Call of Duty, Forza Horizon, Halo, Overwatch, Subnautica or Fantasy.
false
amount
The amount number of names to generate, ranges from 1 - 100.
false
maxLength
The maximum length number of a generated name, ranges from 10 - 60.
false
temperature
The creativity of the model during generation number, lower values yield more balanced and probabilistic results, and higher values are more creative. Ranges from 0.001 - 1.
false
seedText
The starting text string is used to start the generation. May not exceed the maxLength, or 50, whichever is smaller.
true
⚠️ Error codes
Here are a few of the error codes, you will receive in responses, to help clarify issues:
Common error codes
400
Missing or invalid parameters. This is when the parameters you passed to the API, do not match the API's expected inputs.
405
Using an invalid method, to access the API.
429
The rate limit is exceeded within the current timeframe.
401
Error during the request. This can be because of insufficient API calls, input errors, or errors arising from the API's logic.
Our APIs are rigorously tested before deployments, to ensure that they do not produce any unintentional errors during production.
⌛ Rate limiting
We use rate limiting, to protect our API's resources. Rate limiting is implemented on all of our APIs, and follows these general principles:
- interval: The rate limiting is set to a default interval of 1 minute.
- amount of requests: The amount of requests is set to a default of 25 requests within the given interval.
If the rate limit is exceeded, an error 429 code will be returned, instead of the actual API output.
⭐ Best practices
Common guidelines to use, optimize, and protect your implementation of our APIs.
Do not store/share/expose your API keys
Implement data cleaning, and validation in your code, to ensure inputs are sanitized
Handle API errors gracefully
Use Developer API calls, to help debug your implementation and code
Handle API outputs accordingly. You can see examples of this API's output in the Endpoint section.
Implement code to notify users of actions when using our APIs, such as errors, delays, formatting issues, etc.
❓ FAQs
Answers to the most common questions and issues when using this API:
I am getting a 405 error, what should I do?
When you are getting a 404 or NotFound error, you likely misspelled the API endpoint or URL. This could also be caused by using an invalid method to access the API.
Is rate limiting set individually, or per API key?
Rate limiting is set individually, this means that rate limiting happens on an end-user level. This ensures that our API is used fairly, among all users.
Are request timeouts a thing?
Yes, we normally timeout requests after the 10-second mark. This, however, can vary significantly, depending on various other factors.
What is the max payload size?
The maximum payload size for buffered executions is 4.5mb per request. For streamed executions, we use a payload restriction size of 20mb per request.
What is the recommended way to call the API?
If you can, call the API using the POST method. The GET method works but is not recommended, especially when you're calling it by directly modifying the URL. This is because URL parameters that are strings, can sometimes be misformatted afterwards, and then incorrectly passed to the API.
Can Dungen generate names for other categories?
No, Dungen was only trained to generate Terraria and Skyrim, Fantasy and other types of game names. You can use the seed_text and temperature options to help the model generate more diverse names, but it won't venture far off the chosen game.
Can Dungen generate NSFW content?
No, Dungen was not designed to generate NSFW content. Use of Dungen for NSFW content generation is prohibited, or content that is otherwise seen as illegal, violent, racist, or discriminatory.
OpenAPI
You can download the OpenAPI specification for this API to learn more about how it works and how to use it. The OpenAPI specification is a standard, language-agnostic interface to RESTful APIs that allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection.
Download OpenAPI Specification
Conclusion
That's it! You now know the basics of using the Dungen API. Don't hesitate to contact our support team with further questions or issues.
Last updated