Generate without a Technique
Run a model straight from a prompt — no saved Technique required.
Techniques are FLORA’s superpower — saved workflows with locked-in inputs and post-processing. But sometimes you just want a raw model run: a prompt, a model, an image. For that, the agent uses client.generations.create instead of a Technique. No slug, no saved workflow.
What you type
Section titled “What you type”Generate 3 cinematic product shots of a ceramic mug on a sunlit table. Use a good image model, 4:3.
What the agent does
Section titled “What the agent does”- Resolve a workspace and project
Generations are billed to a workspace and attach to a project, so the agent first calls
client.workspaces.list()and either picks an existing project (client.projects.list(...)) or creates one withclient.projects.create(...). - Pick a model
The agent calls
client.models.list({ type: "image" })to find an availablemodel_idand the parameters it accepts (aspect ratio, seed, etc.). - Start the generation
It calls
client.generations.create(...)withtype,prompt,workspace_id,project_id, the chosenmodel, and any model-specificparams. - Poll until complete
Generations don’t have a saved-Technique run to poll, so the agent polls history:
client.generations.list(...)(newest first), matches itsrun_id, and renders theoutputsoncestatusiscompleted.
What you see
Section titled “What you see”The requested images render inline in the chat as each generation completes — same as a Technique run, just without a Technique behind them.
Techniques vs. generations
Section titled “Techniques vs. generations”| | Technique run | Generation |
| --- | --- | --- |
| Entry point | client.techniques.runs.create(techniqueId, …) | client.generations.create(…) |
| Needs a saved Technique | Yes | No |
| Inputs | The Technique’s input schema (inputs[]) | type + prompt + optional model/params |
| Best for | Repeatable, branded, multi-step workflows | One-off, ad-hoc model runs |
| Post-processing | Baked into the Technique | None — raw model output |
Under the hood
Section titled “Under the hood”async function run(client) { // 1. Resolve a workspace and a project (both required by generate) const { workspaces } = await client.workspaces.list(); const workspace_id = workspaces[0].workspace_id; const project = await client.projects.create({ name: "Quick generations", workspace_id });
// 2. Pick an image model const { models } = await client.models.list({ type: "image" }); const model = models[0].model_id;
// 3. Start the generation const gen = await client.generations.create({ type: "image", prompt: "a cinematic product photo of a ceramic mug on a sunlit table", workspace_id, project_id: project.project_id, model, params: { aspect_ratio: "4:3" }, // model-specific — see client.models.list }); console.log("Generation started:", gen.run_id);
// 4. Poll history until this run completes let result; do { await new Promise((r) => setTimeout(r, 3000)); for await (const g of client.generations.list({ workspace_id, limit: 10 })) { if (g.run_id === gen.run_id) { result = g; break; } } console.log("Status:", result?.status, result?.progress); } while (result && (result.status === "pending" || result.status === "running"));
return result?.outputs; // [{ output_id, type: "imageUrl", url }]}typemust be exactly one ofimage,video,audio, ortext— not a model family liket2iortext-to-image.modelmust be amodel_idfromclient.models.list(...). If you see “Model … is not available”, list models for the sametypeand retry with one of the returned IDs. Omitmodelto use the workspace default.workspace_idandproject_idare both required. The generation shows up on that project’s canvas in FLORA.- Output URLs are long-lived but not permanent — download anything you need to keep.
Related
Section titled “Related”- Discover and run — the saved-Technique path.
- Models — discover model IDs and their parameters.
- Tools reference — the full
client.*surface available insideexecute.