Skip to content
Proud to collaborate with Microsoft for Startups

media.image.generate ​

Generate an image via the org AI connection (Azure-first), persist bytes to storage, return StorageObject UUID only. Prefer media_profile_uuid (fail-closed ready profile); explicit connection/storage/bucket/model kept for back-compat.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-media
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
workflow_run_idstringNo—Parent DAG workflow run id (engine-injected when used as a step)
organization_uuidstringYes——
media_profile_uuidstringNo—Preferred: ready MediaProfile UUID. Fills AI connection + model (from AIProviderConfig) and storage/bucket. Rejects disagreeing overrides.
ai_provider_config_uuidstringNo—Filled from MediaProfile resolution (AIProviderConfig that owns default_model); echoed for provenance — not a caller override
connection_uuidstringNo—Org AI CloudConnection UUID — required unless resolved from media_profile_uuid / org default ready profile (back-compat)
storage_connection_uuidstringNo—Required unless resolved from MediaProfile (back-compat)
bucketstringNo—Required unless resolved from MediaProfile (back-compat)
promptstringYes——
modelstringNo—Deployment/model id — required unless resolved from AIProviderConfig via MediaProfile (back-compat)
sizestringNo——
qualitystringNo——
keystringNo——
nintegerNo——
register_artifactbooleanNo—Default true — write GeneratedArtifact after put
review_gatestringNo——
brandstringNo——
campaignstringNo——
purposestringNo——
session_uuidstringNo—When set, also stamp agents.cost-entry-record unit=image
produced_by_kindstringNo——
produced_by_uuidstringNo——
created_by_uuidstringNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
workflow_run_idstringNo—Parent DAG workflow run id (engine-injected when used as a step)
organization_uuidstringYes——
media_profile_uuidstringNo——
ai_provider_config_uuidstringNo——
connection_uuidstringNo—Org AI CloudConnection UUID — required unless resolved from media_profile_uuid / org default ready profile (back-compat)
storage_connection_uuidstringNo—Required unless resolved from MediaProfile (back-compat)
bucketstringNo—Required unless resolved from MediaProfile (back-compat)
promptstringYes——
modelstringNo——
sizestringNo——
qualitystringNo——
keystringNo——
nintegerNo——
register_artifactbooleanNo—Default true — write GeneratedArtifact after put
review_gatestringNo——
brandstringNo——
campaignstringNo——
purposestringNo——
session_uuidstringNo—When set, also stamp agents.cost-entry-record unit=image
produced_by_kindstringNo——
produced_by_uuidstringNo——
created_by_uuidstringNo——
storage_object_uuidstringNo——
size_bytesintegerNo——
sha256stringNo——
unitstringNo——
quantityintegerNo——
providerstringNo——
artifact_uuidstringNo——
verdictstringNo——
cost_usdstringNo——
failure_reasonstringNo—Engine-stamped human-readable failure reason
failed_atstringNo—ISO timestamp when the workflow failed
failed_at_statestringNo—Engine-stamped state when the workflow failed
failed_stepstringNo—Engine-stamped step name (DAG path)
failed_layerintegerNo—Engine-stamped layer index (DAG path)
errorstringNo—Engine-stamped exception message
error_typestringNo—Engine-stamped exception class name
completed_atstringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

Outcomes ​

OutcomeTypeDescriptionState Data Keys
completedSUCCESSMedia atom completed successfullycompleted_at
failedFAILUREMedia atom failedfailure_reason, error, error_type

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "media.image.generate",
  "initial_data": {
    "organization_uuid": "value",
    "prompt": "value"
  }
}