Images
Use SDXL with loras to generate images of a character, the world around you, and anything in between using a single text prompt.
Generate an image
Once an image generation request is sent, a job is created and the corresponding job ID is sent back.
Generate an image based on a prompt
POST
https://api.vana.com/api/v0/images
Request Body
Name | Type | Description |
---|---|---|
prompt* | String | Description of the characters and things you want in the generated image. To reference a character, use |
negativePrompt | String | Description of the things you don't want in the generated image |
width | Number | Width in pixels of the generated image. Maximum 1024 |
height | Number | Height in pixels of the generated image. Maximum 1024 |
samples | Number | Number of images to be returned in the response, maximum 4 |
seed | Number | Used to reproduce results, same seed will give you same image again |
guidanceScale | Number | A lower number incorporates more creativity while a higher number indicates that the image is closely tied to the text prompt (minimum: 1; maximum: 20) |
loraScale | Number | LoRA additive scale only applicable for images with a trained subject. (minimum: 0, maximum: 1) |
synchronous | Boolean | Enabling syncrhonous mode will allow the user to await the API call and get the generated images, instead of returning only the job ID and having to poll the job to fetch the generated images. Note: synchronous mode may take anywhere from 30 seconds to 2 minutes to return a response, depending on the input. Defaults to |
Sample Request Body
Sample Response Body
Get generated images
To retrieve the images from a generation request, a job can be queried, and the outputFiles
of the job will contain the list of images once the job is complete.
Retreives the outputs from a job
GET
https://api.vana.com/api/v0/jobs/:job-id
Path Parameters
Name | Type | Description |
---|---|---|
job-id* | uuid | ID of the job to retreive |
Sample Response Body
Check if the user has a trained face model
To create personalized images, a user's character must have a trained character face model. A single model here represents a LoRA file, used to personalize an SDXL image.
Having one or more models in the models
response list with status SUCCESS
means an image containing a character's face can be created. A model with status IN_PROGRESS
means the image model is currently training (which takes about 10 minutes to complete).
Retreives a list of LoRA models a character has
GET
https://api.vana.com/api/v0/characters/:character-id/images/models
Path Parameters
Name | Type | Description |
---|---|---|
character-id* | uuid | ID of the character to check |
Sample Response Body
Last updated