Dungen API Documentation
This API allows you to use Dungen, an AI model, that generates names based on games. Our model only supports two games: Terraria, and Skyrim.
Changelog
1.4 (Latest): 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
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:
Post
Get
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
orFantasy
.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
`GET` method
Here are a few of the error codes, you will receive in responses, to help clarify issues:
Common error codes
Our APIs are rigorously tested before deployments, to ensure that they do not produce any unintentional errors during production.
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.
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.
Answers to the most common questions and issues when using this API:
Conclusion
That's it! You now know the basics of using the Dungen API. Please contact our support team if you have any further questions or encounter issues.
Last updated