supra-openai

Run SupraLabs/Supra2-IMG behind the OpenAI Images API. Point the official OpenAI SDK at it, change base_url, and client.images.generate() works — on your own CPU or GPU.

105M parameters 256 × 256 native CPU or CUDA amd64 + arm64 Apache-2.0
GitHub repository GHCR image Model card

Run it

One container. Weights download on first start and are cached in the volume.

Start the server

docker run -p 8000:8000 \
  -v supra-hf:/data/hf \
  ghcr.io/sirmmo/openai-supra:latest

Generate with the OpenAI SDK

from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:8000/v1",
    api_key="not-needed",
)

result = client.images.generate(
    model="supra2-img",
    prompt="a red fox in fresh snow",
    extra_body={"seed": 42, "steps": 50},
)

Samples

Generated by this server on CPU, at the model's native 256 × 256.

Built-in web form

The server's root serves a form for prompting without any client — same API underneath.

Screenshot of the built-in generation form showing two lighthouse images

API

POST /v1/images/generations, with OpenAI's request and error shapes.

FieldSupported values
promptRequired. Flan-T5 sees the first 128 tokens.
n1–10, generated as one batch.
sizeauto / 256x256 native; other sizes are upscaled and center-cropped.
qualitylow = 20 steps, medium = 35, otherwise 50.
response_formatb64_json (default) or url.
output_formatpng, jpeg, webp.
seed, guidance_scale, stepsExtensions — send via the SDK's extra_body. A seed reproduces the same image on any device.

Also GET / (web form), /v1/models, /docs (OpenAPI) and /health. Set SUPRA_API_KEY to require Authorization: Bearer.

Good to know