> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daven.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# API

> MCP / Edu 연동 엔드포인트와 응답 형식

Base URL 예:

```text theme={null}
https://edu.daven.ai/api/v1/mcp-proxy
```

OpenAPI: [`/edu/openapi.yaml`](/edu/openapi.yaml)

## 엔드포인트

| Method | Path                | Auth | 설명                     |
| ------ | ------------------- | ---- | ---------------------- |
| `GET`  | `/health`           | 없음   | 헬스 체크                  |
| `GET`  | `/api/account`      | 필요   | 계정 / 쿼터                |
| `POST` | `/api/quote`        | 필요   | 생성 전 견적                |
| `POST` | `/api/upload-url`   | 필요   | 업로드 URL 발급             |
| `POST` | `/api/media/create` | 필요   | 생성 잡 시작                |
| `POST` | `/api/media/get`    | 필요   | 생성 상태 조회               |
| `GET`  | `/api/catalog`      | 필요   | 카탈로그 (`kind`, `query`) |

요청 body 필드는 모델·도구마다 다릅니다. Daven Playground / `@davenai/mcp` tool 스키마와 같은 계열을 사용합니다.

## 응답 형식

### Success

```json theme={null}
{
  "status": "success",
  "data": {},
  "code": "",
  "message": ""
}
```

### Error

```json theme={null}
{
  "status": "error",
  "error": {
    "code": "AUTH_001",
    "message": "…",
    "detail": "optional"
  }
}
```

| HTTP  | 의미                      |
| ----- | ----------------------- |
| `200` | 성공 (body의 `status`도 확인) |
| `401` | 인증 실패                   |

## 예시

<CodeGroup>
  ```bash Account theme={null}
  curl -sS "$BASE/api/account" \
    -H "Authorization: Bearer $TOKEN" \
    -H "X-Edu-Session: $TOKEN"
  ```

  ```bash Quote theme={null}
  curl -sS -X POST "$BASE/api/quote" \
    -H "Authorization: Bearer $TOKEN" \
    -H "X-Edu-Session: $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{}'
  ```

  ```bash Media create theme={null}
  curl -sS -X POST "$BASE/api/media/create" \
    -H "Authorization: Bearer $TOKEN" \
    -H "X-Edu-Session: $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{}'
  ```

  ```bash Media get theme={null}
  curl -sS -X POST "$BASE/api/media/get" \
    -H "Authorization: Bearer $TOKEN" \
    -H "X-Edu-Session: $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"id":"MEDIA_OR_JOB_ID"}'
  ```

  ```bash Catalog theme={null}
  curl -sS "$BASE/api/catalog?kind=voices" \
    -H "Authorization: Bearer $TOKEN" \
    -H "X-Edu-Session: $TOKEN"
  ```
</CodeGroup>
