AI 에이전트용 API

에이전트가 몇 초 만에
웹사이트를 만듭니다

API 호출 한 번. AI 에이전트가 라이브 URL을 받습니다. Figma 디자인을 게시하고, 문서를 공유하고, 정적 사이트를 배포하세요 — 프로그래밍 방식으로, 사람의 개입 없이.

agent.py
# Your AI agent creates a live website
response = requests.post("https://api.hiro.host/api/v1/external/projects",
    headers={"X-API-Key": API_KEY},
    json={"mode": "figma", "figmaUrl": url})

# → { "url": "https://my-design.hirohost.site" }

작동 방식

세 단계. 마찰 제로.

01

API 키 받기

조직 설정 페이지에서 워크스페이스 API 키를 가져오세요. 워크스페이스당 하나의 키.

02

에이전트가 API를 호출

/external/projects에 모드(figma, viewer 또는 static)와 선택적 설정으로 POST 요청을 보냅니다. 서브도메인을 생략하면 자동 생성됩니다.

03

라이브 URL 수신

응답에는 에이전트가 공유, 임베드 또는 사용자에게 전달할 수 있는 라이브 URL이 포함됩니다. PATCH를 통해 언제든지 프로젝트를 업데이트하세요.

API 예제

모든 프로젝트 유형, 하나의 엔드포인트.

Figma 임베드, 문서 뷰어, 정적 웹사이트 — 모두 동일한 POST 요청으로 생성됩니다. 에이전트가 모드를 선택합니다.

Publish a Figma designpython
import requests

resp = requests.post(
    "https://api.hiro.host/api/v1/external/projects",
    headers={"X-API-Key": API_KEY},
    json={
        "mode": "figma",
        "figmaUrl": "https://www.figma.com/design/abc/My-Design",
    },
)
print(resp.json()["url"])
# → https://cedar-drift-bloom.hirohost.site
Create a document sitepython
resp = requests.post(
    "https://api.hiro.host/api/v1/external/projects",
    headers={"X-API-Key": API_KEY},
    json={
        "mode": "viewer",
        "subdomain": "quarterly-report",
    },
)
# Upload files to the project separately
print(resp.json()["url"])
# → https://quarterly-report.hirohost.site
Deploy a static sitepython
resp = requests.post(
    "https://api.hiro.host/api/v1/external/projects",
    headers={"X-API-Key": API_KEY},
    json={
        "mode": "static",
        "subdomain": "docs-preview",
        "spaFallback": True,
    },
)
# Upload ZIP/HTML to the project separately
print(resp.json()["url"])
# → https://docs-preview.hirohost.site
Update a projectpython
requests.patch(
    f"https://api.hiro.host/api/v1/external/projects/{uid}",
    headers={"X-API-Key": API_KEY},
    json={
        "password": "secret123",
        "isActive": True,
        "locale": "fr",
    },
)

Claude Code 스킬

한 번의 클릭으로
에이전트를 가르치세요.

아래 스킬을 복사하여 SKILL.md 파일로 저장하세요. Claude Code 에이전트가 HIRO host 웹사이트를 자동으로 생성하고 관리하는 방법을 알게 됩니다.

1

~/.claude/skills/hiro-publish/ 생성

2

복사한 내용을 SKILL.md에 붙여넣기

3

Claude Code에서 /hiro-publish를 사용하거나 자동 활성화되도록 설정

~/.claude/skills/hiro-publish/SKILL.md
---
name: hiro-publish
description: >-
  Create and manage websites on HIRO host via API.
  Use when the user wants to publish a Figma design, share a document,
  or deploy a static site to a live URL.
allowed-tools: Bash(curl *)
---

# HIRO host — Publish to web

You can create and manage live websites using the HIRO host API.

## Setup

The user must provide their API key. Ask for it if not provided.
Set it as a variable for the session:

```bash
export HIRO_API_KEY="<the user's API key>"
```

## Base URL

```
https://api.hiro.host/api/v1/external/projects
```

## Create a project

POST to the base URL. Supported modes: `figma`, `viewer`, `static`.

**Figma design:**
```bash
curl -s -X POST "$HIRO_BASE/api/v1/external/projects" \
  -H "X-API-Key: $HIRO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode": "figma", "figmaUrl": "<figma_url>"}'
```

**Document (viewer):**
```bash
curl -s -X POST "$HIRO_BASE/api/v1/external/projects" \
  -H "X-API-Key: $HIRO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode": "viewer", "subdomain": "<optional-name>"}'
```

**Static website:**
```bash
curl -s -X POST "$HIRO_BASE/api/v1/external/projects" \
  -H "X-API-Key: $HIRO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode": "static", "subdomain": "<optional-name>", "spaFallback": true}'
```

Omit `subdomain` to auto-generate a random one (e.g. cedar-drift-bloom).

## Update a project

PATCH with the project UID:

```bash
curl -s -X PATCH "$HIRO_BASE/api/v1/external/projects/<project_uid>" \
  -H "X-API-Key: $HIRO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"isActive": false, "password": "secret"}'
```

## Available fields

Create: `mode`, `subdomain`, `figmaUrl`, `isActive`, `locale`, `password`,
`emailCollectionEnabled`, `downloadsDisabled`, `spaFallback`, `actionMenu`.

Update: all of the above except `mode` and `subdomain`, plus `removePassword`.

## Response

Both endpoints return:
```json
{
  "uid": "...",
  "url": "https://<subdomain>.hirohost.site",
  "host": "...",
  "mode": "...",
  "isActive": true,
  ...
}
```

Always show the user the `url` from the response so they can visit their site.

자동화할 준비가 되셨나요?

가입하고, 조직 설정에서 API 키를 가져와 에이전트가 게시를 시작하도록 하세요.