FastClaw / APIs and integrations
User and Key
The key to production access to FastClaw is not to just issue an API key, but to design app_user, end user, Agent ACL, quota and session isolation.

Key type
FastClaw keys have three types: admin, user, and agent. Admin is suitable for background operation and maintenance, user is suitable for a console user, and agent key is suitable for exposing only a single Agent capability.
| Type | Suitable for the scene | risk |
|---|---|---|
| admin | Server management, internal tasks | Maximum authority and should not appear on the client |
| user | The upstream server is called by user agent | Requires ACL and quota |
| agent | Only call specific Agents | Still need to prevent leakage and misuse |
app_user model
docs/upstream-api.md supports explicit POST /v1/users binding external_id, and also supports lazy creation through user or X-Fastclaw-End-User during chat.
Upstream login
Your product completes its own login and billing.
Map users
Pass the product user ID to FastClaw user or X-Fastclaw-End-User.
Quarantine session
FastClaw partitions session, memory, USER.md by end user.
Query usage
Access your own bills or limits through /v1/usage and quota.
Session Key
X-Fastclaw-Session-Key is used to make the same upstream session fall stably to the same FastClaw session. When there is no explicit session key, the server will generate it or map it according to default rules.
Recommended practices
Design the session key to be the product session ID, not the user ID itself; the same user may have multiple different contexts open at the same time.