prompt_spark
GenerationPrompt Spark
Rewrite an idea or draft prompt into on-model prompts with Scenario Prompt Spark v3, plus schema-valid parameters — ready-to-run calls for model_run. Prompt Spark is a deliberate rewriter: it conditions on the model's prompt standards, training examples, and input signature, and on how the model is used on the platform. It preserves the subject and intent of your input but regenerates the wording. Best when the prompt is short or underspecified, or when you want model-tuned parameter suggestions. Its output is a suggestion — adopt recommended_call as-is, edit its prompt, or keep only the parameters.
Args:
- model_id: required — the model the generated prompt and parameters are for
- prompt: optional — draft prompt or user intent to rewrite into an on-model prompt; always pass it when you have one (omitting it makes Prompt Spark invent an idea from the model context alone)
- images: optional — image asset IDs or data URLs to condition the prompt (e.g. references)
- num_results: optional — number of variants (1–5), default 1
- dry_run: optional — true returns the cost estimate without running or charging credits
- team_id, project_id: required for OAuth callers
Returns: prompt variants plus recommended_call, a ready-to-run suggestion. Use recommended_call.parameters as the model_run parameters (model_id=recommended_call.model_id), as-is or after editing — they already include the rewritten prompt. recommended_prompt is the prompt text alone.
Examples:
- "Improve this prompt for a custom model" -> model_id="model_xxx", prompt="a fast vehicle"
- "Propose on-model prompts from a reference" -> model_id="model_xxx", images=["asset_xxx"], num_results=3
Don't use when: The user wants their exact prompt used verbatim — Prompt Spark rewrites, it does not lightly edit; pass that prompt directly to model_run. Also not for analyzing an image, translating text, or producing final assets. Prefer asset_analyze for analysis and model_run for final generation.
open-world
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| model_id | string | ✓ | Required Scenario model ID. Prompt Spark v3 conditions on this model — its training images, examples, and input signature — and returns parameters that conform to it. |
| prompt | string | — | Draft prompt or user intent to rewrite into an on-model prompt — always pass it when you have one; omitting it makes Prompt Spark invent an idea from the model context alone. Prompt Spark rewrites (preserving subject and intent), it does not lightly edit. |
| images | array | — | Optional image asset IDs or data URLs to condition the prompt (e.g. reference images). |
| num_results | number | 1 | Number of prompt variants to return (1–5). |
| dry_run | boolean | — | Estimate cost without running. Sends ?dryRun=true so the API returns the cost estimate without executing or charging credits. |
| team_id | string | — | Team ID. Required if user belongs to multiple teams. |
| project_id | string | — | Project ID to scope the operation to. |
| response_format | enum(json | markdown) | json | Output format: 'json' for structured data, 'markdown' for human-readable text. |