Generate high-quality images from text prompts using various AI models.
/v1/images/generations
endpoint for this purpose.
/v1/images/generations
endpoint with your text prompt and desired parameters.
POST /v1/images/generations
prompt
(string, required): The text description of the image(s) to generate.model
(string, optional, default: "neosantara-gen-2045"
): The ID of the image generation model to use.n
(integer, optional, default: 1
): The number of images to generate. Must be between 1 and 4.size
(string, optional, default: "1024x1024"
): The size of the generated images. Supported sizes depend on the model but commonly include "512x512"
, "1024x1024"
.steps
(integer, optional, default: 1
): The number of diffusion steps for image generation. Higher values generally lead to better quality but take longer.response_format
(string, optional, default: "url"
): The format in which the generated images are returned.
"url"
: Returns a temporary URL to the generated image. These URLs are typically valid for a short period (e.g., 5 minutes)."b64_json"
: Returns the image data directly as a base64-encoded JSON string."response_format": "url"
)"response_format": "b64_json"
)base_url
to point to the NeosantaraAI API.