Skip to main content

Upload input asset to a flow

Add input assets to a created flow that hasn't started yet.

Requirements:

  • Flow must be in 'created' state (not yet started)
  • Input MIME type must match template's allowed input types

Input Format: Assets must be provided as data URIs with structure: data:[MIME-type];base64,[base64-data]

  • Images: data:image/png;base64,iVBORw0KGgo...
  • Text prompts: Plain text string without data URI prefix

For detailed examples and helper functions on how to format and upload input assets, see: https://docs.generio.ai/examples

Additional Metadata: Optional additional field can store custom metadata that will be:

  • Attached to the input asset
  • Copied to corresponding output assets
  • Useful for tracking or identifying specific inputs/outputs

Use Case: This endpoint is used when flows are created without initial inputs (via POST /flows). After adding all required inputs, start the flow using PATCH /flows/{flow_id} with action 'start'.

Restrictions: Once a flow has started, no additional inputs can be added.

info

This endpoint allows you to upload input asset to a flow.

Endpoint

POST https://flows.generio.ai/flows/{flow_id}/inputs

Parameters

flow_id (required)

  • Location: path
  • Type: string

Request Body

Properties

  • data (string): Base64 encoded data (e.g., 'data:image/png,base64;...')
  • additional (any): Optional additional user data that is stored with flow.

Responses

200

Successful Response

422

Validation Error

Code Examples

Copy and run these examples in your terminal or code editor. Make sure to replace YOUR_TOKEN with your actual authentication token.

curl -X POST "https://flows.generio.ai/flows/{flow_id}/inputs" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"