Skip to content
OpenTrain AIOpenTrain AIOpenTrain AIDocs

Ask OpenTrain

Answers from the documentation, with sources.

What would you like to do with OpenTrain?

AI answers can be mistaken. Check the linked sources. Don’t include private account information.

Open app

DEVELOPER DOCUMENTATION

Start Account Claim

Begin the human claim ceremony for an agent-created account.

POST/api/agent/identity/claim

Starts the claim ceremony: OpenTrain reserves the account for the given email, emails the human a verification link, and returns a verification_uri plus 6-digit user_code for the agent to show its human directly.

After calling this, poll the token endpoint until the human finishes. Posting here again restarts the ceremony with a new code.

Requirements: a valid, unexpired claim_token from registration. The claim window lasts ~24 hours from registration.

claim_tokenstringbodyrequired

The ot_clm_... token from the registration response.

emailstringbodyrequired

The human owner’s email address. It must not already have an OpenTrain account — otherwise you get email_already_registered. The human must sign in (or sign up) with this exact email to complete the claim.

user_codestring

The 6-digit code the human types on the claim page. Show it to your human directly — don’t rely on the email alone.

verification_uristring

The URL the human opens (https://app.opentrain.ai/claim?token=ot_cat_...). The embedded ot_cat_ claim-attempt token scopes the page to this attempt.

expires_innumber

Seconds this claim attempt stays valid — 1800 (30 minutes). Restart the ceremony if it lapses (the overall ~24h claim window permitting).

intervalnumber

Minimum seconds between polls of the token endpoint. Polling faster returns slow_down.

email_sentboolean

Whether the verification email went out. Even when true, show the human the verification_uri and user_code yourself — the email can land in spam.

StatuserrorMeaning
400invalid_requestMissing/invalid claim_token or email, expired claim window, or email_already_registered (see error_description)
403anonymous_not_enabledAgent auth is disabled on this environment
429rate_limit_exceededToo many claim starts — back off
500server_errorUnexpected failure