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
- dry_run: optional — true returns a cost estimate without running or charging credits (sends ?dryRun=true). Applies to all actions.
- 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. With dry_run=true the response carries a cost estimate without doing the work.
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="..."
- "How much would this caption cost?" -> action="caption", image="asset_xxx", dry_run=true
Don't use when: You need to generate final user-facing assets. Prefer run_model instead.
read-onlyidempotentopen-world
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 up to 180s for completion. Falls back to returning job_id if the model takes longer — poll via the manage_jobs tool with action 'check' and the returned job_id. |
| dry_run | boolean | — | Estimate cost without running. Sends ?dryRun=true so Phoenix returns the cost estimate without executing or charging credits. Applies to all actions. |
| 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
JSON
{
"action": "caption",
"image": "asset_img001",
"team_id": "team_abc123",
"project_id": "proj_xyz789"
}Example Response
JSON
{
"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