analyze
AnalysisAnalyze Images
Run analysis tools on images or text. Actions include caption, describe_style, detect, embed, prompt_gen, and translate. For local files, upload them first with upload_asset and pass the resulting asset_id. Args: - action: required analysis mode - image: asset_id or URL for image-based actions - text: required for embed and translate, optional for prompt_gen - num_results, model_id, parameters, wait: optional action-specific controls - team_id, project_id: required for OAuth callers Returns: action-specific analysis output. prompt_gen returns prompt suggestions synchronously; the other actions may return immediate results or a polled job result depending on the backend. Examples: - "Caption this image" -> action="caption", image="asset_xxx" - "Generate a depth map" -> action="detect", image="asset_xxx", parameters={"modality": "depth"} - "Translate this prompt" -> action="translate", text="..." Don't use when: You need to generate final user-facing assets. Prefer run_model instead.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| action | enum(caption | describe_style | detect | embed | prompt_gen | translate) | ✓ | Analysis action: caption (describe image), describe_style (analyze style), detect (edge/depth/pose maps), embed (vector embedding), prompt_gen (generate/enhance prompts), translate (translate prompts) |
| image | string | — | Source image URL or asset ID. |
| text | string | — | Text input (required for embed/translate, optional for prompt_gen). |
| num_results | number | 1 | Number of result variations (prompt_gen only). |
| model_id | string | — | Analysis model ID (optional). |
| parameters | record | — | Action-specific params (e.g., modality for detect, language for translate). |
| wait | boolean | true | Wait for completion (up to 5 min). |
| 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. |
Example Request
{
"action": "caption",
"image": "asset_img001",
"team_id": "team_abc123",
"project_id": "proj_xyz789"
}Example Response
{
"action": "caption",
"status": "succeeded",
"caption": "A majestic dragon with iridescent scales perched on a rocky mountain peak at golden hour, dramatic clouds in the background."
}Common Use Cases
- Auto-caption game assets for searchability and accessibility
- Analyze image style with describe_style before fine-tuning a model on similar content
- Generate enhanced prompts from rough descriptions using prompt_gen
- Extract depth or edge maps with detect to use as control inputs for other models