Generate a flow
Drafts a graph from a plain-language brief (up to 20,000 characters), from examples (2–10 {"transcript": …} objects, as Transcribe returns them), or both. Send an existing graph as flow to revise it instead. Nothing is saved: you get the graph, the call variables it reads, and a matching input_schema to save with it.
model is gemini-3.8-flash (the default), claude-opus-5.5 or gpt-6-sol. A draft takes 15–60 seconds, longer with examples.
This charges your wallet at the model’s cost plus 20%, including a draft that stays invalid after three attempts (422). 30 drafts per workspace per hour.
Authorizations
Your workspace secret key, sk_live_ followed by 32 hex characters. Create one in the console under Developers.
Body
- Option 1
- Option 2
At least one of brief or examples.
What the agent does, in plain language: who it talks to, what it says and asks, how each answer is handled, what to record and the language. Up to 20,000 characters, so a structured specification written elsewhere fits. Optional when examples are given. Treated as the request, never as instructions to the API.
1 - 20000Example calls: transcripts of the business's real calls, to learn the flow from (POST /v2/agents/flow/transcribe turns a recording into one). 2-10 of them, together at most 200,000 characters. The brief wins where they disagree; personal data in them is never copied.
2 - 10 elementsOptional graph to revise, as GET /v2/agents/{id}/flow returns it. Validated like PUT /flow (400 invalid_flow). The draft keeps what the brief does not ask to change.
Optional language code or name for the spoken lines (for example hi, en or Hinglish). Without it the brief decides.
32The model that drafts: gemini-3.8-flash (Gemini 3.8 Flash), claude-opus-5.5 (Claude Opus 5.5) or gpt-6-sol (GPT-6 Sol). Each is charged at the provider's cost plus 20% (its published per-token rates when the provider reports no cost). Omitted: gemini-3.8-flash.
gemini-3.8-flash, claude-opus-5.5, gpt-6-sol Response
A draft (not saved)
What the generation cost, charged to the workspace wallet once as a flow_generation transaction: the provider-reported cost of every model round × ₹88 × 1.2 (a round the provider reported no cost for at the model's per-token rates), rounded up once to a paisa. A balance smaller than the charge is taken to zero, never below.
The draft graph, defaults materialised. It passes every rule PUT /v2/agents/{id}/flow applies. Not saved.
The draft's flow revision: the same graph saved has the same revision.
The generation id: the reference of its wallet transaction (kind flow_generation). Quote it in a support request.
^fgen_[0-9A-Z]{26}$The variables as an agent input_schema, ready to save beside the flow. Every variable a node reads is required.
The model that drafted it.
gemini-3.8-flash, claude-opus-5.5, gpt-6-sol Model calls the draft took: 1 when the first answer was valid, at most 3 (two repair rounds).
1 <= x <= 3The tokens every model round that answered used, summed (estimated at four bytes a token for a round the provider reported no usage for). The ledger row's quantity.
Call variables: values the business supplies before the call, read by the graph as {{name}}.
32