Text to Image
Generating high-quality images from natural language descriptions is easy with Siraya Model Router. Our unified API allows you to access various state-of-the-art image generation models using a single interface.
POST
https://llm.siraya.ai/v1/images/generations
Header
Authorization
string
Required
Your API Key (e.g.,
Bearer <API_KEY>).
Body
model
string
Required
The ID of the model to use (e.g.
gpt-image-1.5, imagen-4.0-generate-001).
prompt
string
Required
A text description of the desired image.
n
integer
Default: 1
The number of images to generate.
negative_prompt
string
Negative prompt describing content to exclude.
seed
integer
Random seed for reproducibility. The same seed produces the same image.
size
string
The dimensions of the generated image (model-specific).
extra_body
object
Additional model-specific parameters passed directly to the provider.
import requests
url = "https://llm.siraya.ai/v1/images/generations"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer <API_KEY>"
}
data = {
"model": "imagen-4.0-generate-001",
"prompt": "A cat is playing piano in a cozy room",
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
Example Response
For a list of all available image models, visit the Models Directory.