Skip to content

Universal Image API

The Universal Image API standardizes image generation and editing tasks across multiple AI providers including OpenAI (DALL-E), Google (Imagen), and more.

Unified Endpoints

1. Image Generation

Endpoint: POST https://image.siraya.pro/v1/images/generations
Generate images from natural language prompts.

2. Image Editing

Endpoint: POST https://image.siraya.pro/v1/images/edits
Modify existing images or transform them using reference URLs and prompts.

Usage Example

curl https://image.siraya.pro/v1/images/generations \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-1",
    "prompt": "A futuristic city in the clouds",
    "n": 1
  }'
import requests

url = "https://image.siraya.pro/v1/images/edits"
data = {
    "model": "dreamomni2-image-to-image",
    "prompt": "Apply a watercolor style",
    "image_urls": ["https://path/to/my-image.png"],
    "output_format": "url"
}
headers = {"Authorization": "Bearer <API_KEY>"}

response = requests.post(url, headers=headers, json=data)
print(response.json())

For full parameter details, see the Text to Image and Image to Image documentation.