NodaroAccount
Nodaro Docs
DocumentationNode ReferenceModelsTemplatesAI Agents (MCP)DevelopersSelf-hostingResearchCompare
REST API

Prompt Wizard

Turn a rough idea into an optimized prompt over REST: ask for guided questions, build a prompt from the answers, or improve a prompt in one call.

The Prompt Wizard API turns a rough idea into an optimized prompt for a generation node. One endpoint, POST /v1/prompt-helper/wizard, does three things, chosen by the action field. It asks guided questions (analyze), builds a prompt from your answers (generate), or rewrites a prompt in one step (enhance). It is the same wizard the editor opens from the AI button on a prompt field.

The route works on every edition and takes a bearer token. Each call holds credits for one language-model call, then is charged for the tokens it used. See Authentication.

Endpoints

MethodPathactionReturns
POST/v1/prompt-helper/wizardanalyze{ jobId, questions }
POST/v1/prompt-helper/wizardgenerate{ jobId, prompt, recommendedModel? }
POST/v1/prompt-helper/wizardenhance{ jobId, prompt, recommendedModel? }

Ask for guided questions

analyze reads your idea and the target node type, and returns questions about what would most improve the prompt: the subject, the lighting, the camera, the mood and more. Each question comes with suggested answers, and the best one is selected when the wizard can tell. Omit prompt to start from scratch; the wizard then picks the key questions and selects nothing.

curl -X POST https://app.nodaro.ai/v1/prompt-helper/wizard \
  -H "Authorization: Bearer $NODARO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "analyze",
    "nodeType": "generate-image",
    "prompt": "a snow leopard on a ridge",
    "provider": "nano-banana-pro",
    "aspectRatio": "16:9"
  }'
import { createClient, StaticTokenAuth } from '@nodaro/sdk'

const client = createClient({
  baseUrl: 'https://app.nodaro.ai',
  auth: new StaticTokenAuth(process.env.NODARO_API_KEY!),
})

const { questions } = await client.promptHelper.analyze({
  nodeType: 'generate-image',
  prompt: 'a snow leopard on a ridge',
})
nodaro prompt analyze --node-type generate-image --prompt "a snow leopard on a ridge" --json

# Interactive questions and answers in the terminal:
nodaro prompt wizard --node-type generate-image --prompt "a snow leopard on a ridge"
{
  "jobId": "3b7d1f9a-5c2e-4a8b-9d6f-1e4c7a2b5d8f",
  "questions": [
    {
      "category": "lighting",
      "label": "Lighting",
      "options": [
        { "value": "golden-hour", "label": "Golden hour", "description": "Low warm sun, long shadows" },
        { "value": "overcast", "label": "Overcast", "description": "Soft, even light" },
        { "value": "blizzard", "label": "Blizzard haze", "description": "Flat light through blowing snow" }
      ],
      "selected": "golden-hour",
      "allowCustom": true
    }
  ]
}

A response holds 1 to 12 questions. Each question is { category, label, options, selected, allowCustom, multi? }:

FieldWhat it holds
categoryThe question's id. Send it back in your answer.
labelThe question, as shown to a person.
optionsThe suggested answers, each { value, label, description? }.
selectedThe suggested answer's value, a list of values when multi is true, or null when nothing is suggested.
allowCustomWhether you may answer with your own words.
multiPresent and true when several answers may be chosen.

Build a prompt from the answers

generate builds one optimized prompt from your answers. Send one selection per answered question, { category, value, isCustom }; set isCustom to true when value is your own words. Add originalPrompt to weave the original idea into the result.

curl -X POST https://app.nodaro.ai/v1/prompt-helper/wizard \
  -H "Authorization: Bearer $NODARO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "generate",
    "nodeType": "generate-image",
    "originalPrompt": "a snow leopard on a ridge",
    "selections": [
      { "category": "lighting", "value": "golden-hour", "isCustom": false },
      { "category": "camera", "value": "telephoto from below, 400mm", "isCustom": true }
    ]
  }'
const { prompt, recommendedModel } = await client.promptHelper.generate({
  nodeType: 'generate-image',
  originalPrompt: 'a snow leopard on a ridge',
  selections: [
    { category: 'lighting', value: 'golden-hour', isCustom: false },
    { category: 'camera', value: 'telephoto from below, 400mm', isCustom: true },
  ],
})
nodaro prompt generate --node-type generate-image \
  --original-prompt "a snow leopard on a ridge" \
  --selection lighting=golden-hour --selection camera="telephoto from below, 400mm" --json
{
  "jobId": "9e1a3c5b-7d2f-4b6a-8c4e-2f5d8b1a3c7e",
  "prompt": "A snow leopard stands on a rocky ridge at golden hour, low warm sun raking across its spotted coat, shot from below on a 400mm telephoto lens, snow dust drifting in the backlight.",
  "recommendedModel": {
    "provider": "nano-banana-pro",
    "field": "provider",
    "label": "Nano Banana Pro",
    "reason": "Strong fine detail for fur and snow texture."
  }
}

recommendedModel appears when the wizard can suggest a model for the target node: provider is the model id to set, label its name and reason the explanation. A node type with only one model gets no recommendation.

Improve a prompt in one call

enhance skips the questions and returns the optimized prompt directly. It takes the same fields as analyze, without selections.

curl -X POST https://app.nodaro.ai/v1/prompt-helper/wizard \
  -H "Authorization: Bearer $NODARO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "action": "enhance", "nodeType": "text-to-video", "prompt": "a paper boat in a rainy street", "duration": 5 }'
const { prompt } = await client.promptHelper.enhance({
  nodeType: 'generate-image',
  prompt: 'a snow leopard',
})
const image = await client.nodes.runAndWait('generate-image', { prompt })
PROMPT=$(nodaro prompt enhance --node-type generate-image --prompt "snow leopard" --json | jq -r '.prompt')
nodaro nodes run generate-image --param prompt="$PROMPT" --watch

Request fields

Prop

Type

An unsupported or omitted reasoningEffort uses the model's own default. advancedMode on a model that is not a Gemini or Claude model returns 400 advanced_mode_unsupported. While the model's own provider cannot take requests, advancedMode is refused with advanced_mode_unavailable instead of running on the default lane. See the Generate Text - Any LLM node for the language models.

Credits

Each call is one language-model call. It is charged for the tokens it actually used, at the rate of llmModel on the lane that served it. A hold is reserved when the call starts, and the call is then charged what it used. POST /v1/credits/model-costs returns an estimate of a typical call, with the key prompt-helper:<model>. Show it as ≈N. A guided flow costs two calls: analyze, then generate. Asking for new questions costs another call. A failed call the provider billed, such as a refusal, is charged for that usage. A failed call the provider did not bill is refunded. See How LLM calls are charged.

Use it from MCP

AI assistants use the same endpoint through analyze_prompt, generate_prompt and enhance_prompt, with the workflows:execute scope. The tools take the same fields, with advanced_mode, temperature and max_tokens for Gemini and Claude models. See the MCP tools reference.

Errors

StatusCodeMeaning
400validation_errorThe body is invalid, for example an unknown action or a generate without selections.
400advanced_mode_unsupportedadvancedMode was sent for a model that is not a Gemini or Claude model.
400advanced_mode_unavailableThe model's own provider cannot take Advanced-mode requests right now. Nothing is charged. Turn Advanced mode off to run the model.
401unauthorizedThe token is missing, invalid or revoked.
402insufficient_creditsNodaro Cloud only. The account cannot cover the call's hold.
500llm_errorThe language model call failed. It is refunded unless the provider billed it. Retry with backoff.
502advanced_mode_unavailableThe model's own provider refused the Advanced-mode call midway. It is refunded unless the provider billed the attempt. Turn Advanced mode off to run the model.
502malformed_responseThe model's answer could not be used. It is refunded unless the provider billed the call.
503provider_unavailableNo language model is configured on this instance.

Frequently asked questions

What is the difference between analyze, generate and enhance?

analyze turns a rough idea into a few guided questions with suggested answers. generate builds one optimized prompt from the answers you choose. enhance skips the questions and rewrites the prompt in a single call.

How much does the Prompt Wizard cost?

Each call is one language-model call, charged for the tokens it used at the rate of the model you choose with llmModel. A full guided flow is two calls, analyze then generate. Asking for new questions costs another call.

Does the Prompt Wizard recommend a model?

Often. generate and enhance can return recommendedModel, which names a model for the target node and says why. A node type with a single model gets no recommendation.

Which node types does the wizard support?

Generation nodes that take a prompt, such as generate-image, image-to-video and generate-music. Pass the node type as nodeType so the questions and the model recommendation fit it.

Last updated on

On this page