Choose your path¶
Imagegen Bridge exposes the same generation contract through a CLI, a private HTTP service, a dashboard, and typed SDKs. Start with the surface that matches how you plan to use it.
Local command line¶
Choose the CLI when one person is generating or editing images on one machine. It guides the initial setup, verifies the existing Codex login, and writes validated image files directly to disk.
cargo install imagegen-bridge-cli
codex login
imagegen-bridge setup
imagegen-bridge doctor
imagegen-bridge generate "A paper fox on a charcoal background" \
--output first-image.png
Continue with the command-line guide.
Private service¶
Choose Docker when applications, agents, or several machines need one stable endpoint. The service adds bearer authentication, streaming, durable jobs, artifacts, metrics, and the embedded dashboard.
mkdir imagegen-bridge && cd imagegen-bridge
curl --fail --location --remote-name \
https://raw.githubusercontent.com/Crimsab/imagegen-bridge/main/compose.package.yaml
install -d -m 0700 ./codex-home
install -m 0600 "${CODEX_HOME:-$HOME/.codex}/auth.json" ./codex-home/auth.json
sudo chown -R 10001:10001 ./codex-home
umask 077
printf 'IMAGEGEN_BRIDGE_BEARER_TOKEN=%s\n' "$(openssl rand -hex 32)" > .env
docker compose -f compose.package.yaml up -d
Read the Docker quickstart before binding outside host loopback.
Application integration¶
Use an SDK when your application needs typed requests, streaming events, deadlines, jobs, or structured errors.
Continue with the SDK guide.
Before the first live generation¶
- Confirm that
codex loginsucceeds for the account you intend to use. - Run
imagegen-bridge doctorwithout a live probe. - Inspect provider capabilities rather than assuming model features.
- Keep the HTTP listener on loopback unless bearer authentication is enabled.
- Treat OAuth state and the bridge bearer as separate credentials.
The non-generating checks do not consume image allowance. A live probe does, and the CLI asks for confirmation before running one.