media.profile.setup
Create or update a MediaProfile: validate AIProviderConfig, ensure media bucket via storage.media-bucket.ensure, storage put/delete probe, and paid image smoke. Marks status=ready only when smoke succeeds.
Overview
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-media |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | string | Yes | — | — |
name | string | Yes | — | — |
ai_provider_config_uuid | string | Yes | — | — |
storage_connection_uuid | string | Yes | — | — |
bucket | string | Yes | — | — |
key_prefix | string | No | — | — |
size | string | No | — | Soft default size written onto the profile |
quality | string | No | — | — |
review_gate | string | No | — | — |
is_default | boolean | No | — | — |
create_bucket_if_missing | boolean | No | — | Default true — run storage.media-bucket.ensure |
media_profile_uuid | string | No | — | Optional — update an existing profile instead of create-by-name |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | string | Yes | — | — |
name | string | Yes | — | — |
ai_provider_config_uuid | string | Yes | — | — |
storage_connection_uuid | string | Yes | — | — |
bucket | string | Yes | — | — |
key_prefix | string | No | — | — |
size | string | No | — | Soft default size written onto the profile |
quality | string | No | — | — |
review_gate | string | No | — | — |
is_default | boolean | No | — | — |
create_bucket_if_missing | boolean | No | — | Default true — run storage.media-bucket.ensure |
media_profile_uuid | string | No | — | — |
created | boolean | No | — | — |
status | string | No | — | — |
checks | json | No | — | — |
profile | json | No | — | — |
smoke_storage_object_uuid | string | No | — | — |
failure_reason | string | No | — | Engine-stamped human-readable failure reason |
failed_at | string | No | — | ISO timestamp when the workflow failed |
failed_at_state | string | No | — | Engine-stamped state when the workflow failed |
failed_step | string | No | — | Engine-stamped step name (DAG path) |
failed_layer | integer | No | — | Engine-stamped layer index (DAG path) |
error | string | No | — | Engine-stamped exception message |
error_type | string | No | — | Engine-stamped exception class name |
completed_at | string | No | — | — |
States
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
Outcomes
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
completed | SUCCESS | Media atom completed successfully | completed_at |
failed | FAILURE | Media atom failed | failure_reason, error, error_type |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "media.profile.setup",
"initial_data": {
"organization_uuid": "value",
"name": "value",
"ai_provider_config_uuid": "value",
"storage_connection_uuid": "value"
}
}