ArtiiGen API Documentation

Welcome to the ArtiiGen API documentation. This API allows you to generate ASCII art from text using various styles/fonts and provides access to style information and usage statistics.

Base URL: http://localhost:5000/

1. Home

URL: /

Method: GET

Description: Returns a welcome message for the ArtiiGen API.

2. List Available Styles

URL: /styles

Method: GET

Description: Returns a list of available styles (fonts) that can be used with the ArtiiGen.

Example Response

{
    "available_styles": [
        "block",
        "banner",
        "bubble",
        ...
    ]
}
        

3. Generate ASCII Art

URL: /ascii-art

Method: POST

Description: Generates ASCII art from provided text and style.

Request Body

{
    "text": "Your text goes here",
    "style": "chosen_style"
}
        

Parameters:

Example Response

{
    "ascii_art": "Generated ASCII art"
}
        

4. Get Scores

URL: /scores

Method: GET

Description: Returns usage statistics (scores) for each style.

Example Response

{
    "block": 10,
    "banner": 5,
    "bubble": 7,
    ...
}
        

Error Responses

400 Bad Request: Invalid request format or missing parameters.

{
    "error": "Invalid request. Please provide text and style as JSON data"
}
        

400 Bad Request: Invalid style provided.

{
    "error": "Invalid style. Please choose from /styles"
}
        

500 Internal Server Error: Any internal server error encountered during ASCII art generation.

{
    "error": "Internal Server Error: Description"
}