Request body for text-to-image generation.
| Name | Type |
|---|---|
prompt |
string |
negativePrompt |
string |
model |
string |
width |
number |
height |
number |
steps |
number |
cfg |
number |
seed |
number |
sampler |
string |
scheduler |
string |
vae |
string |
loraName |
string |
loraStrength |
number |
import type { GenerateRequest } from '@saiden/tensors'
// TODO: Update the object below with actual values
const example = {
prompt: null,
negativePrompt: null,
model: null,
width: null,
height: null,
steps: null,
cfg: null,
seed: null,
sampler: null,
scheduler: null,
vae: null,
loraName: null,
loraStrength: null,
} satisfies GenerateRequest
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as GenerateRequest
console.log(exampleParsed)[Back to top] [Back to API list] [Back to Model list] [Back to README]