Build a recipe
Turn an empty Recipe node (type RecipeNode, added with canvas_edit) into a reusable recipe: describe the workflow in prompt and Fuser builds it, saves it to your library as a private draft and pins the node to it, with named input and output sockets. Use it when the user asks for a recipe or a workflow they will reuse; for a one-off, build the nodes with canvas_edit. Call it again without prompt to check on a build. Once built, set its inputs and wire its sockets with canvas_edit, then run it like any node.
/v1/recipe_buildrecipe_buildTry it
{
"status": "building",
"revision": 1,
"next": "example next",
"recipe": {
"recipeKey": "example recipe key",
"version": 1,
"title": "Coral reef poster",
"inputs": [
{
"socket": "tool2_in_image",
"name": "Example",
"type": "OpenAIGPTImageNode"
}
],
"outputs": [
{
"socket": "tool2_in_image",
"name": "Example",
"type": "OpenAIGPTImageNode"
}
]
},
"buildCredits": 13.1
}Example
curl -X POST https://api.fuser.studio/v1/recipe_build \
-H "x-api-key: $FUSER_API_KEY" \
-H "content-type: application/json" \
-d '{
"canvasId": "3f2b8c1e-7a4d-4e9b-9c2a-5d6e7f8a9b0c",
"nodeId": "aB3dE5"
}'const result = await fuser.recipe.build({
canvasId: '3f2b8c1e-7a4d-4e9b-9c2a-5d6e7f8a9b0c',
nodeId: 'aB3dE5',
});See the TypeScript SDK.
Input
canvasIdstringrequiredThe canvas id. Pass it to canvas_get, canvas_edit and run_start.
nodeIdstringrequiredThe empty Recipe node (type RecipeNode).
promptstringThe workflow in plain words, with what goes in and what comes out: "a product photo and a tagline in, three ad sizes out". Leave it out to check on a build.
waitSecondsintegerdefault45Wait up to this long (at most 45) for the build. Builds usually take 10–30 seconds; call again without prompt to keep waiting.
Output
status"building" | "built" | "failed" | "refused" | "unbuilt"revisionnumberThe canvas revision after this call. Pass it as expectedRevision on your next canvas_edit.
nextstringbuildCreditsnumberCredits the latest build of this node charged: building a recipe is billed per model call, also when it fails. Count it in what you tell the user they spent.
errorstring
Find a recipe
Search the canvas's recipe library (recipes you or your workspace made) and Fuser's featured recipes by title and description, matching any of your words, best first. A recipe is a whole saved workflow in one Recipe node, with named input and output sockets. Place a match with canvas_edit (a RecipeNode with its recipeKey), then wire and set its sockets by name and run it. For a common workflow, look here before building it node by node.
Save nodes as a recipe
Save some of the canvas's nodes as a recipe in your library (a private draft), so the workflow can be reused as one Recipe node. Nodes that feed the selection from outside it become the recipe's inputs, and its last results its outputs. The nodes stay on the canvas as they are. Place the recipe anywhere later with canvas_edit (a RecipeNode with its recipeKey). To change a recipe of yours that is still a private draft, pass its recipeKey: the nodes become its next version (its name and tags stay), and canvases using it show Update available.