---
title: "Generate component from image"
method: POST
path: "/api/v0/components"
tags: ["Components"]
---

# Generate component from image

`POST /api/v0/components`

Analyzes an uploaded image and generates components based on the visual content. Supports 'flowchart' (Mermaid syntax), 'chart' (matplotlib PNG as base64), and 'table' (HTML table extraction). If no image is provided, creates an empty component record for later upload via presigned URL.

## Query parameters

- `component_type` 'flowchart' | 'diagram' | 'mindmap' | 'chart' | 'table' | 'schematic' — Type of component to generate. Supports 'flowchart', 'chart', and 'table'.
- `include_description` boolean — For flowcharts, whether to include a natural language description in addition to the Mermaid code.
- `baseline_provider` 'vlm' | 'azure' | 'gcp', nullable — When baseline_mode=true, choose provider: vlm (LLM vision), azure (Document Intelligence), gcp (Document AI)
- `fix_text_with_vlm` boolean — Whether to fix text with VLM
- `detect` boolean — For schematic components: run symbol detection on the uploaded image instead of starting from an empty canvas.

## Response `200`

Successful Response

- ComponentPostResponse
  - `job_status_id` string, uuid, required — The ID of the job status
  - `status` string, required — The status of the job
  - `error_message` string, nullable, required — The error message if the job failed
  - `component_id` string, uuid, required — The ID of the component

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/outerport/apis/outerport-api.md) · [All operations](https://skmtc.dev/outerport/apis/outerport-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/outerport/outerport-api/revisions/f565b46daaea/schema)
