Il tuo agente crea
siti web in pochi secondi
Una chiamata API. Il tuo agente IA riceve un URL attivo. Pubblica design Figma, condividi documenti o distribuisci siti statici — in modo programmatico, senza intervento umano.
# 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" }Come funziona
Tre passaggi. Zero attriti.
Ottieni la tua chiave API
Prendi la chiave API del tuo workspace dalla pagina delle impostazioni dell'organizzazione. Una chiave per workspace.
L'agente chiama l'API
POST a /external/projects con una modalità (figma, viewer o static) e configurazione opzionale. Un sottodominio viene generato automaticamente se non lo specifichi.
Ricevi un URL attivo
La risposta include un URL attivo che il tuo agente può condividere, incorporare o consegnare all'utente. Aggiorna il progetto in qualsiasi momento tramite PATCH.
Esempi API
Ogni tipo di progetto, un solo endpoint.
Incorporamenti Figma, visualizzatori di documenti, siti web statici — tutti creati tramite la stessa richiesta POST. Il tuo agente sceglie la modalità.
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.siteresp = 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.siteresp = 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.siterequests.patch(
f"https://api.hiro.host/api/v1/external/projects/{uid}",
headers={"X-API-Key": API_KEY},
json={
"password": "secret123",
"isActive": True,
"locale": "fr",
},
)Competenza Claude Code
Un clic per insegnare
al tuo agente.
Copia la competenza qui sotto e salvala come file SKILL.md. Il tuo agente Claude Code saprà come creare e gestire siti HIRO host automaticamente.
Crea ~/.claude/skills/hiro-publish/
Incolla il contenuto copiato in SKILL.md
Usa /hiro-publish in Claude Code o lascia che si attivi automaticamente
---
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.
Pronto ad automatizzare?
Registrati, prendi la tua chiave API dalle impostazioni dell'organizzazione e lascia che i tuoi agenti inizino a pubblicare.