'use client'; import { TipBox } from '@/components/docs/shared/TipBox'; import { Table } from '@/components/docs/shared/Table'; import { CodeBlock } from '@/components/docs/shared/CodeBlock'; import { DocPage } from '@/components/docs/layout/DocPage'; import { Hero, SectionHeader, InlineCode, EndpointCard, ResponseBlock, } from '@/components/docs/blocks'; const tocItems = [ { id: 'overview', text: 'Overview', level: 2 }, { id: 'list-flows', text: 'List Flows', level: 2 }, { id: 'get-flow', text: 'Get Flow', level: 2 }, { id: 'list-flow-generations', text: 'List Flow Generations', level: 2 }, { id: 'list-flow-images', text: 'List Flow Images', level: 2 }, { id: 'update-flow-aliases', text: 'Update Flow Aliases', level: 2 }, { id: 'remove-flow-alias', text: 'Remove Flow Alias', level: 2 }, { id: 'regenerate-flow', text: 'Regenerate Flow', level: 2 }, { id: 'delete-flow', text: 'Delete Flow', level: 2 }, { id: 'next-steps', text: 'Next Steps', level: 2 }, ]; export default function FlowsAPIPage() { return (
Overview

Flows group related generations together. They're created automatically when you chain generations using the same flowId.

Flows also support flow-scoped aliases — named references to images that are unique within a flow but don't conflict with project-level aliases.

List Flows

Retrieve all flows for your project with computed counts.

Query Parameters

limit, 'number', 'Results per page (default: 20, max: 100)'], [offset, 'number', 'Number of results to skip'], ]} />

Example Request

Response

Get Flow

Retrieve a single flow with detailed statistics.

Example Request

List Flow Generations

Retrieve all generations in a specific flow.

Example Request

List Flow Images

Retrieve all images (generated and uploaded) in a flow.

Example Request

Update Flow Aliases

Add or update flow-scoped aliases. Aliases are merged with existing ones.

Request Body

aliases, 'object', 'Key-value pairs of aliases to add/update'], ]} />

Example Request

Remove Flow Alias

Remove a specific alias from a flow.

Example Request

Regenerate Flow

Regenerate the most recent generation in the flow.

Example Request

Delete Flow

Delete a flow with cascade deletion. Images with project aliases are preserved.

Example Request

Deleting a flow removes all generations and images in it. Images with project aliases are preserved (unlinked from the flow).
); }