POST
/
api
/
chat
Create Site
curl --request POST \
  --url https://api.example.com/api/chat \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "message": "<string>",
  "newSite": true
}
'
{
  "success": true,
  "reply": "<string>"
}

リクエスト

Authorization
string
required
Firebase IDトークン (Bearer xxx)
message
string
required
サイト生成の指示(自然言語)
newSite
boolean
新規サイト作成の場合は true

Example Request

curl -X POST https://app.hirameki-web.com/api/chat \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "カフェのWebサイトを作成してください",
    "newSite": true
  }'

レスポンス

success
boolean
リクエストの成功/失敗
reply
string
AIからの応答メッセージ

Example Response

{
  "success": true,
  "reply": "カフェのWebサイトを作成しました。"
}
AIプロバイダー(Gemini/Claude)によってレスポンス形式が異なる場合があります。Claude使用時はSSEストリーミングにも対応しています(Accept: text/event-stream ヘッダー指定時)。