Give a prompt and the model will generate a new image.

Input

import Heurist from 'heurist'
 
const heurist = new Heurist({
  apiKey: process.env['HEURIST_API_KEY'],
})
 
async function main() {
  const response = await heurist.images.generate({
    model: 'BrainDance',
  })
}
 
main()

Response

{
  "url": "https://heurist-images.s3.us-east-1.amazonaws.com/**********.png",
  "model": "BrainDance",
  "prompt": "xxxxxx"
}

Parameters

Type: ImageGenerateParams

PropertyTypeRequiredDescription
modelstringtrueThe name of the model used, which specifies the particular model used to perform the generation or iteration.
promptstringtrueThe main cue information used to generate the image or iteration.
neg_promptstringfalseNegative cue messages used to specify that generation of content should be avoided.
num_iterationsnumberfalseNumber of iterations to perform. (1-50)
guidance_scalenumberfalseGuidance scale for adjusting the influence of certain parameters in the generation process. (1-20)
widthnumberfalseThe width of the image.
heightnumberfalseThe height of the image.
seednumberfalseSeed value to ensure repeatability of the generated results.

Returns

Type: ImageGenerateParams & { url: string }

PropertyTypeRequiredDescription
urlstringtrueThe URL link to the generated image.

Supported Models

Visit the supported model list