---
title: "Magic Select Keyframe Project Level"
method: POST
path: "/api/projects/{project_id}/keyframes/{keyframe_id}/magic-select"
---

# Magic Select Keyframe Project Level

`POST /api/projects/{project_id}/keyframes/{keyframe_id}/magic-select`

Perform SAM-3 magic select segmentation on a project-level keyframe using a bounding box.

This is the video-centric version that doesn't require scene_id.
Keyframes are looked up by project_id instead of scene_id.

Args:
    project_id: Project ID
    keyframe_id: Keyframe ID
    box_x1-box_y2: Normalized coordinates (0-1) for selection box
    image_url: Optional override image URL to segment
    image: Optional image file to segment (used when the client has a blob URL that cannot be fetched by the server)
    
Returns:
    {
        success: bool,
        maskedImageUrl: str - URL of masked object (transparent background),
        maskOverlayUrl: str - URL of colored mask overlay for preview,
        bounds: { x, y, width, height } - Bounding box in pixels,
        imageWidth: int - Original image width,
        imageHeight: int - Original image height,
    }

## Path parameters

- `project_id` string, required
- `keyframe_id` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/latted/apis/motion-graphics-designer-api.md) · [All operations](https://skmtc.dev/latted/apis/motion-graphics-designer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/latted/motion-graphics-designer-api/revisions/36d149b525df/schema)
