Xalora AI Docs
  • Getting Started
    • Welcome to Xalora
  • Agent Framework
    • Social Agents
  • Xalora Mesh
  • Ecosystem
    • Xalora Imagine
  • imaginaries NFT
  • Developer Reference
    • Integration Overview
  • Supported Models
  • Understanding Image Prompting
  • Using Xalora API with Eliza
  • REST API
    • Xalora Mesh API
  • Synchronous Request
  • Image Generation API
  • Xalora SDK
    • Introduction
  • Getting Started
  • Basic Image Generation
  • SmartGen
  • ComfyUI Workflow
  • FluxLora Workflow
  • Text2Video Workflow
  • LLM Gateway
    • Introduction
  • LLM Tool Calling
  • Embeddings
Powered by GitBook
On this page
  • ​Response
  • ​Parameters
  • ​Returns

Basic Image Generation

PreviousGetting StartedNextSmartGen

Last updated 7 days ago

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

Input

Copy

import V from 'xalora'
 
const xalora = new Xalora({
  apiKey: process.env['XALORA_API_KEY'],
})
 
async function main() {
  const response = await xalora.images.generate({
    model: 'BrainDance',
  })
}
 
main()

Response

Copy

{
  "url": "https://xalora-images.s3.us-east-1.amazonaws.com/**********.png",
  "model": "BrainDance",
  "prompt": "xxxxxx"
}
Property
Type
Required
Description

model

string

true

The name of the model used, which specifies the particular model used to perform the generation or iteration.

prompt

string

true

The main cue information used to generate the image or iteration.

neg_prompt

string

false

Negative cue messages used to specify that generation of content should be avoided.

num_iterations

number

false

Number of iterations to perform. (1-50)

guidance_scale

number

false

Guidance scale for adjusting the influence of certain parameters in the generation process. (1-20)

width

number

false

The width of the image.

height

number

false

The height of the image.

seed

number

false

Seed value to ensure repeatability of the generated results.


Property
Type
Required
Description

url

string

true

The URL link to the generated image.

Parameters

Type: ImageGenerateParams

Returns

Type: ImageGenerateParams & { url: string }

​
​
​
​
​
​