Image generation and edit

Two endpoints for epithre-iris:

Image generation and editing model with a 3-LoRA style registry.

Generation: POST /v1/images/generations

Request body

Field Type Required Description
model string yes Must be epithre-iris.
prompt string yes Max 2000 chars. English works best; Indonesian also supported.
size string no "WxH", max 960x960. Default 768x768. Rounded down to multiple of 16.
n int no Currently fixed at 1.
response_format string no "b64_json" (default and only supported).
num_steps int no 1-50, default 4. More steps means slower but slightly higher quality.
seed int no Seed for reproducibility. -1 = random.
guidance_scale float no Default 1.0. Higher = more literal prompt adherence.
lora string no "none" (default), "dark" (moody/cinematic), "anime".
lora_strength float no 0.0-1.5, default 0.6 (for non-none LoRAs).

Response shape

{
  "created": 1778455000,
  "data": [
    {"b64_json": "iVBORw0KGgoAAAANSUhEUgAA..."}
  ]
}

Example

resp = client.images.generate(
    model="epithre-iris",
    prompt="a serene Indonesian beach at sunset, photorealistic, golden hour",
    size="768x768",
)

import base64
open("output.png", "wb").write(base64.b64decode(resp.data[0].b64_json))

Anime LoRA

resp = httpx.post(
    "https://api.epithre.com/v1/images/generations",
    headers={"Authorization": f"Bearer {EPITHRE_KEY}"},
    json={
        "model": "epithre-iris",
        "prompt": "a young samurai in a bamboo forest, cherry blossoms falling",
        "size": "768x768",
        "lora": "anime",
        "lora_strength": 0.8,
        "seed": 42,
    },
).json()

Latency

~12-19 seconds for 768x768 at 4 steps. Anime LoRA adds ~5s. For preview / iteration, use 4 steps. For final renders, 20-30 steps.

Edit: POST /v1/images/edits

Request body

Field Type Required Description
model string yes epithre-iris.
prompt string yes Edit instruction (e.g., "change background to sunset").
image string (base64) conditional Single source image. Mutually exclusive with images.
images array conditional 1-5 reference images for compositional editing. Mutually exclusive with image.
size string no Max 704x704 for edit. Default matches input.
strength float no 0.0-1.0, default 0.75. Higher means bigger change from source.
num_inference_steps int no 1-50, default 4. Also accepts num_steps as an alias (matching generation).
lora string no Same options as generation.

Response shape

Same as generation: {"created", "data": [{"b64_json"}]}.

Image format requirements

Example: single-image edit

import base64
src = base64.b64encode(open("original.png", "rb").read()).decode()

resp = httpx.post(
    "https://api.epithre.com/v1/images/edits",
    headers={"Authorization": f"Bearer {EPITHRE_KEY}"},
    json={
        "model": "epithre-iris",
        "prompt": "change the sky to dramatic stormy clouds with lightning",
        "image": src,
        "size": "512x512",
        "strength": 0.7,
    },
).json()

Example: multi-reference compositing

imgs = [base64.b64encode(open(f"ref_{i}.png", "rb").read()).decode()
        for i in range(3)]

resp = httpx.post(
    "https://api.epithre.com/v1/images/edits",
    headers={"Authorization": f"Bearer {EPITHRE_KEY}"},
    json={
        "model": "epithre-iris",
        "prompt": "the product from image 1, displayed in the studio setting from image 2, in the photography style of image 3",
        "images": imgs,
        "size": "640x640",
    },
).json()

Errors

HTTP Cause
400 Bad params, invalid base64, wrong magic bytes, missing prompt.
413 Body exceeds 50 MB.
504 Generation took too long. Rare.

Pricing

Rp750 per image (generation or edit). See pricing.

See also