Skip to content
API reference

effect

Import
import * as api from "@fungi.computer/darkroom/effect";
Kind Export Description
function runMediaGeneration() Validate, admit, dispatch and save one generation against host. Shared by the /generate Hono route and the Agent image tool so both run the exact same admission, billing and destination-write sequence.

runMediaGeneration()function

Section titled “runMediaGeneration()”
Signature
function runMediaGeneration(
host,
request,
signal?,
): Effect<MediaGenerationOutcome, MediaSettingsError | MediaExecutionError>;

Validate, admit, dispatch and save one generation against host. Shared by the /generate Hono route and the Agent image tool so both run the exact same admission, billing and destination-write sequence.

Parameter Type
host MediaServiceHost
request MediaGenerationRequest
signal? AbortSignal

Effect<MediaGenerationOutcome, | MediaSettingsError | MediaExecutionError>