---
title: "Extract Style"
method: POST
path: "/api/v1/style/extract"
tags: ["style"]
---

# Extract Style

`POST /api/v1/style/extract`

## Request

- Base URL: `https://api.slidemaster.tw` (the document declares no server; this is the origin it was published from)
- URL: `https://api.slidemaster.tw/api/v1/style/extract`
- Auth: none declared

Extract a style_guide JSON from an uploaded PPTX/POTX.

Auth: any logged-in user (no rate limit yet — extraction is cheap).

Errors:
    400 - non-pptx file or unparseable
    413 - file too large
    500 - python-pptx blew up on a malformed file we tried to parse

Returns:
    {
        "primary": "#RRGGBB",
        "accent":  "#RRGGBB",
        "text":    "#RRGGBB",
        "bg":      "#RRGGBB",
        "secondary": "#RRGGBB",
        "fonts": {"primary": "..."},
        "filename": "<original>.pptx",
        "size_bytes": int,
        "_evidence": { ... }   # diagnostic counters
    }

## Headers

- `Authorization` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/slidemaster/apis/slidemaster-ai-api.md) · [All operations](https://skmtc.dev/slidemaster/apis/slidemaster-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/slidemaster/apis/slidemaster-ai-api/revisions/a964c005977e?raw)
