Ruwana Developer Documentation

Image API: Creative, Product and Polish.

The Image API exposes three distinct production contracts. Creative can run from JSON or visual references; Product and Polish require exactly one uploaded source image.

Endpoint contracts

ModeEndpointReference rulePrompt
CreativePOST /v1/lab/creative0 refs with JSON; 1–16 with multipartRequired
ProductPOST /v1/lab/productExactly 1 multipart imageOptional
PolishPOST /v1/lab/polishExactly 1 multipart imageOptional

Common fields

FieldValuesDefault / rule
resolution1K · 2K · 4K1K
aspect1:1 · 3:2 · 4:5 · 9:16 · 16:91:1
count1–4 integer1
references[]PNG · JPEG · WebPMultipart only; max 16 MB each
Idempotency-Key8–128 charactersRequired header

Pricing and delivery

Mode1K2K4K
Creative$0.12$0.14$0.16
Creative + references$0.15$0.17$0.19
Product$0.15$0.17$0.19
Polish$0.15$0.17$0.19

Per output. Delivery: 1K PNG; 2K PNG + TIFF; 4K PNG + TIFF + DNG rendered-pixel derivative.

Creative — JSON example

cURL
curl https://platform.ruwana.studio/v1/lab/creative \
  -H "Authorization: Bearer $RUWANA_API_KEY" \
  -H "Idempotency-Key: creative-001" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"Editorial still life with restrained luxury lighting","resolution":"1K","aspect":"4:5","count":1}'
Node.js
const response = await fetch('https://platform.ruwana.studio/v1/lab/creative', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer ' + process.env.RUWANA_API_KEY,
    'Idempotency-Key': 'creative-001',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    prompt: 'Editorial still life with restrained luxury lighting',
    resolution: '1K', aspect: '4:5', count: 1
  })
});
console.log(await response.json());
Python
import os, requests

response = requests.post(
    'https://platform.ruwana.studio/v1/lab/creative',
    headers={
        'Authorization': 'Bearer ' + os.environ['RUWANA_API_KEY'],
        'Idempotency-Key': 'creative-001'
    },
    json={
        'prompt': 'Editorial still life with restrained luxury lighting',
        'resolution': '1K', 'aspect': '4:5', 'count': 1
    }
)
print(response.json())

Product and Polish — multipart examples

# Product
curl https://platform.ruwana.studio/v1/lab/product \
  -H "Authorization: Bearer $RUWANA_API_KEY" \
  -H "Idempotency-Key: product-001" \
  -F "references[]=@product.webp" \
  -F "prompt=Clean premium catalog composition" \
  -F "resolution=2K" -F "aspect=4:5" -F "count=1"

# Polish
curl https://platform.ruwana.studio/v1/lab/polish \
  -H "Authorization: Bearer $RUWANA_API_KEY" \
  -H "Idempotency-Key: polish-001" \
  -F "references[]=@source.jpg" \
  -F "resolution=2K" -F "count=1"