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
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 language code or name for the spoken lines (for example hi, gu, en or Hinglish). Without it the language is read from the brief, the example calls and a flow being revised (the Indian script they are written in, a language they name, or a language they are typed in with English letters), plain English text with no Indian words reads as English, and with nothing to go on no language is set and the brief decides, as before. Every Indian language is written in its own script (Gujarati in Gujarati script, Hindi and Marathi in Devanagari, and so on), English words in Latin letters, never romanized: text-to-speech reads Latin letters with English sounds.
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 language the draft's spoken lines are written in, as a code (hi, gu, en, ta, …): read from its greetings and quoted lines, or the request's language when they do not say (empty when neither says) (a language name this API does not know is returned as sent). Use it for the agent's language.