1const axios = require('axios');
4const api_key = "YOUR API-KEY";
5const url = "";
7const data = {
8  "prompt": "warrior, warhammer 40k, space marine, intricate ornamented, Smoke Gray Aluminum Beige armor, adepta sororitas, dynamic posture, Alpine desert landscape background, volumetric cinematic lighting, (highly detailed skull:0.8), realistic reflections, cinematic composition",
9  "negative_prompt": "boring, poorly drawn, bad artist, (worst quality:1.4), simple background, uninspired, (bad quality:1.4), monochrome, low background contrast, background noise, duplicate, crowded, (nipples:1.2), big breasts",
10  "scheduler": "ddim",
11  "num_inference_steps": 25,
12  "guidance_scale": 9,
13  "samples": 1,
14  "seed": 2601738487234,
15  "img_width": 512,
16  "img_height": 768,
17  "base64": false
20(async function() {
21    try {
22        const response = await, data, { headers: { 'x-api-key': api_key } });
23        console.log(;
24    } catch (error) {
25        console.error('Error:',;
26    }
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing


promptstr *

Prompt to render

negative_promptstr ( default: None )

Prompts to exclude, eg. 'bad anatomy, bad hands, missing fingers'

schedulerenum:str ( default: UniPC )

Type of scheduler.

Allowed values:

num_inference_stepsint ( default: 20 ) Affects Pricing

Number of denoising steps.

min : 20,

min : 100

guidance_scalefloat ( default: 7.5 )

Scale for classifier-free guidance

min : 0.1,

min : 25

samplesint ( default: 1 ) Affects Pricing

Number of samples to generate.

min : 1,

min : 4

seedint ( default: -1 )

Seed for image generation.

img_widthenum:int ( default: 512 ) Affects Pricing

Width of the image.

Allowed values:

img_heightenum:int ( default: 512 ) Affects Pricing

Height of the Image

Allowed values:

base64boolean ( default: 1 )

Base64 encoding of the output image.

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.


The RPG V4 model is a highly specialised model designed to generate and understand attributes and elements related to Medieval and Role Playing Game characters. This includes a wide range of elements such as heavy armor, leather armor, mage cloaks, and more. The model has been trained using original work created with tools like Unreal Engine, custom editing, IMG2IMG painting, and MidJourney. It has a unique understanding of artist names and styles, and can generate content with a bias towards 'women'. RPG V4 does not use trigger words and can be used for landscapes, clothing, characters, and objects. It has been trained on hundreds of concepts and styles over four months using exclusively original content.

The RPG V4 model operates on a stable diffusion framework and uses SD 1.5 as it's base model. It has been extensively trained on various clothing and fabric details, with a particular bias towards floral-like patterns, including flowers, leaves, and feathers. The model works well with the StylePile extension, which can help users experiment with shading and rendering styles. The optimal CFG for RPG V4 is 3/4.5/6 with optimal steps set at 50/75/150. It also works well with Img2img flows.

The RPG V4 model offers several advantages. It is highly specialised in generating and understanding RPG and Medieval character attributes, making it a valuable tool for game developers and artists. The model's ability to understand artist names and styles allows for a wide range of creative outputs. It also has a bias towards 'women', making it a unique tool for creating female characters. The model's extensive training on various concepts and styles allows it to generate a wide range of outputs, from landscapes to clothing to characters.

RPG V4 use cases

  1. Game Development: RPG V4 can be used to generate character designs and concepts for RPG and Medieval-themed games.

  2. Artistic Creations: Artists can use RPG V4 to generate unique character designs and concepts, especially those with a bias towards 'women'.

  3. Fashion Design: With its extensive training on clothing and fabric details, RPG V4 can be used to generate unique clothing designs, especially those with floral-like patterns.

  4. Storytelling and World Building: Writers and storytellers can use RPG V4 to generate character concepts and world elements for their stories.

  5. Education and Research: RPG V4 can be used in educational settings to help students understand the elements of RPG and Medieval character design. It can also be used in research to study AI's ability to generate creative outputs.

RPG V4 license

The license for the RPG v4 model, known as the "CreativeML Open RAIL-M" license, is designed to promote both open and responsible use of the model. You may add your own copyright statement to your modifications and provide additional or different license terms for your modifications. You are accountable for the output you generate using the model, and no use of the output can contravene any provision as stated in the license.