Interface: OpenAIGenerationAdapterOptions
Defined in: src/batteries/generation/openai/types.ts:81
Constructor options for @nhtio/adk/batteries/generation/openai/adapter!OpenAIGenerationAdapter.
Remarks
Extends BaseGenerationAdapterOptions with the HTTP transport fields plus OpenAI's image-generation-specific knobs.
Extends
Properties
| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
apiKey? | string | Bearer token. Sent as Authorization: Bearer <apiKey> unless overridden by headers. | - | src/batteries/generation/openai/types.ts:83 |
background? | "auto" | "transparent" | "opaque" | Default background handling, applied when a call omits its own background. | - | src/batteries/generation/openai/types.ts:101 |
baseURL? | string | API base URL. Default https://api.openai.com/v1. A trailing slash is trimmed. | - | src/batteries/generation/openai/types.ts:85 |
fetch? | { (input: URL | RequestInfo, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | Custom fetch implementation. Default globalThis.fetch. | - | src/batteries/generation/openai/types.ts:89 |
headers? | Record<string, string> | Extra request headers. Override built defaults (including Authorization) key-by-key. | - | src/batteries/generation/openai/types.ts:87 |
model | string | Model id to generate/edit images with. Required, no default. For OpenAI this is e.g. gpt-image-1 or dall-e-3. | BaseGenerationAdapterOptions.model | src/batteries/generation/openai/types.ts:71 |
outputFormat? | "png" | "jpeg" | "webp" | Default output image format, applied when a call omits its own outputFormat. | - | src/batteries/generation/openai/types.ts:99 |
quality? | "auto" | "low" | "medium" | "high" | Default rendering quality, applied when a call omits its own quality. | - | src/batteries/generation/openai/types.ts:97 |
requestTimeoutMs? | number | Per-request handshake timeout in ms. 0/unset disables the timeout. | - | src/batteries/generation/openai/types.ts:93 |
responseFormatMode? | "auto" | "omit" | "send" | Controls whether the request body includes response_format: 'b64_json'. Remarks - 'auto' (default) — include it only when model starts with 'dall-e'. dall-e-* models default to returning a hosted URL unless told otherwise; gpt-image-* models always return base64 and reject the parameter. - 'send' — always include it, regardless of model. - 'omit' — never include it. | - | src/batteries/generation/openai/types.ts:112 |
retry? | GenerationRetryConfig | Retry/backoff configuration. Default: a single attempt (no retry). | - | src/batteries/generation/openai/types.ts:91 |
size? | string | Default image size (e.g. '1024x1024'), applied when a call omits its own size. | - | src/batteries/generation/openai/types.ts:95 |