@nhtio/adk/batteries/generation/openai/adapter
Cross-environment OpenAI media generation adapter battery.
Remarks
Opinionated media-generation battery for the OpenAI /v1/images/generations and /v1/images/edits wire shapes. Ships an OpenAIGenerationAdapter that targets any OpenAI-/v1/images-compatible endpoint (OpenAI proper, Azure-behind-proxy, a local gateway, etc.) over raw fetch — no SDK dependency, so it runs unchanged in Node, the browser, edge runtimes, and workers.
Construction validates options eagerly via @nhtio/adk/batteries/generation/openai/validation!validateOptions and throws @nhtio/adk/batteries/generation/openai/exceptions!E_INVALID_OPENAI_GENERATION_OPTIONS on failure — config bugs fail loud, not at generate/edit time.
Classes
| Class | Description |
|---|---|
| OpenAIGenerationAdapter | Media generation adapter for the OpenAI /v1/images/generations and /v1/images/edits wire shapes. |
Variables
| Variable | Description |
|---|---|
| EDIT_IMAGE_FIELD_NAME | The multipart field name used for each image appended to an /v1/images/edits request. |