Copyable production clients.

Image API integration guides

FastAPI and Python image API patterns — typed requests, dimension normalization, idempotency, bounded retries, and stable errors you can map in code.

How to use these guides

Make client behavior boring while providers stay interesting.

One endpoint, one auth method, one error envelope, one idempotency rule. Provider credentials and model aliases stay behind the server. Thin clients. Fat control plane.

01

Server only

Generate from trusted backend code — never ship keys to browsers.

02

Retry safely

Retry transient work with idempotency; stop on invalid or policy errors.

03

Observe

Capture request ID, final size, route, duration, fallback state.

From guide to request

Use one contract across the image route.