claude-memory/project_api_keys.md

42 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
name: APIキー体系・認証設計
description: Posimai プロジェクト全体のAPIキー構造と各アプリでの使われ方
type: project
---
## posimai_api 認証キーpk_ キー)
フロントエンドアプリ → posimai_api への認証に使用
| ユーザー | キー | localStorage キー名 |
|---------|------|-------------------|
| maita | pk_maita_a2be09f6eaaba0db65b72f085ea352d3 | posimai_api_key |
| partner | pk_partner_fcfcbdf7d4a2ee23abf3ad046830af44 | posimai_api_key |
| musume | pk_musume_76488f7ee2a4e6cd9d4b3ad6284d4cc7 | posimai_api_key |
## Gemini API キー
- サーバーサイドposimai_apiが Gemini に接続するためのキー
- .env の GEMINI_API_KEY に設定
- フロントエンドアプリは直接使わない
## Magic Link 仕組み
- Dashboard → `?init_key=pk_maita_...` 付き URL でアプリを開く
- アプリ側: `localStorage.setItem('posimai_api_key', initKey)` で保存
- 対象: Brain / Reader / FeedMaps は別途 Google Maps API キーが必要)
## Dashboard 環境変数
- Vercel: POSIMAI_API_KEY = pk_maita_... 2026-03-12 追加済み)
## 各アプリのキー要否
| アプリ | 必要なキー | 用途 |
|--------|-----------|------|
| Brain | posimai_api_key | 記事保存・取得 |
| Reader | posimai_api_key | Brain への保存(記事取得は Jina AI 無料) |
| Feed | posimai_api_key | Brain への保存 |
| Maps | Google Maps API Key | 地図検索posimai_api キー不要) |
| Think | Gemini API KeyAIza... | Gemini 2.5 Flash 直接呼び出し |
## AI API方針
- フロントエンドからAIを直接呼ぶ場合は **Gemini API**AIza...)を使う
- Claude APIsk-ant-...)は持っていないため使わない
- posimai_api バックエンドに chatエンドポイントはまだない将来追加予定