run_model

Generation

Run Model

Run any Scenario model to generate, edit, upscale, segment, post-process, or transform content. Across all assets kind. Call get_model_schema first so you know the exact parameter contract for the selected model. For file-based parameters such as image, images, or referenceImages, pass Scenario asset_ids instead of local file paths. Use search with query="tool" to discover utility models. Args: - model_id: required — model to run - parameters: required model payload as a JSON object - wait: optional — true waits for completion, false returns immediately with a job_id - team_id, project_id: required for OAuth callers Returns: if the job completes in time, returns status, job_id, model_id, and output asset_ids/app_urls. If it is still running, returns status='in_progress' with a job_id and instructions to poll with manage_jobs. Examples: - "Generate an image" -> model_id="model_xxx", parameters={"prompt": "cinematic portrait"} - "Edit using an uploaded reference" -> model_id="model_xxx", parameters={"prompt": "...", "image": "asset_xxx"} - "Kick off a long job and return immediately" -> wait=false Don't use when: You have not inspected the model schema yet, or when you only have a local file path. Prefer get_model_schema first, then upload_asset if asset_id inputs are needed.

open-world

Parameters

NameTypeRequiredDescription
model_idstringModel ID to run (e.g. 'model_google-gemini-3-1-flash'). Call get_model_schema first to discover accepted parameters.
parametersrecord[object Object]Model parameters as a JSON object. Use get_model_schema to discover the exact fields, types, and constraints for this model. Common fields: prompt, image, aspectRatio, numImages, seed.
waitbooleantrueWait for completion. Automatically falls back to returning job_id if the model takes too long — poll via the manage_jobs tool with action 'check' and the returned job_id.
team_idstringTeam ID. Required if user belongs to multiple teams.
project_idstringProject ID to scope the operation to.
response_formatenum(json | markdown)jsonOutput format: 'json' for structured data, 'markdown' for human-readable text.

Example Request

JSON
{
  "model_id": "model_google-gemini-3-1-flash",
  "parameters": {
    "prompt": "a majestic dragon perched on a mountain at sunset",
    "aspectRatio": "16:9",
    "numImages": 1,
    "seed": 42
  },
  "wait": true,
  "team_id": "team_abc123",
  "project_id": "proj_xyz789"
}

Example Response

JSON
{
  "status": "succeeded",
  "job_id": "job_1a2b3c4d",
  "model_id": "model_google-gemini-3-1-flash",
  "assets": [
    {
      "id": "asset_img001",
      "app_url": "https://app.scenario.com/assets/asset_img001"
    }
  ],
  "message": "Completed. Call display_asset with an asset_id to show the result to the user."
}

Common Use Cases

  • Generate concept art from a text prompt using a community or fine-tuned model
  • Run image-to-image transformations by passing an input image URL in parameters
  • Produce multiple variations by setting numImages > 1 with a fixed seed
  • Trigger long-running video or 3D generation jobs asynchronously with wait: false