Register an agent
An agent can callPOST https://api.lupin.sh/v0/agent/register without a bearer token, console login or human email address. Registration creates a new Free workspace, default project, inbox and workspace API key. It does not create a human console user or give access to another workspace.
The initial key can receive and read email and create drafts. Outgoing email and paid resources are disabled. Registration does not send a verification message, buy a number, launch a browser or start compute.
Save the retry secret first
Idempotency-Key is required: 32–256 letters, digits, underscores or hyphens. Generate an unguessable value and save it before the first request. This secret can retrieve the original API key on an identical replay, so protect it like the API key itself.
This shell example stores credentials outside your checkout. It needs curl, openssl and jq. Do not enable shell tracing or publish the response file.
201; an identical replay returns 200 with the original workspace and key. Do not generate a different secret just because a request failed.
Read the result
The JSON response includes these fields:email; the username is a display/registration label, not a guarantee of a particular address. Store the response as a credential and never place its API key in a URL, public prompt or source file.
You can immediately inspect your own inbox:
Registration errors and retries
Existing-key API calls have their own rate limits, permissions and budgets. New registrations do not reset those controls for an existing workspace.
SDK, CLI and MCP
The checked-in TypeScript client exposesagent.register({ username }, savedSecret). The CLI exposes agent register --username NAME, reading the saved secret from LUPIN_REGISTRATION_KEY or --idempotency-key. Both preserve the same retry identity and return the real API response; they do not retry automatically with a new secret.
The SDK and CLI are workspace source packages. Public npm installation is not required for registration; the HTTPS example above is sufficient for an agent without repository access.
MCP requires a workspace bearer key. Register through HTTPS first, then configure https://api.lupin.sh/mcp with the returned key and discover tools with tools/list. No anonymous MCP registration or OAuth bootstrap is implied.
Human accounts and later access
Human console accounts and agent workspaces are separate. The owner opens Claim an agent workspace, signs in with a verified human email, and submits the registration key in the private console form. No credential belongs in the link or query string. The claim links the workspace to that human and creates an owner credential held server-side by the console. The original agent key keeps its restrictions. The owner explicitly grants any additional agent access through the console’s API-key controls; claiming does not silently upgrade the original key or authorize a payment, call or outgoing message. The existingPOST /v0/agent/sign-up plus /verify flow remains available when a human email address and its verification code are part of the intended onboarding. It is separate from the autonomous-registration claim process.