Character-Generation-API

Character Generator API Documentation

Welcome to the official documentation for the Character Generator API. This API empowers you to dynamically generate distinct characters, complete with metadata and associated images. Below is an extensive guide on effectively utilising this API.

To generate characters, manipulate the seed value in the URL, determining the character’s properties. Repeating the same seed will yield the identical character. Below are quick links for testing:

Note: Version 2 is currently in progress.

Getting Started

Follow these instructions to get a copy of the project up and running on your local machine.

Prerequisites

Installing

  1. Clone the repository:

     git clone https://github.com/ITsPorky/Character-Generation-API.git
    
  2. Navigate to the project directory:

     cd Character-Generation-API
    
  3. Install dependencies:

     npm install
    

    OR

     npm i
    

Running the App

  1. Start the development server:

     npm start
    
  2. Open your browser and visit http://localhost:3000 to view the app.

Usage

Understanding Response Types

This API provides various response types for creating diverse characters. It includes different versions for generating distinct styles of character design:

Version 1

Character Card (format: .png)

To obtain a Character Card, use the following URL format: /v1/card/seed/{seed_value}/1x.png.

Example Response:
Seeded Characters Card

Character Sprite (format: .png)

To retrieve a Character Sprite, use the URL format: /v1/sprite/seed/{seed_value}/1x.png.

Example Response:
Seeded Character Sprite

Weapon Sprite (format: .png)

To obtain a Weapon Sprite, use the URL format: /v1/weapon/seed/{seed_value}/1x.png.

Example Response:
Seeded Weapon Sprite

Character Metadata (format: JSON)

To retrieve Character Metadata, use the URL format: /v1/seed/{seed_value}/metadata.

This response includes all generated character information, such as character card URL, character sprite URL, weapon sprite URL, and additional data not displayed on the character card.

Version 2

Work in progress…

Features

This API provides numerous features for creating unique characters, including:

Project Overview

This section provides an overview of the key learnings and challenges encountered during the development of this project.

Key Learnings

Throughout the course of this project, I acquired valuable skills and knowledge in the following areas:

Overcoming Challenges

In the pursuit of project completion, several challenges were encountered and successfully addressed:

I hope this documentation was helpful, feel free to try it out.