Skip to content

Media operators

Public

The Media family contains 5 operators. Image / audio / video generation, transcription, OCR.

Generates an image from a text prompt via OpenRouter (or any OpenAI-compatible image endpoint). Persists the image to tenant storage.

Version 1.0.0 · Semantics side_effect · Secrets OPENROUTER_API_KEY

FieldTypeRequiredDefaultDescription
modelstringnoImage model id (e.g. ‘openai/dall-e-3’).
promptstringyesText prompt describing the image to generate.
quality”standard” | “hd”no"standard"
return_b64booleannofalseAlso include the base64-encoded image bytes inline in the output.
size”256x256” | “512x512” | “1024x1024” | “1024x1792” | “1792x1024”no"1024x1024"
PortTypeRequiredDescription
inputanynoInput
PortTypeRequiredDescription
outputobjectnoImage

Extracts text from an image using a vision-capable LLM. Counts against the tenant AI budget.

Version 1.0.0 · Semantics side_effect · Visibility advanced · Secrets OPENROUTER_API_KEY

FieldTypeRequiredDefaultDescription
langstringnoOptional ISO-639 language hint for the OCR model.
modelstringnoVision-capable chat model id (e.g. ‘openai/gpt-4o-mini’).
promptstringnoOverride the instruction sent to the vision model.
source”url” | “storage”yes
storage_pathstringnoTenant storage path (required when source=storage).
urlstringnoSource URL (required when source=url). Subject to SSRF guard.
PortTypeRequiredDescription
inputanynoInput
PortTypeRequiredDescription
outputobjectnoText

Processes images, audio, or video (resize, transcribe, extract frames).

Version 1.0.0 · Semantics passthrough · Visibility advanced

FieldTypeRequiredDefaultDescription
operation”resize” | “transcribe” | “extract_frames” | “thumbnail”yes"resize"
optionsobjectno
PortTypeRequiredDescription
inputanyyesMedia
PortTypeRequiredDescription
outputanynoOutput

Transcribes audio to text via a Whisper-compatible endpoint. Counts against the tenant AI budget.

Version 1.0.0 · Semantics side_effect · Secrets OPENROUTER_API_KEY

FieldTypeRequiredDefaultDescription
filenamestringnoMultipart filename hint (e.g. ‘audio.mp3’). Some providers require an extension to detect format.
languagestringnoOptional ISO-639 language hint for the transcription model.
modelstringnoWhisper-compatible model id (e.g. ‘openai/whisper-1’).
response_format”text” | “json” | “verbose_json”no"verbose_json"
source”url” | “storage”yes
storage_pathstringnoTenant storage path (required when source=storage).
urlstringnoSource URL (required when source=url). Subject to SSRF guard.
PortTypeRequiredDescription
inputanynoInput
PortTypeRequiredDescription
outputobjectnoTranscript

Applies local image transformations (resize, re-format, strip metadata). No external API call.

Version 1.0.0 · Semantics side_effect · Idempotent

FieldTypeRequiredDefaultDescription
opsobject[]yes
source”url” | “storage”yesWhere to read the source image from.
storage_pathstringnoTenant storage path (required when source=storage).
urlstringnoSource URL (required when source=url). Subject to SSRF guard.
PortTypeRequiredDescription
inputanynoInput
PortTypeRequiredDescription
outputobjectnoImage

Every operator above is rendered from its JSON schema in /opt/glyph/schemas/operators/:

  • schemas/operators/media.generate.json
  • schemas/operators/media.ocr.json
  • schemas/operators/media.process.json
  • schemas/operators/media.transcribe.json
  • schemas/operators/media.transform.json