asset_detect

Analysis

Detect Structural Map

Extract a structural control-map from a Scenario image — canny edges, depth, pose, segmentation, normal, scribble, sketch, lineart, mlsd, or grayscale. Produces an image asset usable as a conditioning input for other models. Args: - asset_id: required — the source image - modality: required — which map to extract (canny, depth, pose, segmentation, normal, scribble, sketch, lineart_anime, mlsd, grayscale) - remove_background: optional — strip the background first (default true) - parameters: optional — advanced knobs (lowThreshold, highThreshold, factor, keypointThreshold) - wait: optional — wait for completion, else returns job_id to track via jobs_wait (or job_get for a status snapshot) - dry_run: optional — true returns a cost estimate without running or charging credits - team_id, project_id: required for OAuth callers Returns: the generated control-map asset (id + app_url), or status='in_progress' with a job_id if still running.
idempotentopen-world

Parameters

NameTypeRequiredDescription
asset_idstringScenario asset ID of the source image.
modalityenum(canny | depth | grayscale | lineart_anime | mlsd | normal | pose | scribble | segmentation | sketch)Structural map to extract (e.g. canny edges, depth, pose, segmentation).
remove_backgroundbooleanRemove the background before detection (model default: true).
parametersrecordAdvanced detection knobs passed through (lowThreshold, highThreshold, factor, keypointThreshold).
waitbooleantrueWait up to 180s for completion. Falls back to returning job_id if the model takes longer — call jobs_wait with the returned job_id.
dry_runbooleanEstimate cost without running. Sends ?dryRun=true so the API returns the cost estimate without executing or charging credits.
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
{
  "asset_id": "asset_img001",
  "modality": "depth",
  "team_id": "team_abc123",
  "project_id": "proj_xyz789"
}

Example Response

JSON
{
  "status": "success",
  "job_id": "job_def",
  "model_id": "model_scenario-detection",
  "assets": [
    {
      "id": "asset_depth001",
      "app_url": "https://app.scenario.com/..."
    }
  ]
}

Common Use Cases

  • Extract a depth/canny/pose control-map to condition another model
  • Prepare ControlNet inputs from an existing asset