Testing with your own agents
Your agents can sign themselves up, try the API on their own, and join your account later. You do not have to create keys for them first, and they never go through the waitlist.
1. Let the agent register itself
One unauthenticated call creates a workspace for the agent and returns an API key, shown once. No account, inbox or approval is needed.
curl -X POST https://api.last-price.ai/api/agents/register \
-H 'content-type: application/json' \
-d '{"name":"acme/pricing-tester"}'The workspace starts on the Agent Starter plan: built-in pricing functions only, 25 compute calls a day, and a key that expires after 30 days unless you claim the workspace first. Registration allows 5 a day per network address and 200 a day in total. The response and the discovery documents always state the limits actually in force.
curl -X POST https://api.last-price.ai/api/compute/price \
-H 'content-type: application/json' \
-H 'x-api-key: lp_...' \
-d '{"context":{"product_type":"saas","current_price":49,"currency":"USD"}}'Anything outside the plan answers 403 with a clear reason, so an agent can learn what it may do by trying. No test workspace is created yet: that comes with the claim.
Once the daily compute limit is reached, compute calls answer 429 with a next list of steps naming the ways past it: where pay per call is offered, pay_per_call on the calls that can be paid for, and day_pass and top_up on every compute call; and always claim. With pay_per_call, the agent sends the same request again with its own key and an x402 payment in USDC at the per-call price: it runs straight away in its own workspace, does not count against the limit, and shows in your usage as paid per call. With day_pass, it buys a day pass: one payment adds extra compute calls for 24 hours, used once the limit is reached, and the passes and the calls left show on your usage page. A request sent with a payment is paid per call even while a pass is live. With top_up, it prepays a workspace balance: one payment for an amount it names, after which calls past the limit and any pass are drawn from the balance at a lower price than paying per call. Nothing is charged automatically. Claiming lifts the limit for good, and any unused pass calls end with it.
Batch pricing (POST /api/compute/batch) is not part of the Agent Starter plan and answers 403 until the workspace is claimed. After the claim, a workspace that turns balance billing on pays for a batch from its balance at the same prepaid price as a single call, one call per item. The balance must cover every item, or the whole batch answers 402 insufficient_balance with the amount it needed, and nothing is charged or computed. An item that fails to price is given back to the balance.
2. Claim it into one of your workspaces
The registration response carries a one-time claim link. Open it, sign in, pick which of your workspaces should hold the agent, and confirm. You can claim into a workspace you own or administer, including one you claimed from an agent earlier. Test workspaces and unclaimed agent workspaces cannot claim.
What a claim does:
- The agent's workspace moves under the workspace you chose. Nothing is deleted or merged: it keeps its own id, data and history.
- It moves to the free plan and the Agent Starter limits lift.
- It gets its own test workspace, as every workspace has.
- It stays marked as started by an agent and as a former agent sandbox, for good.
- The agent's key is revoked unless you choose to keep it. A kept key works with the full access of an API key in that workspace until you revoke it.
One workspace can hold up to 50 claimed agents. For more, email support@last-price.ai.
3. Or let an agent you trust claim for you
If you run an orchestrating agent, it can claim the workspaces its helpers register without you opening each link. If you are an owner or admin of your workspace, create a key for it in Settings, API keys, with the Claim agent workspaces permission (the workspace:claim scope), and give it to that agent. It then calls:
curl -X POST https://api.last-price.ai/api/agents/claim \
-H 'content-type: application/json' \
-H 'x-api-key: lp_...your key with workspace:claim...' \
-d '{"token":"lpc_...from the claim link..."}'The claim goes into the key's own workspace, and the owner of that workspace becomes the owner of the claimed one. The key only works while the person who created it is still an owner or admin there. A key without that permission by name, including one with no scopes set or a wildcard, is refused, the agent must send the key itself rather than a token made from it, and an unclaimed agent can never claim another. Only grant it to an agent you run.
4. Let an agent you trust manage your team
The same kind of agent can also invite people, change roles and remove members for you. If you are an owner or admin, create a key for it in Settings, API keys, with the Manage the team permission (the team:admin scope). The agent learns its workspace id from GET /api/me with the same key, then, for example, sends an invitation:
KEY='lp_...your key with team:admin...'
WS=$(curl -s https://api.last-price.ai/api/me -H "x-api-key: $KEY" | jq -r .tenant_id)
curl -X POST "https://api.last-price.ai/api/workspaces/$WS/invitations" \
-H 'content-type: application/json' \
-H "x-api-key: $KEY" \
-d '{"email":"new.colleague@example.com","role":"member"}'The key acts as you, in its own workspace only, and only while you are still an owner or admin there. It can never make anyone an owner or give a role above yours, never changes the owner or you, and only a key an owner created can demote or remove an admin. Like the claim permission, it has to be granted by name, the agent must send the key itself rather than a token made from it, and an unclaimed agent can never use it. An invitation it sends can only be accepted while the key is valid and you can still invite at that role, and revoking the key cancels its pending invitations. Every change it makes, and every attempt it was refused, is listed on your Team page, which only owners and admins can see.
For help, email support@last-price.ai.