pipeline.route
Send each input through its image, audio, video, or document branch. Unmatched branches create no jobs and consume no credits.
Config
type PipelineRouteConfig = {
prefix: 'image' | 'audio' | 'video' | 'document'; // default 'image'
};Choose a media family exposed by ROUTE_PREFIX_OPTIONS. Editors render this field as a select, not free text. Every supported MIME type in that family follows the same route.
Example
lib/pipelines.ts
const pipeline = {
nodes: [
{ id: 'in', type: 'pipeline.input' },
{ id: 'pdf', type: 'pipeline.route',
config: { prefix: { value: 'document' } } },
{ id: 'to-md', type: 'document.convert',
config: { format: { value: 'md' } } },
{ id: 'markdown', type: 'pipeline.output' },
{ id: 'png', type: 'pipeline.route',
config: { prefix: { value: 'image' } } },
{ id: 'to-jpg', type: 'image.convert',
config: { format: { value: 'jpg' } } },
{ id: 'jpeg', type: 'pipeline.output' },
],
edges: [
{ source: 'in', target: 'pdf' },
{ source: 'pdf', target: 'to-md' },
{ source: 'to-md', target: 'markdown' },
{ source: 'in', target: 'png' },
{ source: 'png', target: 'to-jpg' },
{ source: 'to-jpg', target: 'jpeg' },
],
};Routed inputs need a known content type. Pass
contentType or a filename with a recognized extension. A file with no matching route fails before upload. Raw API calls receive 400 no_matching_route.