Media Understanding & Generation
Stravia provides two complementary media modules under Advanced Features: Media understanding (/media-understanding, Beta) and Media generation (/media-generation, Beta).
Prerequisites
- For Media understanding: At least one enabled
inferenceroute that supports image input (for Image & Document understanding) and/or audio input (for Audio understanding). - For Media generation: At least one enabled Model Route with Purpose: Image Generation (
image_generation), backed by a capable upstream target (OpenAI Codex,Antigravity,MiniMax,Alibaba Bailian,Volcengine Ark, orBytePlus ModelArk).
Steps
1. Configure Media Understanding (/media-understanding)

Media understanding maintains two separate configurations (GET /api/v1/media-understanding, saved independently via PUT /api/v1/media-understanding/{kind}):
- Image & Document understanding: Supports static JPEG, PNG, WebP images and Office documents (
DOCX,XLSX,PPTX,DOC,XLS,PPT—converted to Markdown with normalized embedded images). PDF and video files are not supported here. - Audio understanding: Supports WAV, MP3, FLAC, OGG, AAC (ADTS), and AIFF. Stravia validates MIME type and container headers without transcoding, so the selected upstream target must accept that audio format natively. Audio uses its own enable switch, logical model, and thinking level and never mixes into an image/document call.
2. Configure Media Generation (/media-generation)

- Open Advanced Features → Media generation and select an eligible
image_generationroute. - Save and enable the feature. Note that turning the toggle off keeps your bound route reference (which prevents switching that route back to
inferenceuntil you explicitly select No route selected and save). - Reference-image editing & vendor rules:
- The unified
generatetool accepts up to 5 ordered reference images (user-owned bare artifact paths or public HTTP(S) image URLs); aspect ratio and resolution act as preferences rather than guaranteed pixel dimensions. - Reference-image editing requires targets registered as supporting image input; pure prompt-to-image generation works on any image-generation target.
- Alibaba Bailian:
alibaba,alibaba-cn,alibaba-token-plan, andalibaba-token-plan-cnsupport image generation/editing (Alibaba Coding Planis excluded). - Volcengine Ark & BytePlus: Coding Plan profiles exclude non-callable image models automatically.
- The unified
3. Artifact uploads & 15-minute downloads
- Single-step upload: Clients upload raw file bytes to
POST /v1/artifactswith the file MIME inContent-Type(nomultipart/form-data), receiving{ path, mime_type, size }. - Signed downloads: Generated images return a stable
stravia://artifacts/<id>path, MIME, size, dimensions, and a 15-minute bearerdownload_urlserved viaclient_base_url(with deployment path prefix preserved). After the URL expires, retrieve the image viaStraviaReadwith:downloadrather than regenerating.
Verify
Authorize media_understanding and/or media_generation on an API key (via transparent injection or MCP) and test inspecting an image/audio file or generating an image. Check Monitor → Request history for the completed execution and returned stravia://artifacts/<id> path.
Troubleshooting
- Route missing from Media generation dropdown: Ensure the route's Purpose is set to Image Generation (
image_generation), notinference. - Audio understanding rejects file: Confirm the file uses a supported non-transcoded container (
WAV,MP3,FLAC,OGG,AAC,AIFF) and your chosen target accepts it. - Generated image preview fails after 15 minutes: The bearer
download_urlexpired; fetch the retained artifact viaStraviaRead(<artifact-path>:download) or checkclient_base_urlunder Settings.
Next
- Models, Routing & Thinking — configure
image_generationroutes and target capabilities. - Databases, Storage & Backups — configure
client_base_urland local vs. S3 artifact storage.