---
title: "Segment"
method: POST
path: "/segment"
---

# Segment

`POST /segment`

Segment a video based on a prompt. The request is a multi-part form POST that takes the following arguments:

- **input_video**: The input video that you need processed
- **prompt**: A description of what you want extracted out of the image? - Example: A person wearing a black jacket

Returns
```
{
        "url":"05_06_2023/test-a8ee1618-a767-46f6-be30-dc8e3ae1b8ad/animations/C480BDD3-6E47-4949-B0C2-3C1C0E388391.zip",
        "task_id":"84289e12-562a-4fa8-8d43-895d050b54b4",
        "task_status":"PENDING"
}

You would need to get the task status using the `task_id` above (see get_task_status) and download the asset using `get_asset_url`
```

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/puppetry/apis/puppetry-api.md) · [All operations](https://skmtc.net/puppetry/apis/puppetry-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/puppetry/puppetry-api/revisions/b1edb3c2f3e8/schema)
