Skip to main content

FluxPrompt API Reference

Invoke any agent via REST API, Email, or Webhook. All methods share the same input structure — pass data through the Data Input node and receive results from the Data Output node.

Updated over a week ago

Authentication

All API calls require your API key passed as a request header. Generate your key under Settings → API Keys.

Header Key

Header Value

api-key

your_api_key_here

⚠️ Never expose your API key in client-side code or public repositories. Rotate keys immediately if compromised.


Endpoint & Input ID Configuration

Each agent's endpoint URL, email address, and input node IDs are unique to that flow. Open the Flow Global Node in your agent's settings to find:

  • The full endpoint URL (includes the flowId)

  • The exact inputId for every Data Input node in the flow

  • A pre-populated example request body

⚠️ inputId values are unique to each flow — they cannot be reused across agents. Always copy them from the Flow Global Node.


Sessions & Memory

The sessionId parameter is a core part of how FluxPrompt handles multi-user agents, chatbots, and any flow where memory needs to be isolated per user, client, or conversation.

How it works

When your agent uses a memory node, FluxPrompt stores and retrieves context scoped to the sessionId you pass. Every call made with the same sessionId shares the same memory thread — the agent can recall previous messages, extracted data, or any information stored during that session.

Without a sessionId, all calls to the agent share a single global memory context, which is rarely the right behaviour for multi-user applications.

When to use it

Scenario

Recommendation

Chatbot serving multiple users

Required — pass a unique sessionId per user

Multi-tenant application

Required — pass a unique sessionId per client/tenant

Single-user or one-shot extraction

Optional — can be omitted

Maintaining conversation history

Required — use a consistent ID per conversation

Setting the sessionId

Pass sessionId as a query parameter on every request where session continuity matters. The value can be any string — use whatever identifier is meaningful in your application.

POST https://api.fluxprompt.ai/flux/api-v2?flowId={flowId}&sessionId={sessionId}

Static session (e.g. a named client)

?flowId=a176fb62-dc8c-485c-bf25-9bf9139a5c1a&sessionId=RestaurantOct

Dynamic session (e.g. per logged-in user)

?flowId=a176fb62-dc8c-485c-bf25-9bf9139a5c1a&sessionId=${userId}

Dynamic session per conversation

?flowId=a176fb62-dc8c-485c-bf25-9bf9139a5c1a&sessionId=${conversationId}

Key rules

  • The sessionId is case-sensitiveUser_123 and user_123 are treated as separate sessions

  • Sessions persist until cleared — memory accumulated in a session carries forward on every subsequent call with that same ID

  • There is no hard limit on how many sessions an agent can maintain

  • To reset a session, simply start using a new sessionId

💡 A good pattern for chatbots is to generate a sessionId when a user starts a conversation and store it client-side for the duration of that chat thread.


REST API

Query Parameters

Parameter

Type

Required

Description

flowId

string

Required

The unique ID of the agent flow to invoke. Found in the Flow Global Node.

sessionId

string

Optional

Session identifier for memory scoping. See Sessions & Memory.

Headers

Key

Value

api-key

sk-flux-xxxxxxxxxxxxxxxx

Content-Type

application/json

Example

bash

curl -X POST \   "https://api.fluxprompt.ai/flux/api-v2?flowId=a176fb62-dc8c-485c-bf25-9bf9139a5c1a&sessionId=MySession_Oct" \   -H "api-key: sk-flux-xxxxxxxxxxxxxxxx" \   -H "Content-Type: application/json" \   -d '{     "variableInputs": [       {         "inputId": "varInputNode_1769719132696_0.4717",         "inputText": "Summarise the key points from this document."       }     ]   }'

Webhook

Same query parameters and JSON body as the REST API. Returns 200 OK on successful receipt.

Query Parameters

Parameter

Type

Required

Description

flowId

string

Required

The unique ID of the agent flow to invoke.

sessionId

string

Optional

Session identifier for memory scoping.

Headers

Key

Value

api-key

sk-flux-xxxxxxxxxxxxxxxx

Content-Type

application/json

Response

Code

Description

200 OK

Request received successfully.


Email

Send an email to the agent's generated address. No API key required — authentication is handled via the unique address.

  • The agent's full email address is shown in the Flow Global Node settings

  • Each agent has a unique, immutable address

  • The email subject maps to the first input node

  • The email body maps to the input node content


Request Body

All API and Webhook calls use a JSON body with a single top-level field: variableInputs — an array of input objects, one per Data Input node you want to populate.

Minimal example

json

{   "variableInputs": [     {       "inputId": "varInputNode_1769719132696_0.4717",       "inputText": "Your text content here"     }   ] }

💡 Include multiple objects in variableInputs to populate several input nodes in a single call. Each inputId is unique to the flow — find yours in the Flow Global Node.


variableInputs Fields

Each object in the variableInputs array targets a specific Data Input node.

Field

Type

Required

Description

inputId

string

Required

The unique ID of the target Data Input node. This value is specific to your flow — copy it from the Flow Global Node.

inputText

string

Required

The primary text content to be processed by the agent.

links

array

Optional

Array of URL objects. Use links or files — not both. See Links & Files.

files

array

Optional

Array of base64-encoded file objects. Use files or links — not both. isExtraction is required when using this field. See Links & Files.

isExtraction

boolean

Required when using files

Must be true when passing files.

typeOCR

string

Optional

OCR engine for processing attached files. Defaults to mistral_ocr. See OCR Options.


Links & Files

Pass either links or files on a given input — not both.

links[ ]

Use links to pass URLs for the agent to retrieve and process.

Field

Type

Description

name

string

Descriptive label for the link (e.g. "Source article").

url

string

Fully qualified URL including protocol (e.g. "https://example.com/page").

Example

json

{   "inputId": "varInputNode_1769719132696_0.4717",   "inputText": "Summarise this page.",   "links": [     {       "name": "Product page",       "url": "https://example.com/product"     }   ] }

files[ ]

Use files to pass base64-encoded file content directly. isExtraction: true is required when using this field.

Field

Type

Description

name

string

File name including extension (e.g. "invoice.pdf", "photo.jpg").

base64

string

File content encoded as a Base64 string.

Example

json

{   "inputId": "varInputNode_1769719132696_0.4717",   "inputText": "Extract all line items from this invoice.",   "isExtraction": true,   "typeOCR": "google_ocr_form_parse",   "files": [     {       "name": "invoice.pdf",       "base64": "JVBERi0xLjQKJc..."     }   ] }

OCR Options

Use typeOCR to control how attached files are read. Only applies when using files.

Value

Description

mistral_ocr

Default. Fast, high-quality OCR via Mistral. Best for standard PDFs, scanned documents, and printed text.

mistral_vision

Uses Mistral's vision model. Better for complex layouts or mixed image and text content.

google_ocr

Google Cloud Vision OCR. Excellent multilingual support and handwriting recognition.

google_ocr_form_parse

Google Document AI form parser. Optimised for invoices, receipts, and key-value extraction from structured forms.


Memory Pods

Memory Pods let you manage persistent document-based memory that agents can reference. The following endpoints allow you to add, replace, and delete documents within a pod.

💡 Your Pod ID is found in your FluxPrompt settings.


Get Memory Pods

GET /flux/memory-pods/get

Returns a list of all memory pods available to your account.


Add Document to Pod

POST /flux/memory-pods/{podId}/add-document

Upload a new document into a memory pod.

Parameter

Type

Location

Description

podId

string

path

The ID of the memory pod.


Replace Document in Pod

PUT /flux/memory-pods/{podId}/replace-document

Replace an existing document in a memory pod with a new one.

Parameter

Type

Location

Description

podId

string

path

The ID of the memory pod.

Request body

json

{   "newFileUrl": "string",   "oldFileName": "string",   "newFileName": "string" }

Field

Type

Description

newFileUrl

string

URL of the replacement file.

oldFileName

string

File name of the document to be replaced.

newFileName

string

File name for the new document.


Delete Document from Pod

DELETE /flux/memory-pods/{podId}/delete-document

Remove a document from a memory pod.

Parameter

Type

Location

Description

podId

string

path

The ID of the memory pod.


Full Request Example

A complete request body using all available fields across two input nodes.

json

{   "variableInputs": [     {       "inputId": "varInputNode_1769719132696_0.4717",       "inputText": "Extract all line items from the attached invoice.",       "isExtraction": true,       "typeOCR": "google_ocr_form_parse",       "files": [         {           "name": "invoice.pdf",           "base64": "JVBERi0xLjQKJc..."         }       ]     },     {       "inputId": "varInputNode_1769719379599_0.0454",       "inputText": "Vendor: Acme Corp. PO Number: 8821."     }   ] }

Full request URL with session

POST https://api.fluxprompt.ai/flux/api-v2?flowId=a176fb62-dc8c-485c-bf25-9bf9139a5c1a&sessionId=MySession_Oct

ℹ️ The inputId values above are from a staging flow. Your flow will have different IDs — always copy them from your Flow Global Node.

Did this answer your question?